Trade Information
PURPOSE
Trade Information method is used to Fetch Trade Information for a set of orders placed by a Client using order request API. This method works only in an active session and when the user is logged into the system using his valid credentials. It will ask the client to use his client code along with other Trade Information List parameters such as Exchange and its segment, scrip code and Exchange Order ID that is generated while placing an order through Order Request. On successful execution, this method returns Trade Information pertaining to the order placed of either Buy or Sell, Quantity Pending, Trade Execution time and ID etc. in a predefined manner. The method returns status of execution of the API and also a message to be displayed along with the status of response to call of API.
Request Method: POST
Request format: JSON
Request Header:
Content-Type: application/json
Ocp-Apim-Subscription-Key:
to be provided after registration
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. | IIFLMarDEMO |
appVer | Developer App Version | String | Cannot be empty. | 1.0 |
key | UserKey generated at the time of registration | String | Cannot be empty. | ABpyyGUh1nsbesSlup3VKURkI4tQDe8y |
osName | Channel of order | String | Cannot be empty. | WEB, Android, iOS |
requestCode | Request Code of the API called | String | Cannot be empty. | IIFLMarRQTrdInfo |
userId | User ID generated at the time of registration | String | Cannot be empty. | ZkhghN5uKj |
password | Password generated at the time of registration | String | Cannot be empty. | lfjnfS7rHGj |
BODY
Field Name | Description | Data Type (max length) |
Validation | Sample Value |
---|---|---|---|---|
ClientCode | Pass the registered client code of the user. | String(15) | Cannot be empty. | Dummy123 |
TradeInformationList | List Of TradeInformationList | List Of TradeInformationList | - | - |
TRADEINFORMATIONLIST
Field Name | Description | Data Type (max length) |
Validation | Sample Value |
---|---|---|---|---|
Exch | Exchange in which order has been placed. N- NSE, B- BSE ,M-MCX | Char | Cannot be empty. | N B M |
ExchType | Exchange segment. C-Cash, D-Derivative, U – Currency | Char | Cannot be empty | C D U |
ScripCode | Scrip Code of the requested order. | Long | Cannot be empty | - |
ExchOrderID | This will be unique ID for each order which was sent at the time of placing the order. | String | Cannot be empty | 123456789012345 |
REQUEST:
{
"head": {
"appName": "IIFLMarDEMO",
"appVer": "1.0",
"key": "ABpyyGUh1nsbesSlup3VKURkI4tQDe8y",
"osName": "Android",
"requestCode": "IIFLMarRQTrdInfo",
"userId": "mocZueK622W",
"password": "UjR1ElLwSzr"
},
"body": {
"ClientCode": "Dummy123",
"TradeInformationList": [
{
"Exch": "B",
"ExchType": "C",
"ScripCode": 500410,
"ExchOrderID": "1557728588259000015"
},
{
"Exch": "B",
"ExchType": "C",
"ScripCode": 500410,
"ExchOrderID": "1557728588259000019"
},
{
"Exch": "B",
"ExchType": "C",
"ScripCode": 500410,
"ExchOrderID": "1557728588259000020"
}
]
}
}
RESPONSE BODY
Field Name | Description | Data Type (max length) |
List Values | Sample Value |
---|---|---|---|---|
Status | Returns the status of the response. | Integer | -1 = Exception 0 = success 1=No Record Found 2- Invalid Input/ head parameters 9-“Invalid Session” |
0 |
Message | Trade Details of that particular client | 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 |
TradeDetail | Trade Details of that particular client | Array Of TradeInformationResLst | Array Of TradeInformationResLst | - |
ORDER STATUS LIST
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 |
ScripName | String(50) | Scrip Name of the scrip. |
BuySell | Char(1) | B- Buy S- Sell |
Qty | Int32(4) | Number Qunatity which is traded |
PendingQty | Int32(4) | Quantity which is pending at exchange |
Rate | Double | Rate at which order has been Traded |
ExchOrderID | Int64(10) | Order ID given by Exchange to an order. |
ExchangeTradeID | Int64(10) | Trade ID given by Exchange to an order. |
ExchangeTradeTime | DateTime | Time at which order is traded |
Success Response
{
"head": {
"responseCode": "IIFLMarRQTrdInfo",
"status": "0",
"statusDescription": "Success"
},
"body": {
"Message": "",
"Status": 0,
"TradeDetail": [
{
"BuySell": "B",
"Exch": "B",
"ExchOrderID": 1557728588259000000,
"ExchType": "C",
"ExchangeTradeID": 600,
"ExchangeTradeTime": "/Date(1557740929000+0530)/",
"OrgQty": 0,
"PendingQty": 0,
"Qty": 8,
"Rate": 1619.6,
"ScripCode": 500410,
"ScripName": "ACC"
},
{
"BuySell": "B",
"Exch": "B",
"ExchOrderID": 1557728588259000000,
"ExchType": "C",
"ExchangeTradeID": 1000,
"ExchangeTradeTime": "/Date(1557740929000+0530)/",
"OrgQty": 0,
"PendingQty": 0,
"Qty": 8,
"Rate": 1619.6,
"ScripCode": 500410,
"ScripName": "ACC"
},
{
"BuySell": "B",
"Exch": "B",
"ExchOrderID": 1557728588259000000,
"ExchType": "C",
"ExchangeTradeID": 1100,
"ExchangeTradeTime": "/Date(1557740929000+0530)/",
"OrgQty": 0,
"PendingQty": 0,
"Qty": 8,
"Rate": 1619.6,
"ScripCode": 500410,
"ScripName": "ACC"
}
]
}
}