tn_trades()
retrieves data regarding individual trades that have been executed on the
testnet exchange.
tn_trades( symbol = "XBTUSD", count = 1000, reverse = "true", filter = NULL, columns = NULL, start = NULL, startTime = NULL, endTime = NULL, use_auth = FALSE )
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 |
https://testnet.bitmex.com/api/explorer/#!/Trade/Trade_get
if (FALSE) { # Return 1000 most recent trades for symbol "XBTUSD". tn_trades(symbol = "XBTUSD") # Use filter for very specific values: Return trade data executed at 12:15. tn_trades( symbol = "XBTUSD", filter = "{'timestamp.minute':'12:15'}" ) # Also possible to combine more than one filter. tn_trades( symbol = "XBTUSD", filter = "{'timestamp.minute':'12:15', 'size':10000}" ) }