Prices
The price feed provides real-time Bid/Ask price levels of up to a depth of 10 for the available symbols.
Listing available symbols
The symbols available for subscription can be fetched by sending a message of type info
and with the topic set to available-symbols
.
{
"messageType": "info",
"topic": "available-symbols",
"key": "API_PUBLIC_KEY",
"passphrase": "PASSPHRASE",
"timestamp": "TIMESTAMP",
"signature": "SIGNATURE"
}
Available symbols response
{
"messageType": "info",
"topic": "available-symbols",
"body": {
"message": [
"BTC/e₹",
"ETH/e₹",
"LTC/e₹",
...
]
}
}
Subscribing to a Symbol
In order to subscribe to the price feed, a message of type subscribe
must be sent.
{
"messageType": "subscribe",
"topic": "prices",
"body": {
"filter": {
"symbol": "BTC/e₹"
}
},
"key": "API_PUBLIC_KEY",
"passphrase": "PASSPHRASE",
"timestamp": "TIMESTAMP",
"signature": "SIGNATURE"
}
body{}
An object used to filter which symbol will be subscribed to. This is a required field for the price feed.
object
messageType
Subscription message type - subscribe
string
topic
Topic to subscribe to - prices
for the price feed
string
key
Your public key
string
passphrase
Your passphrase
string
timestamp
Time in seconds since Unix Epoch
string
signature
your hmac signature
string
Subscription response
{
"body": "Successfully subscribed to the BTC/e₹ feed",
"messageType": "Subscribe"
}
Price update
After successfully subscribing to a symbol, you will be sent price-updated
messages whenever the price is updated.
bid_levels[]
Array of Bid price levels (up to a depth of 10)
string
ask_levels[]
Array of Ask price levels (up to a depth of 10)
string
symbol
The symbol which was subscribed to
string
messageType
Price update message type - price-update
string
The price level object comprises these fields:
price
The level price
string
quantity
The level quantity
string
side
The level side - buy
or sell
string
{
"messageType": "price-update",
"body": {
"symbol": "BTC/e₹",
"bid_levels": [
{
"price": "17260.4677",
"quantity": "4.50",
"side": "buy"
},
{
"price": "17255.445175",
"quantity": "2.77",
"side": "buy"
},
{
"price": "17251.475275",
"quantity": "2.55",
"side": "buy"
},
{
"price": "17245.941475",
"quantity": "3.34",
"side": "buy"
}
],
"ask_levels": [
{
"price": "17317.16195",
"quantity": "14.59",
"side": "sell"
},
{
"price": "17320.83275",
"quantity": "65.77",
"side": "sell"
},
{
"price": "17324.872625",
"quantity": "15.54",
"side": "sell"
},
{
"price": "17330.139425",
"quantity": "9.09",
"side": "sell"
}
]
}
}
Last updated