Skip to content

Commit 192cfe8

Browse files
authored
Merge pull request #29 from ranjanrak/auctions
feat: add getAuctionInstruments, variety in placeOrder
2 parents a79a336 + 0d11fca commit 192cfe8

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/KiteConnect.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ class KiteConnect
8686
public const VARIETY_CO = "co";
8787
public const VARIETY_AMO = "amo";
8888
public const VARIETY_ICEBERG = "iceberg";
89+
public const VARIETY_AUCTION = "auction";
8990

9091
// Transaction type
9192
public const TRANSACTION_TYPE_BUY = "BUY";
@@ -156,6 +157,7 @@ class KiteConnect
156157

157158
"portfolio.positions" => "/portfolio/positions",
158159
"portfolio.holdings" => "/portfolio/holdings",
160+
"portfolio.holdings.auction" => "/portfolio/holdings/auctions",
159161
"portfolio.positions.convert" => "/portfolio/positions",
160162

161163
# MF api endpoints
@@ -454,6 +456,7 @@ public function getMargins(?string $segment = null): mixed
454456
* $params int|null "validity_ttl" Order validity in minutes for TTL validity orders
455457
* $params int|null "iceberg_legs" Total number of legs for iceberg order variety
456458
* $params int|null "iceberg_quantity" Split quantity for each iceberg leg order
459+
* $params int|null "auction_number" A unique identifier for a particular auction
457460
* $params float|null "tag" (Optional) Order tag
458461
* $params string|null "validity" (Optional) Order validity (DAY, IOC).
459462
* @return mixed|null
@@ -670,6 +673,23 @@ public function getHoldings(): array
670673
return $this->get("portfolio.holdings");
671674
}
672675

676+
/**
677+
* Retrieves list of available instruments for a auction session.
678+
*
679+
* @return array
680+
* @throws DataException
681+
* @throws GeneralException
682+
* @throws InputException
683+
* @throws NetworkException
684+
* @throws OrderException
685+
* @throws PermissionException
686+
* @throws TokenException
687+
*/
688+
public function getAuctionInstruments(): array
689+
{
690+
return $this->get("portfolio.holdings.auction");
691+
}
692+
673693
/**
674694
* Modify an open position's product type.
675695
* @param array $params [Parameters](https://kite.trade/docs/connect/v3/portfolio/#position-conversion) describing the open position to be modified.

0 commit comments

Comments
 (0)