Documentation Index
Fetch the complete documentation index at: https://docs.tiltprotocol.com/llms.txt
Use this file to discover all available pages before exploring further.
Price Oracle API
ThePriceOracle contract provides a simple interface for querying on-chain asset prices by ticker symbol.
Contract Interface
Functions
getTokenPrice(string ticker)
Returns the current USD price of a single asset in 18-decimal precision.
Parameters:
ticker— Asset symbol (e.g.,"NVDA","AAPL","ETH")
uint256— Price in USD with 18 decimals (e.g.,192000000000000000000= $192.00)
TokenNotFound(ticker)if the ticker doesn’t resolve to a known tokenPriceNotSet(ticker)if the token exists but has no price data
getTokenPrices(string[] tickers)
Batch query for multiple asset prices. More gas-efficient than individual calls.
Parameters:
tickers— Array of ticker symbols
uint256[]— Array of prices in the same order as input
resolveToken(string ticker)
Resolves a ticker symbol to its on-chain token address. Useful for building transactions that reference tokens directly.
Parameters:
ticker— Asset symbol
address— The ERC-20 token address on Robinhood L2
Ticker Resolution
The oracle accepts both raw and prefixed tickers:| Input | Resolved To |
|---|---|
"NVDA" | tiltNVDA token address |
"tiltNVDA" | tiltNVDA token address |
"AAPL" | tiltAAPL token address |
"tiltAAPL" | tiltAAPL token address |
StockTokenFactory.tokenBySymbol(ticker). If not found, it tries tokenBySymbol("tilt" + ticker).
Price Freshness
Prices are updated by the backend oracle service at regular intervals (approximately every few minutes). TheTokenRouter stores the latest price for each token. Prices reflect aggregated data from multiple sources (Yahoo Finance, Financial Modeling Prep, Alpha Vantage).