API Documentation
API Documentation

Websocket XchangeFeed

This endpoint can be used to subscribe to the raw ticker data from different exchanges. Clients can send a Subscribe message to start receiving.

To subscribe to all the ticks of an exchange only the exchangeId can be sent. To subscribe to all the ticks of an market only the marketId or marketName can be sent. Both exchangeId and marketId can be sent to subscribe to the market in an exchange. Clients can subscribe to multiple sources as required. Clients need to call the Market and Exchange REST API's to get the ids.

Parameters

 Name Description
marketIdSubscribe to the exchange ticks for this market
exchangIdSubscribe to the exchange ticks for this exchange
marketNameSubscribe to the exchange ticks for this exchange by the trade pair. e.g. BTC_USD. It is recommended to subscribe by the marketId rather than the marketName

Subscribe to Exchange

{    
             "event":"SUBSCRIBE_EXCHANGE_TICKER",   
             "exchangeId":"359107d3-bd1a-418c-9470-58831ed9a45e"
}

Subscribe to Market by Id


{  
             "event":"SUBSCRIBE_EXCHANGE_TICKER",   
             "marketId":"359107d3-bd1a-418c-9470-58831ed9a45e" 
}

Subscribe to Market by Name

{   
             "event":"SUBSCRIBE_EXCHANGE_TICKER",   
             "marketName":"BTC_USD" 
}

Subscribe to a Market in an Exchange

{  
 "event": "SUBSCRIBE_EXCHANGE_TICKER",   
 "exchangeId": "359107d3-bd1a-418c-9470-58831ed9a45e"  
 "marketId": "f7cbc588-283e-41da-9c28-eee2113d7b8d" 
}

Response

The server will return ticks in this format

{   
             "event":"EXCHANGE_TICKER"   
             "id": "string","exchangeId":"string",   
             "marketId":"string",   
             "last":"string",   
             "volume":"string",   
             "bid":"string",   
             "ask":"string",   
             "timestamp":"2018-09-06T04:35:44Z" 
}