Read Orders
Read live orders for any supported broker account, in a broker independent format.
https://apix.stocksdeveloper.in/trading/readPlatformOrders Read Orders returns the live orders for the trading account mapped to a pseudo account. The same call works across every client language and supported broker. Each order includes status, quantity, price, trade type and timestamps. Cache the result and reuse it to stay within the rate limits.
This call reads orders from your trading platform. It returns data for the trading account linked to the pseudo account you pass in.
The same call is available across all supported brokers, so your code stays broker independent. See API functions for the full list.
Code samples
HTTP
Example
curl https://apix.stocksdeveloper.in/trading/readPlatformOrders \
-H "api-key: <your-api-key>" \
-d "pseudoAccount=ACC_NAME"The response is JSON, in the format shown under Response. Each order carries the Order fields listed below.
Python
Signature
def read_platform_orders(self, pseudo_account):Example
response = autotrader.read_platform_orders('XX1234')
if response.success():
# response.result is a list of PlatformOrder objects
for o in response.result:
print(o.id, o.independent_symbol, o.status)
else:
print("Message: {0}".format(response.message))response.result is a list of order objects. Read each field with object.property notation. Each object exposes the Order fields below.
Java
Signature
/**
* Read orders from the trading account mapped to the given pseudo account.
*
* @param pseudoAccount pseudo account id
* @return trading platform orders
*/
IOperationResponse<Set<PlatformOrder>>
readPlatformOrders(final String pseudoAccount);Example
IOperationResponse<Set<PlatformOrder>> response =
this.autotrader.readPlatformOrders("ACC_NAME");
Set<PlatformOrder> orders = null;
if (response.success()) {
orders = response.getResult();
}Use getResult() to get the set of orders. Each object exposes the Order fields below through getters such as getStatus().
C#
Signature
/// <summary>
/// Read orders from the trading account mapped to the given pseudo account.
/// </summary>
/// <param name="pseudoAccount"> pseudo account id </param>
/// <returns> trading platform orders </returns>
IOperationResponse<ISet<PlatformOrder>> ReadPlatformOrders(
string pseudoAccount);Example
IOperationResponse<ISet<PlatformOrder>> response =
autoTrader.ReadPlatformOrders("XX1234");
foreach (PlatformOrder p in response.Result)
Console.WriteLine("{0}", p);Use the Result property to get the set of orders. Each object exposes the Order fields below as properties such as Status.
Excel
Signature
Excel exposes one function per field. They all take the same arguments:
Public Function GetOrderStatus(pseudoAccount As String, _
orderId As String) As StringEvery field in Order fields has a matching GetOrder<Field> function.
AmiBroker
Signature
AmiBroker exposes one function per field. They all take the same arguments:
function getOrderStatus(pseudoAccount, orderId)Example
// orderId is the id returned by placeOrder
status = getOrderStatus(AT_ACCOUNT, orderId);
price = getOrderPrice(AT_ACCOUNT, orderId);Every field in Order fields has a matching getOrder<Field> function.
MetaTrader
Signature
MetaTrader exposes one function per field. They all take the same arguments:
string getOrderStatus(string pseudoAccount, string orderId)Example
// orderId is the id returned by placeOrder
string status = getOrderStatus(AT_ACCOUNT, orderId);
double price = getOrderPrice(AT_ACCOUNT, orderId);Every field in Order fields has a matching getOrder<Field> function.
Postman
Postman is a widely used tool for API testing. We provide a collection of all our APIs in Postman collection format. See the Postman collection page to learn how to use it.
Response
The call returns an array of orders in JSON, sourced from your trading platform.
{
"result":[
{
"id":"200702202385337",
"tradeType":"SELL",
"orderType":"MARKET",
"productType":"INTRADAY",
"variety":"REGULAR",
"validity":"DAY",
"quantity":1,
"disclosedQuantity":0,
"price":0.0,
"triggerPrice":0.0,
"comments":"01XbtQwPsUSTYGA",
"modifiedTime":1593710627248,
"createdTime":1593710627248,
"amo":false,
"statusMessage":null,
"pseudoAccount":"XX9999",
"tradingAccount":"XX9999",
"stockBroker":"YOUR_BROKER",
"exchange":"<exchange>",
"symbol":"SBIN",
"independentExchange":"<exchange>",
"independentSymbol":"SBIN",
"day":[2020,7,2],
"parentOrderId":null,
"exchangeOrderId":"1300000009330856",
"averagePrice":185.35,
"clientId":"XX9999",
"rawStatus":"COMPLETE",
"platformTime":1593682696000,
"exchangeTime":1593682696000,
"pendingQuantity":0,
"filledQuantity":1,
"platform":"PLATFORM",
"status":"COMPLETE"
}
],
"message":null,
"status":true,
"commandId":"e5a02067-278b-4c5e-bcae-660252c13df3"
}
status is true on success. On error it is false, and message holds the error text.
Order fields
Each order carries the fields below. They are the same across every language: object properties (Python/Java/C#) or a getOrder<Field> function (Excel/AmiBroker/MetaTrader), and JSON keys over HTTP.
| Field | Type | Description |
|---|---|---|
pseudoAccount | string | The pseudo account the order belongs to. |
tradingAccount | string | The mapped trading account id. |
stockBroker | string | The stock broker for this account. |
id | string | Order id given by your trading platform. |
exchange | string | Broker specific exchange. |
symbol | string | Broker specific symbol. |
independentExchange | string | Broker independent exchange. |
independentSymbol | string | Broker independent symbol. |
tradeType | enum | Trade type (BUY, SELL). |
orderType | enum | Order type (LIMIT, MARKET, STOP_LOSS, SL_MARKET). |
productType | enum | Product type (INTRADAY, DELIVERY, NORMAL, MTF). |
variety | enum | Order variety (REGULAR, BO, CO). |
validity | enum | Order validity (DAY, IOC). |
quantity | int | Order quantity. |
disclosedQuantity | int | Disclosed quantity. |
filledQuantity | int | Filled quantity. |
pendingQuantity | int | Pending quantity. |
price | float | Order price entered while placing the order. |
triggerPrice | float | Trigger price. |
averagePrice | float | Average price at which the order traded. |
status | enum | Broker independent status (OPEN, COMPLETE, CANCELLED, REJECTED, TRIGGER_PENDING, UNKNOWN). |
rawStatus | string | Status as returned by your broker. |
statusMessage | string | Status message or rejection reason. |
amo | enum | After market order flag (true/false). |
comments | string | Order comments. |
parentOrderId | string | Parent bracket or cover order id, for child orders. |
exchangeOrderId | string | Exchange order id. |
clientId | string | Client (account) id as returned by your broker. |
platformTime | date | Order timestamp given by the trading platform. |
exchangeTime | date | Order timestamp given by the exchange. |
createdTime | date | Created time. |
modifiedTime | date | Modified time. |
day | date | Order date. |
platform | enum | Trading platform the order belongs to. |
publisherId | string | Publisher id given by AmiBroker, MetaTrader, Excel etc. |
Notes
It is recommended to download and cache orders periodically, then look up the cached set, to avoid hitting the API rate limits.
Some fields may be empty depending on the order state and the broker (see limitations). If you notice any issue, please let us know.
Thanks for the feedback. Still stuck? Contact support.
Last updated 29 June 2026