Yellow BoxTrading APIv1 · pre-release

Market Data

GETExchange information (NONE)

API Description

Trading rules, symbol specifications and the live rate limits. Call this at start-up and cache it; symbol specifications change rarely, but they do change (swap rates are commonly revised, and sessions change around holidays). Refresh at least daily.

HTTP Request

HTTP
GET /v1/exchangeInfo

Request Weight

10

Request Parameters

Name Type Mandatory Description
symbol STRING NO Return one symbol. Case-sensitive, exact.
symbols STRING NO Return several. JSON array of exact names, URL-encoded: %5B%22XAUUSD%22,%22BTCUSD%22%5D.

symbol and symbols are mutually exclusive (-1128). With neither, every symbol the trade server exposes is returned (see the note below). A name that does not exist — exact case — is -1121; a symbols value that is not a non-empty JSON array of strings is -1130. Symbols are returned sorted by name.

This endpoint is NONE, but it honours the X-YBX-APIKEY header when you send one:

  • Without a key: the default rate limits.
  • With a key: rateLimits[] carrying that key's values.

Response Example

JSON
{
  "serverTime": 1789012345678,
  "serverTimeZoneOffsetMinutes": 180,
  "rateLimits": [
    {"rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 1200},
    {"rateLimitType": "ORDERS", "interval": "SECOND", "intervalNum": 10, "limit": 100},
    {"rateLimitType": "ORDERS", "interval": "MINUTE", "intervalNum": 1, "limit": 1200}
  ],
  "symbols": [
    {
      "symbol": "XAUUSD",
      "description": "Gold vs US Dollar",
      "digits": 2,
      "tickSize": "0.01",
      "tickValue": "1.00",
      "contractSize": "100",
      "volumeMin": "0.01",
      "volumeMax": "50.00",
      "volumeStep": "0.01",
      "stopsLevel": 30,
      "freezeLevel": 0,
      "tradeMode": "FULL",
      "executionMode": "MARKET",
      "fillModes": ["FOK", "IOC"],
      "expirationModes": ["GTC", "DAY", "GTD", "GTD_DAY"],
      "orderModes": ["MARKET", "LIMIT", "STOP", "STOP_LIMIT", "SL", "TP", "CLOSE_BY"],
      "currencyBase": "XAU",
      "currencyProfit": "USD",
      "currencyMargin": "USD",
      "swapMode": "BY_POINTS",
      "swapLong": "-12.5",
      "swapShort": "4.2",
      "swap3Days": "WEDNESDAY",
      "sessions": {
        "SUNDAY": [],
        "MONDAY": [{"open": "01:05", "close": "23:55"}],
        "TUESDAY": [{"open": "01:05", "close": "23:55"}],
        "WEDNESDAY": [{"open": "01:05", "close": "23:55"}],
        "THURSDAY": [{"open": "01:05", "close": "23:55"}],
        "FRIDAY": [{"open": "01:05", "close": "23:55"}],
        "SATURDAY": []
      }
    }
  ]
}

Symbol fields

Field Type Description
symbol STRING Exact, case-sensitive MT5 symbol name.
description STRING Human-readable instrument name. May be empty.
digits INT Price decimal places. Prices are quoted and must be sent at this precision.
tickSize DECIMAL Minimum price increment. A price that is not a multiple is rejected (-4008).
tickValue DECIMAL Value of one tick per lot, in currencyProfit.
contractSize DECIMAL Units of currencyBase per lot.
volumeMin / volumeMax DECIMAL Minimum / maximum volume per order, in lots.
volumeStep DECIMAL Volume granularity, in lots.
stopsLevel INT Minimum distance in points between the market price and an SL, TP or pending price. 0 means no fixed minimum (the server still validates). See note below.
freezeLevel INT Distance in points within which an order or position may not be modified or cancelled. 0 disables it.
tradeMode ENUM DISABLED, LONG_ONLY, SHORT_ONLY, CLOSE_ONLY, FULL.
executionMode ENUM REQUEST, INSTANT, MARKET, EXCHANGE.
fillModes ARRAY of ENUM Allowed fill policies: FOK, IOC, BOC. (RETURN has no flag in the symbol configuration and is never listed — see Common Definition.)
expirationModes ARRAY of ENUM Allowed timeInForce values: GTC, DAY, GTD, GTD_DAY.
orderModes ARRAY of ENUM Order categories allowed: MARKET, LIMIT, STOP, STOP_LIMIT, SL, TP, CLOSE_BY.
currencyBase STRING Base currency / underlying.
currencyProfit STRING Currency profit is computed in.
currencyMargin STRING Currency margin is computed in.
swapMode ENUM How swaps are computed — see Common Definition.
swapLong / swapShort DECIMAL Swap charged per lot per night on long / short positions, in the unit implied by swapMode.
swap3Days ENUM Weekday on which triple swap is charged.
sessions OBJECT Trading sessions per weekday, in trade-server time. Each entry is {"open":"HH:MM","close":"HH:MM"}. An empty array means the symbol does not trade that day.

Notes

  • stopsLevel is in points, not price units. One point is 10^-digits, so on a digits: 2 symbol a stopsLevel of 30 is 0.30 in price. Violating it is -4009.
  • sessions times are in the trade server's timezone. serverTimeZoneOffsetMinutes at the top level is that timezone's offset from UTC in minutes, so utcMinutes = sessionMinutes - serverTimeZoneOffsetMinutes.
  • orderModes is what the symbol allows. The account's group can restrict it further, and a request can still be rejected with -4016 even when the type is listed here.
  • tradeMode other than FULL does not block closing an existing position, except DISABLED.
  • rateLimits[] is authoritative for the key you sent — without a key it carries the defaults. Read it at start-up rather than hard-coding the numbers from General Info.
  • swap3Days may also be DISABLED on a symbol that charges no triple swap — see Common Definition.
  • An MT5 value the API does not model is rendered as UNKNOWN_<n> (the raw integer) in tradeMode, executionMode, swapMode and swap3Days, rather than coerced to a known value. Treat it as unrecognised.
  • sessions always carries all seven weekdays. A session that runs to midnight closes at "24:00".
  • On the current trade server serverTimeZoneOffsetMinutes is 180 — see Known Limitations.