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
method
specifies the type of request.params
list represents symbols on which to compute premium between source and target exchanges that user wants to subscribe. The format of parameter issourceExchange@targetExchange@symbol
(e.g."binance@bybit@ETH-USDT"
). You can request the list of supported exchanges with /api/v1/premium/exchanges symbols with /api/v1/premium/symbols endpoint.- The
id
uniquely identifies the subscription request.
- schema
- example
{
"method": "SUBSCRIBE",
"params": [
string
],
"id": int32
}
{
"method": "SUBSCRIBE",
"params": [
"binance@bybit@ETH-USDT"
],
"id": 1
}
Response
d
represents the date and the time in UTC milliseconds.sb
represents the base token of the source exchange.sq
represents the quote token of the source exchange.tb
represents the base token of the target exchange.tq
represents the quote token of the target exchange.se
represents the source exchange name.te
represents the target exchange name.sp
represents the latest price of the source exchange.tp
represents the latest price of the target exchange.pd
represents the price difference between the source and target exchanges.pdp
represents the price difference percentage between the source and target exchanges.spdp
represents the price difference percentage of the source exchange in the last 24 hours.spcd
represents the price change difference of the source exchange in the last 24 hours.sv
represents the trading volume of the source exchange in the last 24 hours.tv
represents the trading volume of the target exchange in the last 24 hours.
- schema
- example
{
"d": int,
"sb": string,
"sq": string,
"tb": string,
"tq": string,
"se": string,
"te": string,
"sp": float,
"tp": float,
"pd": float,
"pdp": float,
"spdp": float,
"spcd": float,
"sv": float,
"tv": float,
}
{
"d": 1634025600000,
"sb": "ETH",
"sq": "USDT",
"tb": "ETH",
"tq": "USDT",
"se": "binance",
"te": "bybit",
"sp": 3500.0,
"tp": 3490.0,
"pd": 10.0,
"pdp": 0.28,
"spdp": 0.5,
"spcd": 10.0,
"sv": 1000.0,
"tv": 2000.0
}