Skip to content
Algo Trade Analytics Docs

syminfo - Pine Script Variable

Symbol metadata such as exchange, session, ticker, and currency.

FieldTypeDescription
syminfo.basecurrencysimple stringReturns a string containing the code representing the symbol’s base currency (i.e., the traded currency or coin) if the instrument is a Forex or Crypto pair or a derivative based on such a pair. Otherwise, it returns an empty string. For example, this variable returns “EUR” for “EURJPY”, “BTC” for “BTCUSDT”, “CAD” for “CME:6C1!”, and "" for “NASDAQ:AAPL”.
syminfo.countrysimple stringReturns the two-letter code of the country where the symbol is traded (ISO 3166-1 alpha-2), or na if the exchange is not directly tied to a specific country. For example, on “NASDAQ:AAPL” it will return “US”, on “LSE:AAPL” it will return “GB”, and on “BITSTAMP:BTCUSD” it will return na.
syminfo.currencysimple stringReturns a string containing the code representing the currency of the symbol’s prices. For example, this variable returns “USD” for “NASDAQ:AAPL” and “JPY” for “EURJPY”.
syminfo.current_contractsimple stringThe ticker identifier of the underlying contract, if the current symbol is a continuous futures contract; na otherwise.
syminfo.descriptionsimple stringDescription for the current symbol.
syminfo.employeessimple intThe number of employees the company has.
syminfo.expiration_datesimple intA UNIX timestamp representing the start of the last day of the current futures contract. This variable is only compatible with non-continuous futures symbols. On other symbols, it returns na.
syminfo.industrysimple stringReturns the industry of the symbol, or na if the symbol has no industry. Example: “Internet Software/Services”, “Packaged software”, “Integrated Oil”, “Motor Vehicles”, etc. These are the same values one can see in the chart’s “Symbol info” window.
syminfo.main_tickeridsimple stringA ticker identifier representing the current chart’s symbol. The value contains an exchange prefix and a symbol name, separated by a colon (e.g., “NASDAQ:AAPL”). It can also include information about data modifications such as dividend adjustment, non-standard chart type, currency conversion, etc. Unlike syminfo.tickerid, this variable’s value does not change when used in the expression argument of a request.*() function call.
syminfo.mincontractsimple floatThe smallest amount of the current symbol that can be traded. This limit is set by the exchange. For cryptocurrencies, it is often less than 1 token. For most other types of asset, it is often 1.
syminfo.minmovesimple intReturns a whole number used to calculate the smallest increment between a symbol’s price movements (syminfo.mintick). It is the numerator in the syminfo.mintick formula: syminfo.minmove / syminfo.pricescale = syminfo.mintick.
syminfo.minticksimple floatMin tick value for the current symbol.
syminfo.pointvaluesimple floatThe chart price of a security multiplied by the point value equals the actual price of the traded security.
syminfo.prefixsimple stringPrefix of current symbol name (i.e. for ‘CME_EOD:TICKER’ prefix is ‘CME_EOD’).
syminfo.pricescalesimple intReturns a whole number used to calculate the smallest increment between a symbol’s price movements (syminfo.mintick). It is the denominator in the syminfo.mintick formula: syminfo.minmove / syminfo.pricescale = syminfo.mintick.
syminfo.recommendations_buyseries intThe number of analysts who gave the current symbol a “Buy” rating.
syminfo.recommendations_buy_strongseries intThe number of analysts who gave the current symbol a “Strong Buy” rating.
syminfo.recommendations_dateseries intThe starting date of the last set of recommendations for the current symbol.
syminfo.recommendations_holdseries intThe number of analysts who gave the current symbol a “Hold” rating.
syminfo.recommendations_sellseries intThe number of analysts who gave the current symbol a “Sell” rating.
syminfo.recommendations_sell_strongseries intThe number of analysts who gave the current symbol a “Strong Sell” rating.
syminfo.recommendations_totalseries intThe total number of recommendations for the current symbol.
syminfo.rootsimple stringRoot for derivatives like futures contract. For other symbols returns the same value as syminfo.ticker.
syminfo.sectorsimple stringReturns the sector of the symbol, or na if the symbol has no sector. Example: “Electronic Technology”, “Technology services”, “Energy Minerals”, “Consumer Durables”, etc. These are the same values one can see in the chart’s “Symbol info” window.
syminfo.sessionsimple stringSession type of the chart main series. Possible values are session.regular, session.extended.
syminfo.shareholderssimple intThe number of shareholders the company has.
syminfo.shares_outstanding_floatsimple floatThe total number of shares outstanding a company has available, excluding any of its restricted shares.
syminfo.shares_outstanding_totalsimple intThe total number of shares outstanding a company has available, including restricted shares held by insiders, major shareholders, and employees.
syminfo.target_price_averageseries floatThe average of the last yearly price targets for the symbol predicted by analysts.
syminfo.target_price_dateseries intThe starting date of the last price target prediction for the current symbol.
syminfo.target_price_estimatesseries floatThe latest total number of price target predictions for the current symbol.
syminfo.target_price_highseries floatThe last highest yearly price target for the symbol predicted by analysts.
syminfo.target_price_lowseries floatThe last lowest yearly price target for the symbol predicted by analysts.
syminfo.target_price_medianseries floatThe median of the last yearly price targets for the symbol predicted by analysts.
syminfo.tickersimple stringSymbol name without exchange prefix, e.g. ‘MSFT’.
syminfo.tickeridsimple stringA ticker identifier representing the chart’s symbol or a requested symbol, depending on how the script uses it. The variable’s value represents a requested dataset’s ticker ID when used in the expression argument of a request.*() function call. Otherwise, it represents the chart’s ticker ID. The value contains an exchange prefix and a symbol name, separated by a colon (e.g., “NASDAQ:AAPL”). It can also include information about data modifications such as dividend adjustment, non-standard chart type, currency conversion, etc.
syminfo.timezonesimple stringTimezone of the exchange of the chart main series. Possible values see in timestamp.
syminfo.typesimple stringThe type of market the symbol belongs to. The values are “stock”, “fund”, “dr”, “right”, “bond”, “warrant”, “structured”, “index”, “forex”, “futures”, “spread”, “economic”, “fundamental”, “crypto”, “spot”, “swap”, “option”, “commodity”.
syminfo.volumetypesimple stringVolume type of the current symbol. Possible values are: “base” for base currency, “quote” for quote currency, “tick” for the number of transactions, and “n/a” when there is no volume or its type is not specified.
  • Some fields may return empty strings or na depending on the asset class and exchange.
  • syminfo.industry: A sector is a broad section of the economy. An industry is a narrower classification. NASDAQ:CAT (Caterpillar, Inc.) for example, belongs to the “Producer Manufacturing” sector and the “Trucks/Construction/Farm Machinery” industry.
  • syminfo.sector: A sector is a broad section of the economy. An industry is a narrower classification. NASDAQ:CAT (Caterpillar, Inc.) for example, belongs to the “Producer Manufacturing” sector and the “Trucks/Construction/Farm Machinery” industry.
  • syminfo.target_price_average: If analysts supply the targets when the market is closed, the variable can return na until the market opens.
  • syminfo.target_price_date: If analysts supply the targets when the market is closed, the variable can return na until the market opens.
  • syminfo.target_price_estimates: If analysts supply the targets when the market is closed, the variable can return na until the market opens.
  • syminfo.target_price_high: If analysts supply the targets when the market is closed, the variable can return na until the market opens.
  • syminfo.target_price_low: If analysts supply the targets when the market is closed, the variable can return na until the market opens.
  • syminfo.target_price_median: If analysts supply the targets when the market is closed, the variable can return na until the market opens.
  • syminfo.tickerid: Because the value of this variable does not always use a simple “prefix:ticker” format, it is a poor candidate for use in boolean comparisons or string manipulation functions. In those contexts, run the variable’s result through ticker.standard to purify it. This will remove any extraneous information and return a ticker ID consistently formatted using the “prefix:ticker” structure.
  • syminfo.volumetype: Only some data feed suppliers provide information qualifying volume. As a result, the variable will return a value on some symbols only, mostly in the crypto sector.
//@version=6
indicator("Symbol info", overlay=true, max_labels_count=1)
if barstate.islast
label.new(bar_index, high,
text=str.format("{0}\n{1}\n{2}", syminfo.tickerid, syminfo.type, syminfo.currency),
style=label.style_label_left)