tn_bucket_trades()
retrieves open high low close (OHLC) data for the specified symbol/time frame.
tn_bucket_trades( binSize = "1m", partial = "false", symbol = "XBTUSD", count = 1000, reverse = "true", filter = NULL, columns = NULL, start = NULL, startTime = NULL, endTime = NULL, use_auth = FALSE )
binSize | character string.
The time interval to bucket by, must be one of: |
---|---|
partial | character string. Either |
symbol | a character string for the instrument symbol.
Use |
count | an optional integer to specify the number of rows to return. Maximum of 1000 (the default) per request. |
reverse | an optional character string. Either |
filter | an optional character string for table filtering.
Send JSON key/value pairs, such as |
columns | an optional character vector of column names to return.
If |
start | an optional integer. Can be used to specify the starting point for results. |
startTime | an optional character string.
Starting date for results in the format |
endTime | an optional character string.
Ending date for results in the format |
use_auth | logical. Use |
The API will only return 1000 rows per call. If the desired time frame requires more than one API call,
consider using tn_map_bucket_trades()
.
if (FALSE) { # Return most recent data for symbol `"ETHUSD"` for 1 hour buckets tn_bucket_trades( binSize = "1h", symbol = "ETHUSD", count = 10 ) }