Subscription
Subscription User can subscribe to the instruments using the Subscription API. The subscription API returns the market event that you have subscribed along with the list of instruments subscribed successfully and its underlying data.
Following are the Market Events supported at uTrade:
1501: Touchline
1502: Market Data
1505: Candle Data
1507: Market Status
1510: OpenInterest
1512: LTP
1105: Instrument Change
Method: POST
{{SERVER_URL}}/api/V2/marketData/subscription
Headers
Content-Type | Value |
---|---|
Authorization | {{MARKET_AUTH_TOKEN}} |
Request Body: JSON
{
"instruments": [
{
"exchangeSegment": 5,
"exchangeInstrumentID": 4671
},
{
"exchangeSegment": 5,
"exchangeInstrumentID": 22
}
],
"eventCode": 1502
}
Response: 200
{
"code": 200,
"description": "Instrument subscribed successfully!",
"result": {
"mdp": 1502,
"quotelist": [
{
"exchangeSegment": 5,
"exchangeInstrumentID": 4671
},
{
"exchangeSegment": 5,
"exchangeInstrumentID": 22
}
]
},
"type": "success"
}