Orderbook
Orderbook function is used to display all the the orders placed on platform. It doesn't show the orders placed directly on the broker's terminal. This allows us to accurately calculate position as per the order placed in all the accounts as per the strategy name. It is also used to compile the NetPosition
as per strategy and account. The same orders are later used to calculate the entry and exit price for the trades section.
The orders in the orderbook are converted into trades
daily before the trading session begins. While pushing the orders, the system smartly calculates the trade and deletes only the orders that make a complete trade. It also deleted the Rejected, Error and Cancelled Orders. The rest of the order (which may be carried overnight) are visible in the orderbook.
Check the orderbook API here.
Orderbook fields:
strefid
: ID generated after order is placed through a strategy.reftag
: ID genereated for orders placed in each account under astrefid
.symbol
: Name of the instrument.token
:Exchange:Token
of the instruments as per symbol master.transactionType
: Type of transaction. Buy or Sell.tradePrice
: Price as which the order is filled.price
: Price of the instrument at the time of placing order.limitPrice
: Limit price of the order.filledQty
: Quantity for which the execution process is completed, i.e Orders that doesnt have status Pending or Placed.tradedQty
: Quantity which is traded.orderType
: Type of order, (Market, Limit, SL-Limit).productType
: Type of product, (Intraday, Delivery).tradeAt
: Time at which the order is actually traded.reconAt
: Time at which the order is reconciled on our server (The time we received the order update and updated it in the database).placedAt
: Time at which the order is placed.ordersPlaced
: Numnber of orders placed under areftag
. (This happens when you use splitby functionality while placing an order.)operations
: Order operations happening on the order.
spk.orderbook(
strategyName='test_1', #optional Name of the strategy for filtering
accountName='test', #optional Name of the account for filtering
strefid = None, #optional strefid for filtering
reftag = None #optional reftag for filtering
)
Order Details
Order details allows to check the individual orders placed under a reftag
. It shows the orderid
and response received from the broker for each order placed.
To view the order details :
spk.orderbook(
strategyName='test_1', #optional
accountName='test', #optional
withorders=True, #This needs to be true to check order details
strefid = 12345, #Compulsory to check order details
reftag = 1234, #Compulsory to check order details
)
Modify Order
Go to this section.
Cancel Order
Go to this section.
Stop Operations
This action is used to stop the order operations working on an order. This action will stop the operation on all the reftags
with same strefID
.
Check the Rest API here.
Delete Order
This action is used to delete the order from the database. Check the Rest API here.
Cancel All Orders
This action is used to cancel all pending orders placed through the platform under an Account Name or Strategy Name. Check the Rest API here.