Limestone query
Limestone query is a special construction exported by limestone api. It makes it easier to execute queries for popular use cases.
Fluent interface for limestone
Limestone API supports a fluent interface to make the price fetching even simpler.
Importing
To use the fluent interface you should import the limestone-api in a standard way and initialise a query calling limestone.query()
;
Usage
All limestone queries consist of 4 parts:
Query initialisation (
limestone.query()
)What to fetch (
symbol
orsymbols
)For which date/dates (
latest
,atDate
,forLastHours
,hoursAgo
,fromDate
,toDate
)Query execution (
exec
)
Examples
Get the latest price for a single token
Get the historical price for a single token
💡 Note: The argument passed to atDate
must be convertable to date. You may pass date (e.g. new Date(2021-04-01)
), timestamp (e.g. 1617709771289
), or just string (e.g. 2021-04-01
or 2021-04-01T12:30:58
)
Get the historical price for the last X hours
Get the historical price for X hours ago
Get the historical price for the last X days
Get the historical prices in a time range
Get the latest prices for several tokens
Get the historical prices for several tokens
Get prices for all available tokens
Last updated