Broker API HubMenu

Instrument names across broker APIs

Every API has its own identifier for a market. This page shows what 9 APIs call theirs, in the words of the records on this site, and why a single symbol map across them is hard to build.

Independent and unofficialNewest check

Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.

The problem

You know the market you want by an everyday name. An API does not. It wants its own identifier, exactly as it issued it, and it refuses anything else. The identifier is found by asking the API, usually through a search call, and it is then passed to every call that reads a price or sends an order.

The sections below are in order of name. The order is not a ranking and nothing here recommends a broker. Each row is one record: an endpoint, one of its parameters or an error code, with the page it was read on. Nothing is added to the record's words.

Capital.com: epic

The parameter the Capital.com records name the market by is called epic. This is what the records say about it.

GET /api/v1/markets

Search markets by term or fetch up to 50 epics at once. With no query it returns every market.

open-api.capital.comchecked

epic, a body parameter of POST /api/v1/positions

Instrument epic, for example from GET /api/v1/markets.

open-api.capital.comchecked

Error error.not-found.epic: what the record says to do

Search with GET /api/v1/markets?searchTerm first and use the returned epic exactly.

github.comchecked

The Capital.com record

cTrader

No endpoint record is held here for cTrader, so there is no parameter to show. This is what the other records say.

Error 114: what the record says it means

The symbol does not exist for this account.

help.ctrader.comchecked

Error 114: what the record says to do

Use symbol IDs from ProtoOASymbolsListReq for that account; IDs differ between brokers.

help.ctrader.comchecked

No endpoint or message record for cTrader is held here, so how a symbol id is requested is recorded only in the error record above.

The cTrader record

eToro: instrumentId

The parameter the eToro records name the market by is called instrumentId. This is what the records say about it.

instrumentId, a body parameter of POST /api/v2/trading/execution/demo/orders

eToro instrument ID. For open orders give exactly one of instrumentId or symbol.

api-portal.etoro.comchecked

symbol, a body parameter of POST /api/v2/trading/execution/demo/orders

Ticker symbol, as the alternative to instrumentId.

api-portal.etoro.comchecked

GET /api/v1/market-data/instruments

Returns display metadata for instruments, such as name, type, exchange, full symbol and logo images. Filter by instrument, exchange, industry or instrument type IDs.

api-portal.etoro.comchecked

The eToro record

IG: epic

The parameter the IG records name the market by is called epic. This is what the records say about it.

GET /markets

Search markets by free text. Returns epics you then feed into every other call.

labs.ig.comchecked

epic, a body parameter of POST /positions/otc

Instrument epic, for example IX.D.FTSE.DAILY.IP.

labs.ig.comchecked

GET /markets/{epic}

Full market details for one epic: instrument, dealing rules (minimum size, stop distances) and snapshot.

labs.ig.comchecked

Error error.public-api.epic-not-found: what the record says it means

The epic in the request was not found.

labs.ig.comchecked

The IG record

Interactive Brokers: conid

The parameter the Interactive Brokers records name the market by is called conid. This is what the records say about it.

GET /iserver/secdef/search

Finds contracts for a symbol and returns their contract IDs (conid), which every market data and order call needs.

interactivebrokers.comchecked

orders[].conid, a body parameter of POST /iserver/account/{accountId}/orders

IB contract ID of the instrument. Find it with GET /iserver/secdef/search.

interactivebrokers.comchecked

GET /iserver/contract/{conid}/info

Full contract details for a conid: symbol, instrument type, currency, exchange, trading class and whether it can be smart routed.

interactivebrokers.comchecked

The Interactive Brokers record

MetaTrader 4

No endpoint record is held here for MetaTrader 4, so there is no parameter to show. This is what the other records say.

Error 4106: what the record says it means

"Unknown symbol" is MetaQuotes' whole description of this code. It is an MQL4 runtime error code, returned by GetLastError().

docs.mql4.comchecked

Symbol names that carry a broker's own suffix are not recorded here.

The MetaTrader 4 record

MetaTrader 5

No endpoint record is held here for MetaTrader 5, so there is no parameter to show. This is what the other records say.

Error 4301: what the record says it means

"Unknown symbol" is MetaQuotes' whole description of this code. It is an MQL5 runtime error code, returned by GetLastError(). The vendor lists it under the heading "MarketInfo".

mql5.comchecked

Error 5301: what the record says it means

The name of the custom symbol is invalid. The vendor says a name may contain only Latin letters without punctuation, spaces or special characters, apart from the full stop, underscore, ampersand and hash, and recommends against the characters used in file paths and wildcards. It is an MQL5 runtime error code, returned by GetLastError(). The vendor lists it under the heading "Custom Symbols".

mql5.comchecked

MetaQuotes describes the symbols_get function of the Python package in these words

Get all financial instruments from the MetaTrader 5 terminal.

MQL5 reference: symbols_getchecked

Symbol names that carry a broker's own suffix are not recorded here. No vendor page opened for this guide states how a broker names or suffixes its symbols, so nothing is said about it.

The MetaTrader 5 record

OANDA: instrument

The parameter the OANDA records name the market by is called instrument. This is what the records say about it.

GET /v3/accounts/{accountID}/instruments

Instruments this account can trade, with precision, pip location and margin rate.

developer.oanda.comchecked

The OANDA record

Saxo: Uic

The parameter the Saxo records name the market by is called Uic. This is what the records say about it.

Uic, a path parameter of GET /ref/v1/instruments/details/{Uic}/{AssetType}

Universal Instrument Code of the instrument.

developer.saxochecked

AssetType, a path parameter of GET /ref/v1/instruments/details/{Uic}/{AssetType}

Asset type of the instrument, for example Stock or FxSpot.

developer.saxochecked

GET /ref/v1/instruments

Searches Saxo's instrument universe by keyword, asset type, exchange or Uic and returns summary rows. Use it to find the Uic you need for prices, charts and orders.

developer.saxochecked

The Saxo record

Not recorded here

No record on this site says how these APIs name a market, so they are left out above. That is a gap in this dataset. It says nothing either way about the API.

Why a universal symbol map is hard

It is tempting to keep one table that turns a market's everyday name into the right identifier for each API. This page does not print one, because no record here holds one and a guessed entry would be worse than none. These are the reasons such a table is hard to build and harder to keep right.

What to do instead

Sections