Market pair candle
Candles (also called OHLCV) are a summary, on a specific time frame, of a market (specific to an exchange).
Get the latest candles of a time frame from the current timestamp or the one you specify. The list is ordered from the latest to the oldest candle.
https://api.koinju.io/candles/:exchange/:market/:time_frame/:timestamp
Parameter | Format | Description |
exchange (required) | string | The name of the exchange of which you wish to get the candle. The exchange list can be found here https://api.koinju.io/exchanges |
market (required) | string | The name of the market of which you wish to get the market list. The market list of a specific exchange can be found here https://api.koinju.io/markets |
time_frame (optional) | string | Time frame of the candles chosen between all available : '15s', '1m', '5m', '15m', '30m', '1h', '2h', '4h', '8h', '1d'. Default is '15s' |
timestamp (optional) | number | Unix timestamp (in nanoseconds) from which you want the candles. Default is the current timestamp. |
Variable | Format | Description |
count | number | The number of tickers. |
payload | object | The list of ticker objects. |
payload
variablesVariable | Format | Description |
exchange | string | Exchange name. |
market | string | Market name. |
time_frame | string | Timeframe name. |
open | string | First price value registered within the timeframe. |
high | string | Highest price value registered within the timeframe. |
low | string | Lowest price value registered within the timeframe. |
close | string | Last price value registered within the timeframe. |
vwap | object | Volume weighed average price value. |
twap | object | Time weighted average price value. |
timestamp | number | Timestamp of the candle. |
volume | string | Total volume exchange within the timeframe. |
number_of_trades | number | Number of trades within the timeframe. |
twap
variablesVariable | Format | Description |
multiplier | string | Sum of the prices of every trade multiplied by the number of occurrences in the timeframe. |
evaluated_segments | string | Number of occurrences in the timeframe. |
twap | string | Time weighted average price. |
vwap
variablesVariable | Format | Description |
multiplier | string | Sum of prices multiplied by the volume of every trade. |
divider | string | Sum of the volumes of every trade. |
vwap | string | Volume weighted average price. |
200 : OK
Server is happy to server you :-)
Here is you example :
{
"count": 2,
"payload": [
{
"exchange": "kraken",
"market": "BTC-USD",
"time_frame": "1d",
"open": "10676.40000",
"close": "10799.00000",
"low": "10632",
"high": "10799",
"vwap": {
"multiplier": "24371541.001814825",
"divider": "2273.92917894",
"vwap": "10717.81004770592884100651"
},
"twap": {
"multiplier": "128504.95",
"evaluated_segment": "12",
"twap": "10708.74583333333333333333"
},
"timestamp": 1601856000000000000,
"volume": "2273.92917894",
"number_of_trades": "9493",
"hash": "167f72fa4d8a76b07fb07b632eea79261fed885e"
},
{
"exchange": "kraken",
"market": "BTC-USD",
"time_frame": "1d",
"open": "10553.00000",
"close": "10676.40000",
"low": "10531.2",
"high": "10690",
"vwap": {
"multiplier": "13111377.867515379",
"divider": "1234.25174381",
"vwap": "10622.93647407942162087404"
},
"twap": {
"multiplier": "127315.15",
"evaluated_segment": "12",
"twap": "10609.59583333333333333333"
},
"timestamp": 1601769600000000000,
"volume": "1234.25174381",
"number_of_trades": "5796",
"hash": "a98a830acc8dcec71a2b4aa7c07f5fcc064638e8"
}
]
}