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
RedstoneQuery
RedstoneQueryForSeveralSymbols
RedstoneQueryForSingleSymbol
RedstoneQueryForSingleOrSeveralSymbols
RedstoneQueryExecutable
HTTP API
Prices HTTP Api
Knowledge base
Cache layer
Signature verification
Provider
Links
Github repo
NPM
Website
Discord
Powered By
GitBook
RedstoneQueryForSingleSymbol
​
redstone-api
/
Exports
/ RedstoneQueryForSingleSymbol
Class: RedstoneQueryForSingleSymbol
Hierarchy
​
RedstoneQueryForSingleOrSeveralSymbols
​
↳
RedstoneQueryForSingleSymbol
Table of contents
Constructors
​
constructor
​
Properties
​
params
​
Methods
​
atDate
​
​
forLastDays
​
​
forLastHours
​
​
fromDate
​
​
getExecutableQuery
​
​
hoursAgo
​
​
latest
​
​
toDate
​
Constructors
constructor
new RedstoneQueryForSingleSymbol
(
params
: QueryParams):
RedstoneQueryForSingleSymbol
​
Parameters:
Name
Type
params
QueryParams
Returns:
RedstoneQueryForSingleSymbol
​
Overrides:
RedstoneQueryForSingleOrSeveralSymbols
​
Properties
params
•
Protected
params
: QueryParams
Inherited from:
RedstoneQueryForSingleOrSeveralSymbols
.
params
​
Methods
atDate
â–¸
atDate
(
date
: ConvertableToDate):
RedstoneQueryExecutable
​
Configures query to fetch the price for a specific date.
Parameters:
Name
Type
Description
date
ConvertableToDate
Date for the historical price (date | timestamp | string)
Returns:
RedstoneQueryExecutable
​
query object
Inherited from:
RedstoneQueryForSingleOrSeveralSymbols
​
forLastDays
â–¸
forLastDays
(
daysCount
:
number
):
RedstoneQueryExecutable
​
Configures query to fetch the price for the last few days
Parameters:
Name
Type
Description
daysCount
number
Number of days in the time range
Returns:
RedstoneQueryExecutable
​
query object
forLastHours
â–¸
forLastHours
(
hoursCount
:
number
):
RedstoneQueryExecutable
​
Configures query to fetch the price for the last few hours
Parameters:
Name
Type
Description
hoursCount
number
Number of hours in the time range
Returns:
RedstoneQueryExecutable
​
query object
fromDate
â–¸
fromDate
(
date
: ConvertableToDate):
RedstoneQueryForSingleSymbol
​
Configures query to fetch the price in a time range. It is important to use fromDate with toDate query methods
Parameters:
Name
Type
Description
date
ConvertableToDate
Start date/time for the time range
Returns:
RedstoneQueryForSingleSymbol
​
query object
getExecutableQuery
â–¸
Protected
getExecutableQuery
(
update
:
any
):
RedstoneQueryExecutable
​
Type parameters:
Name
T
Parameters:
Name
Type
update
any
Returns:
RedstoneQueryExecutable
​
Inherited from:
RedstoneQueryForSingleOrSeveralSymbols
​
hoursAgo
â–¸
hoursAgo
(
hoursCount
:
number
):
RedstoneQueryExecutable
​
Configures query to fetch the price for X hours ago.
Parameters:
Name
Type
Description
hoursCount
number
Number of hours ago
Returns:
RedstoneQueryExecutable
​
query object
Inherited from:
RedstoneQueryForSingleOrSeveralSymbols
​
latest
â–¸
latest
():
RedstoneQueryExecutable
​
Configures query to fetch the latest price/prices It doesn't support any params
Returns:
RedstoneQueryExecutable
​
query object
Inherited from:
RedstoneQueryForSingleOrSeveralSymbols
​
toDate
â–¸
toDate
(
date
: ConvertableToDate):
RedstoneQueryExecutable
​
Configures query to fetch the price in a time range. toDate method should go after the fromDate
Parameters:
Name
Type
Description
date
ConvertableToDate
End date/time for the time range
Returns:
RedstoneQueryExecutable
​
query object
Previous
RedstoneQueryForSeveralSymbols
Next
RedstoneQueryForSingleOrSeveralSymbols
Last modified
11mo ago
Copy link
Contents
Class: RedstoneQueryForSingleSymbol
Hierarchy
Table of contents
Constructors
Properties
Methods