Read Orders

Read live orders for any supported broker account, in a broker independent format.

GET https://apix.stocksdeveloper.in/trading/readPlatformOrders
ReadReturns your orders7 languagesRate limited · cache resultsBroker independent
In short

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

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 String

Every 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.

FieldTypeDescription
pseudoAccountstringThe pseudo account the order belongs to.
tradingAccountstringThe mapped trading account id.
stockBrokerstringThe stock broker for this account.
idstringOrder id given by your trading platform.
exchangestringBroker specific exchange.
symbolstringBroker specific symbol.
independentExchangestringBroker independent exchange.
independentSymbolstringBroker independent symbol.
tradeTypeenumTrade type (BUY, SELL).
orderTypeenumOrder type (LIMIT, MARKET, STOP_LOSS, SL_MARKET).
productTypeenumProduct type (INTRADAY, DELIVERY, NORMAL, MTF).
varietyenumOrder variety (REGULAR, BO, CO).
validityenumOrder validity (DAY, IOC).
quantityintOrder quantity.
disclosedQuantityintDisclosed quantity.
filledQuantityintFilled quantity.
pendingQuantityintPending quantity.
pricefloatOrder price entered while placing the order.
triggerPricefloatTrigger price.
averagePricefloatAverage price at which the order traded.
statusenumBroker independent status (OPEN, COMPLETE, CANCELLED, REJECTED, TRIGGER_PENDING, UNKNOWN).
rawStatusstringStatus as returned by your broker.
statusMessagestringStatus message or rejection reason.
amoenumAfter market order flag (true/false).
commentsstringOrder comments.
parentOrderIdstringParent bracket or cover order id, for child orders.
exchangeOrderIdstringExchange order id.
clientIdstringClient (account) id as returned by your broker.
platformTimedateOrder timestamp given by the trading platform.
exchangeTimedateOrder timestamp given by the exchange.
createdTimedateCreated time.
modifiedTimedateModified time.
daydateOrder date.
platformenumTrading platform the order belongs to.
publisherIdstringPublisher 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.

Was this page helpful?

Last updated 29 June 2026