Trading APIs

Order Status

Purpose

This API is used to Fetch Order Status of a particular order placed by Client.

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

Request Method POST
Request format: JSON

Request Header Content-Type:application/json

Request Body

Header

Field Name Description Data Type (max length) Validation Sample Value
appName App Name provided at the time of registration String Cannot be empty. APPTRIAL
appVer Developer App Version String Cannot be empty. 1.0
key UserKey generated at the time of registration String Cannot be empty. ue73jHVeEzBswG5ss9ugyrAasdasdyKYxg
osName Channel of order String Cannot be Empty WEB, Android, iOS
requestCode Request Code of the API called String Cannot be Empty 5POrdReq
userId User ID generated at the time of registration String Cannot be empty. asdue73jHVeE
password Password generated at the time of registration String Cannot be empty. 9ugyrAasdasdy

Body

Field Name Description Data Type (max length) Validation Mandatory List of values Sample Value
ClientCode Pass the registered client code of the user. String(10) Cannot be empty. Yes - 12345678
OrdStatusReqList List Of OrderStatusReqList List Of OrderStatusReqList - - List -

OrderStatusReqList

Field Name Description Data Validation Mandatory List of values Sample Value
Exch Exchange in which order has been placed. N- NSE, B- BSE , M-MCX Char Cannot be empty. Yes N
B
M
N
ExchType Exchange segment. C-Cash, D-Derivative, U-Currency Char Cannot be empty. Yes C
D
U
C
ScripCode Scrip Code of the requested order. Long Cannot be empty. Yes - 22
RemoteOrderID This will be unique ID for each order. String Cannot be empty. Yes - 57129776201804050344475

Response Body

Field Name Description Data Type (max length) List of values Sample Value
Status Returns the status of the response. Integer A. -1
B. 0
C. 1
D. 2
0
Message Returns the message of the response. String A. “Success”
B. “No record found.”
C. “Invalid input parameters.”
D. “Invalid head parameters.”
E. “Error while processing your request.”
F. “Invalid Session”
G. "No Order found for this Client."
Success
OrdStatusResLst Trade Details of that particular client Array Of OrdStatusResLst Array Of OrdStatusResLst -

OrdStatusResLst

FieldName Type Description
Exch Char Exchange in which order has been Placed. N- NSE, B-BSE, M-MCX
ExchType Char Exchange segment C-Cash, D-Derivatives, U-Currency
ScripCode Int32 Scrip Code of the particular stock
Symbol String Symbol of the scrip.
OrderQty Int32 Returns order quantity
OrderRate Double Returns order rate
ExchOrderID Int32 Order ID given by Exchange to an order.
ExchOrderTime DateTime Time at which order has received by Exchange
Status String Returns the status of the response.
TradedQty Int32 Returns Traded Qty of an order.
PendingQty Int32 Returns Pending Qty of an order.

Sample Request

{
    "head": 
        {
            "appName": "APPTRIAL",
            "appVer": "1.0",
            "key": "ue73jH6AKVXeEKIKHVzBswG5syrAyKYxg",
            "osName": "Android",
            "requestCode": "5POrdStatus",
            "userId": "s9RzKCjdL9N432FRS",
            "password": "nznS4f34VBGBG6zXw"
        },
    "body":
        {
        "ClientCode": "12345678",
        "OrdStatusReqList": [
            {
                "Exch": "N",
                "ExchType": "D",
                "ScripCode": 40124,
                "RemoteOrderID": "90980441"
            },
        {
        "Exch": "N",
        "ExchType": "D",
        "ScripCode": 40124,
        "RemoteOrderID": "90980925"
    }]	
    }
}

Sample Response

{
    "body": 
        {
        "Message": "",
        "OrdStatusReqList": [
            {
            "Exch": "N",
            "ExchOrderID": 1000000000140570,
            "ExchOrderTime": "/Date(1552999348000+0530)/",
            "ExchType": "C",
            "OrderQty": 100,
            "OrderRate": 174.6,
            "PendingQty": 0,
            "ScripCode": 2475,
            "Status": "Modified",
            "Symbol": "ONGC",
            "TradedQty": 100,
            }
        ],
        "Status": 0,
        },
    "head": {
        "responseCode": "5POrdStatus",
        "status": "0",{
        "statusDescription": "Success",
    }
}