Skip to main content

Returns

Arguments

Usage Guidelines

  • Provide symbol as a pair ID in the format pairAddress:networkId (e.g., 0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640:1)
  • Set currencyCode to USD (default) for USD-denominated prices, or TOKEN for token-denominated prices
  • Returns metadata required by TradingView’s charting library to configure a symbol
  • pricescale is 10^n where n is the number of decimal places — use this for formatting prices on charts
  • supported_resolutions lists the valid resolution values for use with getBars (e.g., 1, 5, 60, 1D)
  • Use this query alongside getBars to implement a complete TradingView datafeed

Troubleshooting Tips

getSymbol implements the resolveSymbol method in a TradingView UDF (Universal Data Feed). When TradingView requests symbol info, call this query with the pair ID and return the response fields. Use getBars to implement the getBars method for candlestick data.
pricescale tells TradingView how to format prices. A pricescale of 1000000 means the price has 6 decimal places. TradingView uses this to display prices correctly and snap to valid price increments. Max value is 10^16.
Use USD (default) when you want prices denominated in US dollars — this is the standard for most trading interfaces. Use TOKEN when you want prices in terms of the quote token (e.g., ETH or SOL), which is useful for showing native pair ratios.
supported_resolutions returns all valid timeframes: seconds (1S, 5S, 15S, 30S), minutes (1, 5, 15, 30, 60), hours (240, 720), and days (1D, 7D). Pass these values to getBars when fetching candlestick data.