Skip to content

Commit

Permalink
Merge pull request #29 from ranjanrak/auctions
Browse files Browse the repository at this point in the history
feat: add getAuctionInstruments, variety in placeOrder
  • Loading branch information
vividvilla authored Jan 6, 2023
2 parents a79a336 + 0d11fca commit 192cfe8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/KiteConnect.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class KiteConnect
public const VARIETY_CO = "co";
public const VARIETY_AMO = "amo";
public const VARIETY_ICEBERG = "iceberg";
public const VARIETY_AUCTION = "auction";

// Transaction type
public const TRANSACTION_TYPE_BUY = "BUY";
Expand Down Expand Up @@ -156,6 +157,7 @@ class KiteConnect

"portfolio.positions" => "/portfolio/positions",
"portfolio.holdings" => "/portfolio/holdings",
"portfolio.holdings.auction" => "/portfolio/holdings/auctions",
"portfolio.positions.convert" => "/portfolio/positions",

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

/**
* Retrieves list of available instruments for a auction session.
*
* @return array
* @throws DataException
* @throws GeneralException
* @throws InputException
* @throws NetworkException
* @throws OrderException
* @throws PermissionException
* @throws TokenException
*/
public function getAuctionInstruments(): array
{
return $this->get("portfolio.holdings.auction");
}

/**
* Modify an open position's product type.
* @param array $params [Parameters](https://kite.trade/docs/connect/v3/portfolio/#position-conversion) describing the open position to be modified.
Expand Down

0 comments on commit 192cfe8

Please sign in to comment.