Websocket
Last updated
Last updated
There are two environments to access our websocket market data feeds:
Live
Sandbox
API Authentication is done using an OAuth2.0. User needs to associate the following information in the payload of the subscription message. View the page for more detail.
In order to receive data feed, users sends a subscribe message to the server, after successful websocket connection. Users must also indicate the channel they wish to subscribe on in the subscription request.
When a subscribe message is received with a pair and channel, the server will respond with a subscription message that lists all channels you are subscribed to.
orderBook
- Orderbook across various marketplaces and exchanges.
ticker
- Open, High, Low, Close for a ticker, every minute published
gbbo
- Real time best price/bids updates for subscribed ticker
priceStatistics
- 24 hour statistics for High, Low, % change in price and notional change for a pair over websocket channel. It is published every minute
Note: that the Subscribe request MUST be a JSON string. For example, in Javascript this can be achieved by using the JSON.stringify
method.
authorization
String
Access token for OAuth authentication
Yes
channel
String
Channel of subscription: orderBook
Yes
type
String
Type of action; subscribe or unsubscribe
Yes
nonce
String
Numeric string timestamp in milliseconds of when the request is sent
Yes
username
String
Username of a client in Aquanow System
Yes
pair
String
Symbol/currency pair; ex. – pair: “BTC-USD”
Yes
depth
Number
Depth of an orderbook; ex. – depth: 5
No
precision
Number
Precision level; ex. - precision: 2
No
You can unsubscribe from a channel at any time.
Example Request