getPrice
getPrice method is used to fetch the latest price for a single or several tokens
Get the latest price for a single token
▸ getPrice(symbol
: string, opts?
: GetPriceOptions): _Promise<_PriceData>
Returns the latest price for a single symbol
Parameters:
Returns: Promise<PriceData>
The latest price for the token
Defined in: limestone-api.ts:59
Get the latest price for several tokens
▸ getPrice(symbols
: string[], opts?
: GetPriceOptions): Promise<{ [token: string]: PriceData; }>
Returns the latest price for several symbols
Parameters:
Returns: Promise<{ [token: string]: PriceData; }>
The latest price for the tokens
Defined in: limestone-api.ts:70
Examples
Get the latest price for a single token
All the prices are denominated in USD. You can fetch price data for BTC, ETH, AR, EUR and any other of 100+ supported tokens
Price data format
Fetch price using promises
Get the latest prices for several tokens
To fetch prices for several tokens use the getPrice
method and pass an array with any subset of supported tokens.
Last updated