Prerequisites
Before you begin, ensure that you’ve:- Installed the App Kit SDK
- Obtained a kit key (optional): recommended for production or high-volume usage
Look up token rates
Passchain and a tokens array to look up rates for one or more tokens on the
specified blockchain.
TypeScript
Shell
priceUSD: Latest cached USD price for the token, as a decimal string.fetchedAt: Unix timestamp (milliseconds) of when the price was last refreshed. Use this to decide whether to refetch or warn the user about a stale quote.decimals: Number of decimal places for the token.
If a cached price doesn’t exist for a requested token, that token’s address is
omitted from the blockchain’s rate map.
List all token rates
Omittokens to get every cached rate for the specified blockchain. This is
useful for populating a token picker or refreshing a price column:
TypeScript
Shell