R
R
Redstone API
Github
NPM
Website
Discord
Search…
1.0.0
What is Redstone API
Getting started
Installation
Usage
Methods
getPrice
getHistoricalPrice
getAllPrices
query
Fluent interface
Redstone query
HTTP API
Prices HTTP Api
Knowledge base
Cache layer
Signature verification
Provider
Links
Github repo
NPM
Website
Discord
Powered By
GitBook
query
query method is used to initialise a redstone query
Simple example
1
const
price
=
await
redstone
.
query
()
2
.
symbol
(
"AR"
)
3
.
latest
()
4
.
exec
();
5
6
console
.
log
(
price
.
value
);
// latest price value for AR token (in USD)
7
console
.
log
(
price
.
timestamp
);
// the exact timestamp of the price
Copied!
To learn more, visit
the Redstone Query page
Redstone query
Methods - Previous
getAllPrices
Next - Fluent interface
Redstone query
Last modified
11mo ago
Copy link