Premium
Premium data stream.
Connect
- websocat
- wscat
websocat wss://api.datamaxiplus.com/ws/v1/premium -H 'X-DTMX-APIKEY: $YOUR_API_KEY'
wscat -c wss://api.datamaxiplus.com/ws/v1/premium -H 'X-DTMX-APIKEY: $YOUR_API_KEY'
Subscribe
methodspecifies the type of request.paramslist represents symbols on which to compute premium between source and target exchanges that user wants to subscribe. The format of parameter is{sourceBase}-{sourceQuote}@{sourceExchange}@{sourceMarket}#{targetBase}-{targetQuote}@{targetExchange}@{targetMarket}#{currency}#{conversionBase}(e.g."BTC-USDT@bybit@spot#BTC-KRW@upbit@spot#KRW#USDT").- You can request the list of supported exchanges with /api/v1/premium/exchanges endpoint.
- Supported currency:
USD,KRW - Supported conversion base:
USDT,USD
- The
iduniquely identifies the subscription request.
- schema
- example
{
"method": "SUBSCRIBE",
"params": [
string
],
"id": int32
}
{
"method": "SUBSCRIBE",
"params": [
"BTC-USDT@bybit@spot#BTC-KRW@upbit@spot#KRW#USDT",
],
"id": 1
}
Response
- Schema
- Example
Schema
keystring
Composite subscription key for the pair.
source_exchangestring
Source exchange name.
target_exchangestring
Target exchange name.
token_idstring
Unified token id.
source_basestring
Source base token.
source_quotestring
Source quote token.
target_quotestring
Target quote token.
source_marketstring
Source market type (e.g. spot/futures).
target_marketstring
Target market type (e.g. spot/futures).
premiumnumber
Premium value (nullable).
source_pricenumber
Latest price on the source exchange (nullable).
target_pricenumber
Latest price on the target exchange (nullable).
timestampinteger
Timestamp in UTC milliseconds.
{
"key": "binance:bybit:bitcoin:USDT:USDT:spot:futures",
"source_exchange": "binance",
"target_exchange": "bybit",
"token_id": "bitcoin",
"source_base": "BTC",
"source_quote": "USDT",
"target_quote": "USDT",
"source_market": "spot",
"target_market": "futures",
"premium": 0.02,
"source_price": 45000,
"target_price": 45010,
"timestamp": 1629780000000
}