public_trades: GET recent trades

Description Usage Arguments Examples

View source: R/public_trades.R

Description

GET recent trades

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
public_trades(
  exchange = "binance",
  base_asset = "BTC",
  quote_asset = "USD",
  dry_run = FALSE,
  ...,
  limit = NULL,
  time_frame = NULL,
  start_time = NULL,
  end_time = NULL
)

Arguments

exchange

Which exchange to use for price and market data. Choices are "binance", "binance-us", "bittrex", bitstamp", "coinbase", "coinbase-pro", "crypto.com", "ftx", "ftx-us", "gemini", "huobi", "kraken", "kucoin", and "poloniex".

base_asset

Base asset (default BTC)

quote_asset

Quote asset (default USD)

dry_run

If TRUE, call httr2::req_dry_run, which shows the API call without actually sending it.

...

Query parameters passed to API call

limit

Parameter used to limit number of trades.

  • Optional for "binance" and "binance-us". Default: 500; Maximum: 1000.

  • Optional for "coinbase-pro". Default: 1000; Maximum: 1000.

  • Optional for "gemini". Default: 50; Maximum: 500.

  • Optional for "huobi". Default: 1; Maximum: 2000.

time_frame

Parameter used for trade interval and timeframe.

  • Optional for "bitstamp". The time interval from which we want the transactions to be returned. Default: "day". Possible options are "minute", "hour", or "day".

start_time

Parameter used for trade beginning time.

  • Optional for "ftx" and "ftx-us".

  • Optional for "gemini". Only return trades after this timestamp. If not present, will show the most recent trades.

  • Optional for "kraken".

  • Optional for "poloniex". Return up to 1,000 trades between a range specified in UNIX timestamps.

end_time

Parameter used for trade end time.

  • Optional for "ftx" and "ftx-us".

  • Optional for "poloniex". Return up to 1,000 trades between a range specified in UNIX timestamps.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
public_trades("binance")
public_trades("binance-us")
public_trades("bitstamp")
public_trades("bittrex")
public_trades("coinbase-pro")
public_trades("crypto.com")
public_trades("ftx")
public_trades("ftx-us")
public_trades("gemini")
public_trades("huobi")
public_trades("kraken")
public_trades("kucoin")
public_trades("poloniex")

cstjohn810/cryptoapi documentation built on Feb. 6, 2022, 4:50 a.m.