Order Status

POSTJSONRest API
176632

Daily API Calls

99.97%

Success Rate

97.72ms

Avg. Response Time


This API helps  you to check order status of placed orders using the RemoteOrderID.

API provides detail list which includes various parameters such as average Price , exchange order ID,trigger rate, quantity traded and pending etc. 

Common Usage

Use Order Status API instead of Order Book API to know status of your Order as this API will help with details of Specific order and not all the orders.

This API returns Exchange Order ID which can be further used to modify orders. 

REQUEST URL

https://Openapi.5paisa.com/VendorsAPI/Service1.svc/V2/OrderStatus

Request headers

KEYVALUE

Content-Type

application/json

Authorization

bearer {Your Access Token}

Request body

FIELD NAMEMANDATORYDESCRIPTION

head

key

STRING

Yes

AppKey of User or Partner

body

ClientCode

STRING

Yes

5paisa demat account client code of the user in plain text.

body:OrdStatusReqList

Exch

STRING

Yes

This is the exchange in which order is placed.

body:OrdStatusReqList

RemoteOrderID

STRING

Yes

This is the RemoteOrderId passed by user while placing the order.

SAMPLE REQUEST BODY  :

{   
	"head":{ 
        "key": "{{Your App Key}}"
	}, 
    "body": {
        "ClientCode": "{{clientcode}}",
        "OrdStatusReqList": [
            {
                "Exch": "N",                
                "RemoteOrderID": "0327020205139304480"
            },
            {
                "Exch": "N",
                "RemoteOrderID": "203051105331"
            }
        ]
    }
}

Response body

FIELD NAMEVALUESDESCRIPTION

head

responseCode

STRING

5POrdStatusV2

This is the unique response code for the API.

status

STRING

0: Success

2: Invalid head parameters.

 

This is the status code which depicts the status of API request to the server.

statusDescription

STRING

Success

Invalid head parameters.

This is the description of the status received from the server for the API request.

body

OrdStatusResLst

ARRAY

 

 

 

It provides the order details for the requested order ids.

Status

INTEGER

0: Success

1: No orders found for this Client.

9: Invalid Session

This is the numeric code
for the status of API 
request

 

Message

STRING

Success

No orders found for this Client.

Invalid Session

This is the description of the status of API request.

OrderBookDetail

FIELD NAMEVALUESDESCRIPTION

AveragePrice

STRING

-This specifies Average Price at which all trades are processed. For Partially filled order this will reflect price for filled trades.   

ExchOrderID

STRING

-

This is the order ID generated by the exchange.

ExchOrderTime

DATETIME

-

Timestamp at which order is placed in the exchange.

ExchType

STRING

C: Cash
D: Derivatives (NSE, BSE & MCX F&O)
U: Currency
 

This is exchange type in which the order is placed.

OldorderQty

INTEGER

-

This is the original order quantity in case any modification is done to the order.

OrderRequesterCode

STRING

-

This is 5paisa Securities client code of the user for which order is placed.

OrderStatus

STRING

Mentioned in the table below

This is current status of the order.

PendingQty

INTEGER

-

This is the quantity pending to be executed.

OrderQty

INTEGER

-

This is the total quantity of the order.

OrderRate

DOUBLE

-

This is the price rate at which order is placed.

ScripCode

INTEGER

-

This is the unique code for instrument in which order is placed.

Symbol

STRING

-

This is the name of the instrument for which order is placed.

TradedQty

INTEGER

-

This is the quantity which has been executed.

Order Status

STATUSDESCRIPTION

Fully Executed

Order has been fully executed.

Modified

Order has been modified from its original execution state.

Xmitted

Order has been prepared by 5paisa system, but exchange rejected it or hasn't reached exchange.

Rejected By 5P

5paisa Securities system rejected the order.

Rejected by Exch

Order has been rejected by exchange.

Cancelled

Order has been cancelled.

Pending

Order has been placed and is pending.

 SAMPLE SUCCESS RESPONSE  
{
    "body": {
        "Message": "Success",
        "OrdStatusResLst": [
            {
                "AveragePrice": 431.05,
                "Exch": "N",
                "ExchOrderID": 10000365323,
                "ExchOrderTime": "/Date(1715587966000+0530)/",
                "ExchType": "C",
                "OrderQty": 1,
                "OrderRate": 431.05,
                "PendingQty": 1,
                "ScripCode": 1660,
                "Status": "Modified",
                "Symbol": "ITC",
                "TradedQty": 0
            },
            {
                "AveragePrice": 431.05,
                "Exch": "N",
                "ExchOrderID": 100000365383,
                "ExchOrderTime": "/Date(1715587966000+0530)/",
                "ExchType": "C",
                "OrderQty": 1,
                "OrderRate": 431.05,
                "PendingQty": 0,
                "ScripCode": 1660,
                "Status": "Fully Executed",
                "Symbol": "ITC",
                "TradedQty": 1
            }
        ],
        "Status": 0
    },
    "head": {
        "responseCode": "5POrdStatusV2",
        "status": "0",
        "statusDescription": "Success"
    }
}
Failure when user has passed incorrect Remote Order Id
{
    "body": {
        "Message": "Success",
        "OrdStatusResLst": [],
        "Status": 0
    },
    "head": {
        "responseCode": "5POrdStatusV2",
        "status": "0",
        "statusDescription": "Success"
    }
}
On this Page

Knowledge base

Trade Book API docs is the next thing to checkout
Trade Book API
how to use this API that suits your work flow best
Start using our APIs

Contribute and get rewarded

Help make these Dev Docs great, contribute to the APIs and get rewarded for your contribution

Need Help

Ask Developer Community

Contact Support

 

Changelog

Changes made to our APIs - Changelog

AVENUES