WebSocket
Forex
Forex rate data stream.
Connect
- websocat
- wscat
websocat wss://api.datamaxiplus.com/ws/v1/forex -H 'X-DTMX-APIKEY: $YOUR_API_KEY'
wscat -c wss://api.datamaxiplus.com/ws/v1/forex -H 'X-DTMX-APIKEY: $YOUR_API_KEY'
Subscribe
method
specifies the type of request.params
list represents forex symbols (e.g. "USD-KRW") that user wants to subscribe. You can request the list of supported forex symbols with /api/v1/forex/symbols endpoint.id
uniquely identifies the subscription request.
- schema
- example
{
"method": "SUBSCRIBE",
"params": [
"string"
],
"id": int32
}
{
"method": "SUBSCRIBE",
"params": [
"USD-KRW"
],
"id": 1
}
If the subscription was successful, the server responds with the message in the following format.
result
corresponds to a list of successfully subscribed symbols.id
corresponds to the subscription request ID.
- schema
- example
{
"result": [
"string"
],
"id": int32
}
{
"result": [
"USD-KRW"
],
"id": 1
}
Response
- The
s
represents forex symbol. - The
d
represents the date and the time. - The
r
represent forex rate.
- schema
- example
{
"s": string
"d": string
"r": string
}
{
"s": "USD-KRW"
"d": "1722913391794"
"r": "1371.54"
}
Ticker
Ticker data stream.
Connect
- websocat
- wscat
websocat wss://api.datamaxiplus.com/ws/v1/ticker -H 'X-DTMX-APIKEY: $YOUR_API_KEY'
wscat -c wss://api.datamaxiplus.com/ws/v1/ticker -H 'X-DTMX-APIKEY: $YOUR_API_KEY'
Subscribe
method
specifies the type of request.params
list represents of symbols on exchanges that user wants to subscribe. The format of parameter issymbol@exchange
(e.g."BTC-KRW@upbit"
). You can request the list of supported exchanges with /api/v1/ticker/exchanges symbols with /api/v1/ticker/symbols endpoint.- The
id
uniquely identifies the subscription request.
- schema
- example
{
"method": "SUBSCRIBE",
"params": [
string
],
"id": int32
}
{
"method": "SUBSCRIBE",
"params": [
"BTC-KRW@upbit"
],
"id": 1
}
Response
e
represents the exchange name.t
represents the date and the time in UTC milliseconds.s
represents the symbol (base-quote
).b
represents the base token.q
represents the quote token.p
represents the latest price.P
represents the price 24 hours ago.v
represents the trading volume in the last 24 hours.
- schema
- example
{
"e": string,
"d": int64,
"s": string,
"b": string,
"q": string,
"p": string,
"P": string,
"v": string,
}
{
"e": "upbit",
"d": 1634025600000,
"s": "BTC-KRW",
"b": "BTC",
"q": "KRW",
"p": "92456439.30,
"P": "91533282.73,
"v": "23423"
}
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": int64,
"sb": string,
"sq": string,
"tb": string,
"tq": string,
"se": string,
"te": string,
"sp": float64,
"tp": float64,
"pd": float64,
"pdp": float64,
"spdp": float64,
"spcd": float64,
"sv": float64,
"tv": float64,
}
{
"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,
}
Funding Rate
Funding rate stream.
Connect
- websocat
- wscat
websocat wss://api.datamaxiplus.com/ws/v1/funding-rate -H 'X-DTMX-APIKEY: $YOUR_API_KEY'
wscat -c wss://api.datamaxiplus.com/ws/v1/funding-rate -H 'X-DTMX-APIKEY: $YOUR_API_KEY'
Subscribe
method
specifies the type of request.params
list represents of symbols on exchanges that user wants to subscribe. The format of parameter issymbol@exchange
(e.g."ETH-USDT@binance"
). You can request the list of supported exchanges with /api/v1/funding-rate/exchanges symbols with /api/v1/funding-rate/symbols endpoint.- The
id
uniquely identifies the subscription request.
- schema
- example
{
"method": "SUBSCRIBE",
"params": [
string
],
"id": int32
}
{
"method": "SUBSCRIBE",
"params": [
"ETH-USDT@binance"
],
"id": 1
}
Response
e
specifies the exchange name.d
specifies the date and the time in UTC milliseconds.s
specifies the symbol (base-quote).b
specifies the base token.q
specifies the quote token.r
specifies the funding rate.
- schema
- example
{
"e": string,
"d": int64,
"s": string,
"b": string,
"q": string,
"r": string,
}
{
"e": "binance",
"d": 1724590730000,
"s": "ETH-USDT",
"b": "ETH",
"q": "USDT",
"r": "0.00005241",
}