Documentation

Active symbols

DataNo Auth

Get the list of active symbols, the underlying markets you can trade contracts on. Response fields are renamed, spot and display fields are removed, filtering parameters are removed and contract_type values changed.

Quick comparison

AspectLegacy APINew APIAction
Endpointactive_symbolsactive_symbolsNone
Auth RequiredNoNoNone
Request parameters9 parameters4 parametersRemove obsolete parameters
Symbol fieldssymbol, symbol_type, display_name, pipunderlying_symbol, underlying_symbol_type, underlying_symbol_name, pip_sizeRename in your code
Spot fieldsReturnedRemovedUse ticks for spot prices
contract_type valuesIncludes spreads and lookbacksAdds HIGHER and LOWERUpdate your filters

Breaking changes

1. Response fields renamed

Four fields of each symbol are renamed:

  • symbol → underlying_symbol
  • symbol_type → underlying_symbol_type
  • display_name → underlying_symbol_name
  • pip → pip_size

Required change: Read the new field names. The symbol's display name is still returned, as underlying_symbol_name.

2. Translated display name fields removed

market_display_name, subgroup_display_name and submarket_display_name are no longer returned.

Required change: Build display names from market, subgroup and submarket instead.

3. Spot fields removed

spot, spot_age, spot_percentage_change and spot_time are no longer returned.

Required change: Use the ticks call to get real-time spot prices.

4. Landing company, product type and loginid parameters removed

The request no longer accepts landing_company, landing_company_short, product_type or loginid.

Required change: Remove these parameters from your active_symbols requests.

5. barrier_category removed

The request no longer accepts barrier_category, so you can no longer filter symbols by barrier category.

Required change: Remove barrier_category and filter the symbol list in your code, or filter by contract_type.

6. Metadata fields removed

allow_forward_starting, close_only, delay_amount, display_order, exchange_name, intraday_interval_minutes and quoted_currency_symbol are no longer returned.

Required change: Stop reading these fields.

7. contract_type values changed

The contract_type filter no longer accepts CALLSPREAD, PUTSPREAD, LBFLOATCALL, LBFLOATPUT or LBHIGHLOW, and adds HIGHER and LOWER.

Required change: Remove the values the New API no longer accepts from contract_type.

Request structure

Legacy APIrequest example
{
  "active_symbols": "brief",
  "contract_type": [
    "CALL",
    "CALLSPREAD"
  ],
  "landing_company": "svg",
  "req_id": 1
}
New APIrequest example
{
  "active_symbols": "brief",
  "contract_type": [
    "CALL",
    "HIGHER"
  ],
  "req_id": 1
}

Response structure

Legacy APIresponse example
{
  "active_symbols": [
    {
      "display_name": "Volatility 100 Index",
      "display_order": 1,
      "exchange_is_open": 1,
      "is_trading_suspended": 0,
      "market": "synthetic_index",
      "market_display_name": "Derived",
      "pip": 0.01,
      "subgroup": "synthetics",
      "subgroup_display_name": "Synthetics",
      "submarket": "random_index",
      "submarket_display_name": "Continuous Indices",
      "symbol": "R_100",
      "symbol_type": "stockindex"
    }
  ],
  "echo_req": {
    "active_symbols": "brief",
    "contract_type": [
      "CALL",
      "CALLSPREAD"
    ],
    "landing_company": "svg",
    "req_id": 1
  },
  "msg_type": "active_symbols",
  "req_id": 1
}
New APIresponse example
{
  "active_symbols": [
    {
      "exchange_is_open": 1,
      "is_trading_suspended": 0,
      "market": "synthetic_index",
      "pip_size": 0.01,
      "subgroup": "synthetics",
      "submarket": "random_index",
      "trade_count": 1250,
      "underlying_symbol": "R_100",
      "underlying_symbol_name": "Volatility 100 Index",
      "underlying_symbol_type": "stockindex"
    }
  ],
  "echo_req": {
    "active_symbols": "brief",
    "contract_type": [
      "CALL",
      "HIGHER"
    ],
    "req_id": 1
  },
  "msg_type": "active_symbols",
  "req_id": 1
}

Code examples

function getActiveSymbols() {
  ws.send(JSON.stringify({ active_symbols: "brief", landing_company: "svg" }));

  ws.onmessage = (event) => {
    const response = JSON.parse(event.data);
    if (response.msg_type !== "active_symbols" || !response.active_symbols) return;

    response.active_symbols.forEach((symbol) => {
      console.log(symbol.symbol, symbol.display_name, symbol.market_display_name, symbol.pip);
    });
  };
}
Click to open live chat support. Get instant help from our support team.