pocketful logo light
pocketful logo light

Order History

The Order History API provides users with access to comprehensive data on past transactions recorded in the order book. This includes details such as order ID, order type, price, quantity, timestamp, and any associated fees. By utilizing this API, traders can review their complete and pending order.

Endpoint: /api/v1/order/<oms_order_id>/history
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

{
    "client_id": "<client id>"
}

Example cURL Request

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

Response

{
    "data":{
        "order history": [
        {
            "avg_price": 40672,
            "client_id": "DEMO1",
            "client_order_id": "900005",
            "created_at": 1605683202,
            "disclosed_quantity": 1,
            "exchange": "MCX",
            "exchange_order_id": "202032300187427",
            "exchange_time": 0,
            "fill_quantity": 1,
            "last_modified": 1605683202477299000,
            "login_id": "DEMO1",
            "modified_at": 1605683202,
            "order_id": "63904ddd-df0c-4546-bbdc-4c21c0796f5b",
            "order_mode": "NEW",
            "order_side": "SELL",
            "order_type": "LIMIT",
            "price": 40672,
            "product": "NRML",
            "quantity": 1,
            "reject_reason": "NONE",
            "remaining_quantity": 0,
            "segment": "FutOpt",
            "status": "COMPLETE",
            "symbol": "GOLDGUINEA",
            "token": 224417,
            "trigger_price": 0,
            "underlying_token": 425,
            "validity": "DAY"
        }]
        "message": "",
        "status": "success"
    }
}
KeyDescription
avg_priceAverage price of the order.
client_idUnique identifier for the client.
client_order_idClient-specific order identifier.
created_atTimestamp indicating when the order was created.
disclosed_quantityQuantity disclosed, if applicable.
exchangeThe exchange where the order is placed.
exchange_order_idOrder ID assigned by the exchange.
exchange_timeTimestamp from the exchange.
fill_quantityQuantity of the order that has been filled.
last_modifiedTimestamp of the last modification to the order.
login_idUnique identifier for the user.
modified_atTimestamp of the last modification to the order.
order_idUnique identifier for the order.
order_modeIndicates the mode of the order, e.g., “NEW.”
order_sideIndicates the side of the order, e.g., “SELL.”
order_typeType of order, e.g., “LIMIT.”
pricePrice specified in the order.
productThe product type, e.g., “NRML.”
quantityQuantity specified in the order.
reject_reasonReason for order rejection, if any.
remaining_quantityRemaining quantity of the order to be filled.
segmentTrading segment, e.g., “FutOpt.”
statusCurrent status of the order, e.g., “COMPLETE.”
symbolTicker symbol or name of the financial instrument.
tokenToken representing the financial instrument.
trigger_priceTrigger price for the order.
underlying_tokenToken representing the underlying asset.
validityValidity period of the order, e.g., “DAY.”

Error Response

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