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 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, symbols with /api/v1/premium/symbols endpoint.
- Supported currency:
USD
,KRW
- Supported conversion base:
USDT
,USD
- The
id
uniquely 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
Field (JSON key) | Description |
---|---|
sp | SourceMidPrice — Latest price of the source exchange in requested currency. Example: 45000 |
tp | TargetMidPrice — Latest price of the target exchange. Example: 45010 |
pdp | PriceDiffPercent — Price difference % between source and target exchanges. Example: 0.02 |
sv | SourceVolume — Trading volume of source exchange in last 24h in requested currency. Example: 1000000 |
tv | TargetVolume — Trading volume of target exchange in last 24h in requested currency. Example: 1000000 |
shb | SourceHighestBid — Highest bid from source exchange. Example: 10001.43 |
sla | SourceLowestAsk — Lowest ask from source exchange. Example: 10001.43 |
sbd2p | SourceBidDepth2p — +2% volume depth from source exchange. Example: 10001.43 |
sad2p | SourceAskDepth2p — −2% volume depth from source exchange. Example: 10001.43 |
thb | TargetHighestBid — Highest bid from target exchange. Example: 10001.43 |
tla | TargetLowestAsk — Lowest ask from target exchange. Example: 10001.43 |
tbd2p | TargetBidDepth2p — +2% volume depth from target exchange. Example: 10001.43 |
tad2p | TargetAskDepth2p — −2% volume depth from target exchange. Example: 10001.43 |
pmd | PremiumDuration — Premium duration. Example: 1 |
pdp5m | Price difference % between source and target 5m ago. Example: 0.02 |
spdp5m | Price difference % of source exchange in last 5m. Example: 0.02 |
tpdp5m | Price difference % of target exchange in last 5m. Example: 0.02 |
pdp15m | Price difference % between source and target 15m ago. Example: 0.02 |
spdp15m | Price difference % of source exchange in last 15m. Example: 0.02 |
tpdp15m | Price difference % of target exchange in last 15m. Example: 0.02 |
pdp30m | Price difference % between source and target 30m ago. Example: 0.02 |
spdp30m | Price difference % of source exchange in last 30m. Example: 0.02 |
tpdp30m | Price difference % of target exchange in last 30m. Example: 0.02 |
pdp1h | Price difference % between source and target 1h ago. Example: 0.02 |
spdp1h | Price difference % of source exchange in last 1h. Example: 0.02 |
tpdp1h | Price difference % of target exchange in last 1h. Example: 0.02 |
pdp4h | Price difference % between source and target 4h ago. Example: 0.02 |
spdp4h | Price difference % of source exchange in last 4h. Example: 0.02 |
tpdp4h | Price difference % of target exchange in last 4h. Example: 0.02 |
pdp24h | Price difference % between source and target 24h ago. Example: 0.02 |
spdp24h | Price difference % of source exchange in last 24h. Example: 0.02 |
tpdp24h | Price difference % of target exchange in last 24h. Example: 0.02 |
sb | Source base token. Example: BTC |
sq | Source quote token. Example: USDT |
tb | Target base token. Example: BTC |
tq | Target quote token. Example: USDT |
se | Source exchange name. Example: binance |
te | Target exchange name. Example: bybit |
bid | Base unique ID. Example: bitcoin |
sm | Source market type. Example: spot |
tm | Target market type. Example: futures |
d | Timestamp (UTC ms). Example: 1629780000000 |
st | Source ticker timestamp (UTC ms). Example: 1737525399882 |
tt | Target ticker timestamp (UTC ms). Example: 1737525399882 |
sc | AMM source chain. Example: ethereum |
tc | AMM target chain. Example: ethereum |
spa | AMM source pool address. Example: 0x1234567890123456789012345678901234567890 |
tpa | AMM target pool address. Example: 0x1234567890123456789012345678901234567890 |
t | Transferable flag, null if unknown.Example: true |
sfr | Source funding rate. Example: 0.01 |
sfri | Source funding rate interval (1 = 1h). Example: 1 |
snd | Source next distribution time (UTC ms). Example: 1737525399882 |
tfr | Target funding rate. Example: 0.01 |
tfri | Target funding rate interval (1 = 1h). Example: 1 |
tnd | Target next distribution time (UTC ms). Example: 1737525399882 |
sfrt | Source funding rate info timestamp (UTC ms). Example: 1737525399882 |
tfrt | Target funding rate info timestamp (UTC ms). Example: 1737525399882 |
nfr | Net funding rate (considering interval). Example: 0.01 |
fg | Funding gap (without interval consideration). Example: 0.01 |
sms | Source margin supported (spot only). Example: true |
tms | Target margin supported (spot only). Example: true |
- schema
- example
{
"sp": float,
"tp": float,
"pdp": float,
"sv": float,
"tv": float,
"shb": float,
"sla": float,
"sbd2p": float,
"sad2p": float,
"thb": float,
"tla": float,
"tbd2p": float,
"tad2p": float,
"pmd": int,
"pdp5m": float,
"spdp5m": float,
"tpdp5m": float,
"pdp15m": float,
"spdp15m": float,
"tpdp15m": float,
"pdp30m": float,
"spdp30m": float,
"tpdp30m": float,
"pdp1h": float,
"spdp1h": float,
"tpdp1h": float,
"pdp4h": float,
"spdp4h": float,
"tpdp4h": float,
"pdp24h": float,
"spdp24h": float,
"tpdp24h": float,
"sb": string,
"sq": string,
"tb": string,
"tq": string,
"se": string,
"te": string,
"bid": string,
"sm": string,
"tm": string,
"d": int,
"st": int,
"tt": int,
"sc": string,
"tc": string,
"spa": string,
"tpa": string,
"t": bool,
"sfr": float,
"sfri": int,
"snd": int,
"tfr": float,
"tfri": int,
"tnd": int,
"sfrt": int,
"tfrt": int,
"nfr": float,
"fg": float,
"sms": bool,
"tms": bool
}
{
"sp": 45000,
"tp": 45010,
"pdp": 0.02,
"sv": 1000000,
"tv": 1000000,
"shb": 10001.43,
"sla": 10001.43,
"sbd2p": 10001.43,
"sad2p": 10001.43,
"thb": 10001.43,
"tla": 10001.43,
"tbd2p": 10001.43,
"tad2p": 10001.43,
"pmd": 1,
"pdp5m": 0.02,
"spdp5m": 0.02,
"tpdp5m": 0.02,
"pdp15m": 0.02,
"spdp15m": 0.02,
"tpdp15m": 0.02,
"pdp30m": 0.02,
"spdp30m": 0.02,
"tpdp30m": 0.02,
"pdp1h": 0.02,
"spdp1h": 0.02,
"tpdp1h": 0.02,
"pdp4h": 0.02,
"spdp4h": 0.02,
"tpdp4h": 0.02,
"pdp24h": 0.02,
"spdp24h": 0.02,
"tpdp24h": 0.02,
"sb": "BTC",
"sq": "USDT",
"tb": "BTC",
"tq": "USDT",
"se": "binance",
"te": "bybit",
"bid": "bitcoin",
"sm": "spot",
"tm": "futures",
"d": 1629780000000,
"st": 1737525399882,
"tt": 1737525399882,
"sc": "ethereum",
"tc": "ethereum",
"spa": "0x1234567890123456789012345678901234567890",
"tpa": "0x1234567890123456789012345678901234567890",
"t": true,
"sfr": 0.01,
"sfri": 1,
"snd": 1737525399882,
"tfr": 0.01,
"tfri": 1,
"tnd": 1737525399882,
"sfrt": 1737525399882,
"tfrt": 1737525399882,
"nfr": 0.01,
"fg": 0.01,
"sms": true,
"tms": true
}