Usage Guidelines
- Provide
symbolas a pair ID in the formatpairAddress:networkId(e.g.,0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640:1) - Set
currencyCodetoUSD(default) for USD-denominated prices, orTOKENfor token-denominated prices - Returns metadata required by TradingView’s charting library to configure a symbol
pricescaleis10^nwhere n is the number of decimal places — use this for formatting prices on chartssupported_resolutionslists the valid resolution values for use withgetBars(e.g.,1,5,60,1D)- Use this query alongside
getBarsto implement a complete TradingView datafeed
Troubleshooting Tips
How do I use this with TradingView?
How do I use this with TradingView?
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.What is pricescale used for?
What is pricescale used for?
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.When should I use TOKEN vs USD for currencyCode?
When should I use TOKEN vs USD for currencyCode?
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.What resolutions are supported?
What resolutions are supported?
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.