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
Copy link