Skip to main content

WebSocket

Forex

Forex rate data stream.

Connect

websocat 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.
{
"method": "SUBSCRIBE",
"params": [
"string"
],
"id": int32
}

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.
{
"result": [
"string"
],
"id": int32
}

Response

  • The s represents forex symbol.
  • The d represents the date and the time.
  • The r represent forex rate.
{
"s": string
"d": string
"r": string
}

Ticker

Ticker data stream.

Connect

websocat 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 is symbol@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.
{
"method": "SUBSCRIBE",
"params": [
string
],
"id": int32
}

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.
{
"e": string,
"d": int64,
"s": string,
"b": string,
"q": string,
"p": string,
"P": string,
"v": string,
}

Premium

Premium data stream.

Connect

websocat 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 sourceExchange@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.
{
"method": "SUBSCRIBE",
"params": [
string
],
"id": int32
}

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.
{
"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,
}

Funding Rate

Funding rate stream.

Connect

websocat 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 is symbol@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.
{
"method": "SUBSCRIBE",
"params": [
string
],
"id": int32
}

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.
{
"e": string,
"d": int64,
"s": string,
"b": string,
"q": string,
"r": string,
}