binance_last_trades

Get the most recent 1000 trades for a specified trading pair.

  • Github function here.

Example: Spot (spot)

Show the code
library(binancer)
trades <- binance_last_trades("BTCUSDT", api = "spot") 

df_trades <- head(trades, n = 5)

Example: USD-m (fapi)

Show the code
library(binancer)
trades <- binance_last_trades("BTCUSDT", api = "fapi") 

df_trades <- head(trades, n = 5)

Example: COIN-m (fapi)

Show the code
library(binancer)
trades <- binance_last_trades("BTCUSD_PERP", api = "dapi") 

df_trades <- head(trades, n = 5)

Example: Options (eapi)

Show the code
library(binancer)
trades <- binance_last_trades("BTC-240628-30000-P", api = "eapi") 

df_trades <- head(trades, n = 5)
Back to top

Citation

BibTeX citation:
@online{sartini2024,
  author = {Sartini, Beniamino},
  date = {2024-06-18},
  url = {https://cryptoverser.org/binancer-docs/binance_last_trades.html},
  langid = {en}
}
For attribution, please cite this work as:
Sartini, Beniamino. 2024. June 18, 2024. https://cryptoverser.org/binancer-docs/binance_last_trades.html.