trades() retrieves data regarding individual trades that have been executed on the exchange.

  symbol = "XBTUSD",
  count = 1000,
  reverse = "true",
  filter = NULL,
  columns = NULL,
  start = NULL,
  startTime = NULL,
  endTime = NULL,
  use_auth = FALSE



a character string for the instrument symbol. Use available_symbols() to see available symbols.


an optional integer to specify the number of rows to return. Maximum of 1000 (the default) per request.


an optional character string. Either "true" of "false". If "true", result will be ordered with starting with the newest (defaults to "true").


an optional character string for table filtering. Send JSON key/value pairs, such as "{'key':'value'}". See examples.


an optional character vector of column names to return. If NULL, all columns will be returned.


an optional integer. Can be used to specify the starting point for results.


an optional character string. Starting date for results in the format "yyyy-mm-dd" or "yyyy-mm-dd hh-mm-ss".


an optional character string. Ending date for results in the format "yyyy-mm-dd" or "yyyy-mm-dd hh-mm-ss".


logical. Use TRUE to enable authentication with API key.


trades() returns a data.frame containing:

  • timestamp: POSIXct. Date and time of trade.

  • symbol: character. The instrument ticker.

  • side: character. Whether the trade was buy or sell.

  • size: numeric. Size of the trade.

  • price: numeric. Price the trade was executed at

  • tickDirection: character. Indicates if the trade price was higher, lower or the same as the previous trade price.

  • trdMatchID: character. Unique trade ID.

  • grossValue: numeric. How many satoshi were exchanged. 1 satoshi = 0.00000001 BTC.

  • homeNotional: numeric. BTC value of the trade.

  • foreignNotional: numeric. USD value of the trade.



if (FALSE) { # Return 1000 most recent trades for symbol "XBTUSD". trades(symbol = "XBTUSD", count = 10) # Use filter for very specific values: Return trade data executed at 12:15. trades( symbol = "XBTUSD", filter = "{'timestamp.minute':'12:15'}", count = 10 ) # Also possible to combine more than one filter. trades( symbol = "XBTUSD", filter = "{'timestamp.minute':'12:15', 'size':10000}", count = 10 ) }