Asset Symbols

Asset symbols are used for identifying a particular asset for online sources or broker APIs. They are given in the Symbol column of the asset list, but can also be set by script. In the simplest case the symbol is identical to the asset name (f.i. "EUR/USD"). Different brokers use often different symbols for the same asset; for instance the DAX CFD has the symbol "GER30" on FXCM, "DE30/EUR" on Oanda, and "DEU.IDX/EUR" on Dukascopy. If the asset is traded on several exchanges or requires additional information, an extended symbol can be used. The same asset can have up to three different symbols in the asset list: the first one for trading, the second for retrieving live prices, and the third for retrieving historical prices.

An extended symbol is a text string in the format Source:Root-Type-Exchange-Currency.
Assets with an expiration date, such as futures, have the format Root-Type-Expiry-Class-Exchange-Currency.
Stock or index options have the format Root-Type-Expiry-Strike-P/C-Exchange-Currency.
Future options have the format Root-Type-Expiry-Strike-P/C-Class-Exchange.
Currencies across multiple brokers or exchanges have the format Currency/Countercurrency-Exchange.

The symbols for futures and option contracts are often not entered in the asset list, but internally generated frrom the contract chain; the asset list then contains only the symbol of the underlying. The contract symbols can be retrieved with the strcon function. Parsing the symbol string is the job of the broker plugin.

Several symbols per asset are separated by exclamation marks '!'. They are accessible in the script under the names SymbolTrade, SymbolLive, SymbolHist. If the Symbol field is empty, the asset name is used. If it contains 2 symbols, the first is used for trading and the second for live and historical price data. Of 3 symbols, the first is used for trading, the second for live prices, the third for historical prices. If several symbols are used and one of them is blank or empty (f.i. "AAPL! !"), the prices of that asset are not downloaded or retrieved from the broker. This can be used in special cases when no market data was subscribed or prices are retrieved by other means, f.i. with the assetHistory or priceQuote functions.

Symbol examples:

* Symbol identical to the asset name.
*-STK-SMART-USD General US stock or ETF, smart routing.
STOOQ:*.US General US stock or ETF, no trading, live and historical prices from STOOQ.
TNOW-STK-SMART-USD!TNOW-STK-SMART-USD!YAHOO:TNOW.L TNOW ETF, trading and pricing with current broker, historical prices from Yahoo.
OandaReal:EUR/USD!FXCMDemo:EUR/USD EUR/USD traded with OandaReal using prices from FXCMDemo.
AAPL-OPT-20190918-1350.0-C-GLOBEX AAPL Call option expiring Sep 18, 2019, at $1350 strike.
DAX-FUT-20201218-FDAX-DTB-EUR DAX future expiring Dec 18, 2020, trading class FDAX.

See also:

asset, asset list, broker arbitrage

► latest version online