General Notes
Endpoints and Regions
In order to achieve the best possible latency we host our servers in the same region that exchanges operate. This allows us to collect and process market data from each exchange as fast as possible and with the lowest latency possible.
Therefore the actual endpoint(s) to use when subscribing to the WebSocket feed will depend on which exchange(s) you are going to work with.
Currently the following endpoints/regions are supported which corresponds to AWS regions that are close to the exchanges operating in the US and also Asia.
wss://us-east-1.gravitan.ai/socket/v1
wss://ap-northeast-1.gravitan.ai/socket/v1
For instance if subscribing to WebSocket to receive prediction data for CME and/or Coinbase then use the endpoint that starts with us-east-1
.
However if you need prediction data for both Coinbase and also Binance then you will need to open two WebSocket connections for both us-east-1
and ap-northeast-1
regions.
Please refer to Prediction Services page more for information about region of each exchange.
Symbols
A symbol represents a tradable asset on an exchange including spot, perpetual and derivatives markets (e.g. ESU3 on CME, BTCUSDT on Binance, BTC-USD on dYdX) .
We collect and pass on symbols with the exact same format that exchanges use in order to ensure that our prediction data is consistent with market data that is used for trading.
Request/Response Format
All requests and responses use application/json
content type for all APIs. This requires integrating applications to maintain json flexibility as from time to time we may add extra attributes.
Timestamps
All APIs return date/time format in ISO 8601 with microsecond precision. Sample time returned: 2023-06-01T08:35:13.123456Z
.
Number Format
Unless specified, all amounts are formatted as string
. E.g. `threshold` attribute as part of the price movement prediction message will be formatted as "0.00002"
to represent 2*10^-5.
At this stage, the systems formats all amounts with up to eight digits of decimal points. This configuration may change as new production types are added.
Sort Order
By default, all lists representing live data are sorted in descending order, meaning the most recent records appear first in the list. However in cases of requesting historical data the sort order becomes natural time base ordering to represent time series format.
Null Values
Data objects returned by the REST and WebSocket APIs will not include attributes with null values. For instance, if you are not using clientOrderId for placing orders, then the data object returned by the HTTP response won't include it.
APIs defined in this document have sample response format. In some cases, there is also an option to view the list of all possible attributes (from the right panel).
Backward compatibility
Unless communicated with advanced notice, we maintain backward compatibility for all REST and WebSocket APIs at all times to ensure ongoing updates do not break the integrated applications.
Last updated