pocketful logo light
pocketful logo light

Fetch Pending Orders

The Pending Orders API retrieves information about orders that are currently pending and yet to be executed from the order book. By utilizing this API, users can access essential details regarding their outstanding orders, including the order ID, order type, price, quantity, and timestamp of placement.

Endpoint: /api/v1/orders
Method-Type: GET

Headers

Header NameValueDescription
x-authorization-token<your_access_token>Valid JWT token for authentication
x-device-typeWEBThe device type (e.g., WEB, ANDROID, IOS)

Query Params

{
    "type": "pending",
    "client_id": "<client id>"
}

Example cURL Request

curl --location 'https://algo.pocketful.in/api/v1/orders?type=pending&client_id=<client_id>' \
--header 'x-authorization-token: <your_access_token>' \
--header 'x-device-type: WEB'

Response

{
    "data": {
        "orders": [
            {
                "mode": "NEW",
                "exchange": "NFO",
                "segment": "",
                "login_id": "<client id>",
                "deposit": 0,
                "order_status": "AMO_MODIFY_CONFIRMED",
                "product": "NRML",
                "order_type": "LIMIT",
                "rejection_reason": "",
                "order_side": "BUY",
                "instrument_token": 100803,
                "exchange_time": 1709996020,
                "nnf_id": 333333333333100,
                "quantity": 1500,
                "trading_symbol": "COFORGE24MAR5700PE",
                "client_id": "<client id>",
                "average_trade_price": 0,
                "underlying_token": null,
                "oms_order_id": "2024030943",
                "lot_size": 150,
                "isin": "",
                "disclosed_quantity": 0,
                "execution_type": "AMO",
                "source": "pacetrader.pacefin.in",
                "device": "android",
                "exchange_order_id": "",
                "validity": "DAY",
                "leg_order_indicator": null,
                "trade_price": 0,
                "spread_token": null,
                "market_protection_percentage": 0,
                "filled_quantity": 0,
                "order_tag": "",
                "sl_trigger_price": 0.0,
                "square_off": false,
                "order_status_info": "",
                "square_off_value": 0.0,
                "tags": null,
                "order_entry_time": 1709995984,
                "last_activity_reference": 0,
                "trigger_price": 0,
                "sl_order_price": 0.0,
                "stop_loss_value": 0.0,
                "rejection_code": 0,
                "average_price": 0,
                "trailing_stop_loss": 0.0,
                "price": 30.7,
                "user_order_id": "12780",
                "symbol": "COFORGE",
                "is_trailing": false,
                "pro_cli": "CLIENT",
                "remaining_quantity": 1500,
                "contract_description": {},
                "series": "OPTSTK",
                "target_price_type": "absolute",
                "sl_order_quantity": 0
            }
        ]
    },
    "message": "",
    "status": "success"
}
KeyDescription
dataContainer for order data.
ordersAn array containing individual order objects.
modeIndicates the status of the order, e.g., NEW.
exchangeThe stock exchange where the order is placed, e.g., NFO or NSE.
segmentThe trading segment, if applicable.
login_idUnique identifier for the user or client.
depositThe deposit amount associated with the order.
order_statusThe current status of the order, e.g., AMO_MODIFY_CONFIRMED or AMO_REQ_RECEIVED.
productThe product type, such as NRMLMISCNC.
order_typeThe type of order, e.g., LIMIT.
rejection_reasonThe reason for order rejection, if applicable.
order_sideThe side of the order, e.g. BUY or SELL.
instrument_tokenToken representing the financial instrument.
exchange_timeThe timestamp from the exchange.
nnf_idUnique identifier for the order in the NNF system.
quantityThe quantity of the order.
trading_symbolThe trading symbol associated with the order.
client_idUnique identifier for the client.
average_trade_priceThe average trade price, if applicable.
underlying_tokenToken representing the underlying asset.
oms_order_idOrder ID in the Order Management System.
lot_sizeThe lot size associated with the order.
isinISIN (International Securities Identification Number) of the instrument.
disclosed_quantityThe disclosed quantity, if applicable.
execution_typeThe type of execution, e.g., AMO.
sourceThe source of the order, e.g., pacetrader.pacefin.in.
deviceThe device through which the order is placed, e.g., WebMobile
exchange_order_idOrder ID assigned by the exchange.
validityThe validity period of the order, e.g., DAY.
leg_order_indicatorIndicator for leg orders.
trade_priceThe trade price associated with the order.
spread_tokenToken representing spread orders.
market_protection_percentageMarket protection percentage, if applicable.
filled_quantityThe quantity of the order that has been filled.
order_tagAdditional tag or label for the order.
sl_trigger_priceTrigger price for stop-loss orders.
square_offIndicates if the order is a square-off order.
order_status_infoAdditional information about the order status.
square_off_valueValue associated with square-off orders.
tagsAdditional tags associated with the order.
order_entry_timeThe timestamp when the order was entered.
last_activity_referenceReference to the last activity related to the order.
trigger_priceTrigger price for the order.
sl_order_pricePrice for stop-loss orders.
stop_loss_valueValue associated with stop-loss orders.
rejection_codeCode indicating the reason for order rejection.
average_priceThe average price associated with the order.
trailing_stop_lossValue for trailing stop-loss orders.
priceThe price specified in the order.
user_order_idUser-specific order identifier.
symbolThe symbol or ticker of the financial instrument.
is_trailingIndicates if the order has trailing stop-loss.
pro_cliProfessional client designation.
remaining_quantityThe remaining quantity of the order to be filled.
contract_descriptionDescription of the contract, if applicable.
seriesThe series of the instrument, if applicable.
target_price_typeType of target price, e.g., absolute.
sl_order_quantityQuantity specified for stop-loss orders.

Error Response

{
    "status": "error",
    "message": "Request forbidden",
    "error_code": 40000,
    "data":{
    }
}