Skip to main content

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": int
"r": float
}