Trade Book
PURPOSE
This method is used to provide the daily trade details of the day. This API can only be used in an active session when a client is logged in with valid credentials. The only parameter passed on the request is the client’s ID which is passed to the system and is responded with a dataset which comprises of exchange order ID, exchange trade ID, exchange trade time, Quantity, Pending quantity, original quantity and Rate among other things. The method responds with status of execution of API and a message along with the requisite type of status.
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. | IIFLMarRQTrdBkV1 |
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 Clientcode for whome we want to check margin. | String(15) | Cannot be empty. | Dummy123 |
REQUEST:
{
"head": {
"appName": "IIFLMarDEMO",
"appVer": "1.0",
"key": "ABpyyGUh1nsbesSlup3VKURkI4tQDe8y",
"osName": "Android",
"requestCode": "IIFLMarRQTrdBkV1",
"userId": "mocZueK622W",
"password": "UjR1ElLwSzr"
},
"body": {
"ClientCode": "Dummy123"
}
}
RESPONSE BODY
HEADER
Field Name | Description | Data Type (max length) |
List of Values | Sample Value |
---|---|---|---|---|
responseCode | This is the response code of API | String | - | IIFLMarRQLoginForVendor |
status | This is the response code of API | String | 0 2 |
0 |
statusDescription | This is the response code of API | String | 0 - Success 2 - Invalid head parameters |
Success |
responseCode | This is the response code of API | String | - | IIFLMarRQLoginForVendor |
BODY
Field Name | Description | Data Type (max length) |
List Values | Sample Value |
---|---|---|---|---|
Status | Returns the status of the response. | Integer | A | -1 0 1 2 9 |
Message | Returns the message of the reponse. | String | - |
“Success” “No record found.” “Invalid input parameters.” “Invalid head parameters.” “Error while processing your request.” “Invalid Session” "No Order found for this Client." |
TradeBookDetail | Trade Details of that particular client for the day. | Array Of TradeBookV2 | Array Of OrderBookV2 | - |
TradeBook
FieldName | Type | Description |
---|---|---|
Exch | Char(1) | Exchange in which order has been Placed. N- NSE, B-BSE |
ExchType | Char(1) | Exchange segment C-Cash, D-Derivatives |
ScripCode | Int32(4) | 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 p |
OrgQty | Int32(4) | Original total quantity placed by client |
Qty | Int32(4) | Order Qunatity |
Rate | Double(10) | Rate at which order has been Traded |
ExchOrderID | Int64(20) | Order ID given by Exchange to an order. |
ExchangeTradeID | Int64(20) | Trade ID given by Exchange to an order. |
ExchangeTradeTime | DateTime | Time at which order is traded |
Success Response
{
"head": {
"responseCode": "IIFLMarRQTrdBkV1",
"status": "0",
"statusDescription": "Success"
},
"body": {
"Message": "",
"Status": 0,
"TradeBookDetail": [
{
"BuySell": "S",
"DelvIntra": "D",
"Exch": "N",
"ExchOrderID": "1100000000024583",
"ExchType": "C",
"ExchangeTradeID": "50050822",
"ExchangeTradeTime": "/Date(1556273931000+0530)/",
"Multiplier": 0,
"OrgQty": 10,
"PendingQty": 5,
"Qty": 5,
"Rate": 1500,
"ScripCode": 18011,
"ScripName": "WHIRLPOOL",
"TradeType": "ON"
},
{
"BuySell": "B",
"DelvIntra": "D",
"Exch": "B",
"ExchOrderID": "1557728588259000019",
"ExchType": "C",
"ExchangeTradeID": "1000",
"ExchangeTradeTime": "/Date(1557740929000+0530)/",
"Multiplier": 0,
"OrgQty": 8,
"PendingQty": 0,
"Qty": 8,
"Rate": 1619.6,
"ScripCode": 500410,
"ScripName": "ACC",
"TradeType": "ON"
}
]
}
}
Success Response
{
"head": {
"responseCode": "IIFLMarRQTrdBkV1",
"status": "0",
"statusDescription": "Success"
},
"body": {
"Message": "No Trades found for this Client.",
"Status": 1,
"TradeBookDetail": []
}
}