Skip to contents

Class that encapsulates the common API methods for both USDT-M and Coin-M futures.

Super class

binance::Binance -> BinanceFutures

Methods

Inherited methods


Method new()

Usage

BinanceFutures$new(profile)

Arguments

profile

(string) the name of the configuration to read the API configurations. Compressed/Aggregate Trades List

Get compressed, aggregate market trades. Market trades that fill in 100ms with the same price and the same taking side will have the quantity aggregated.


Method aggregate_trades()

Usage

BinanceFutures$aggregate_trades(
  symbol,
  from_id = NULL,
  start_time = NULL,
  end_time = NULL,
  limit = 500
)

Arguments

symbol

(character) the trading symbol.

from_id

(numeric) trade id to fetch from.

start_time

(numeric) the start time for the klines in epoch milliseconds.

end_time

(numeric) the end time for the klines in epoch milliseconds.

limit

(integer) the number of results to return. Default is 500; max is 1000.

Returns

(tibble) a tibble with the aggregate trades data. Continuous Contract Kline/Candlestick Data

Kline/candlestick bars for a specific contract type. Klines are uniquely identified by their open time.


Method continuous_kline()

Usage

BinanceFutures$continuous_kline(
  pair,
  contract_type,
  interval,
  start_time = NULL,
  end_time = NULL,
  limit = 500
)

Arguments

pair

(character) the trading pair.

contract_type

(character) the contract type.

interval

(character) the interval for the klines.

start_time

(numeric) the start time for the klines in epoch milliseconds.

end_time

(numeric) the end time for the klines in epoch milliseconds.

limit

(integer) the number of results to return. Default is 500; max is 1500.

Returns

(tibble) a tibble with the kline data. Index Price Kline/Candlestick Data

Kline/candlestick bars for a specific contract type. Klines are uniquely identified by their open time.


Method index_price_klines()

Usage

BinanceFutures$index_price_klines(
  pair,
  interval,
  start_time = NULL,
  end_time = NULL,
  limit = 500
)

Arguments

pair

(character) the trading pair.

interval

(character) the interval for the klines.

start_time

(numeric) the start time for the klines in epoch milliseconds.

end_time

(numeric) the end time for the klines in epoch milliseconds.

limit

(integer) the number of results to return. Default is 500; max is 1500.

Returns

(tibble) a tibble with the kline data. Mark Price Kline/Candlestick Data

Kline/candlestick bars for a specific contract type. Klines are uniquely identified by their open time.


Method mark_price_klines()

Usage

BinanceFutures$mark_price_klines(
  symbol,
  interval,
  start_time = NULL,
  end_time = NULL,
  limit = 500
)

Arguments

symbol

(character) the trading symbol.

interval

(character) the interval for the klines.

start_time

(numeric) the start time for the klines in epoch milliseconds.

end_time

(numeric) the end time for the klines in epoch milliseconds.

limit

(integer) the number of results to return. Default is 500; max is 1500.

Returns

(tibble) a tibble with the kline data. Premium index Kline Data

Kline/candlestick bars for a specific contract type. Klines are uniquely identified by their open time.


Method premium_index_klines()

Usage

BinanceFutures$premium_index_klines(
  symbol,
  interval,
  start_time = NULL,
  end_time = NULL,
  limit = 500
)

Arguments

symbol

(character) the trading symbol.

interval

(character) the interval for the klines.

start_time

(numeric) the start time for the klines in epoch milliseconds.

end_time

(numeric) the end time for the klines in epoch milliseconds.

limit

(integer) the number of results to return. Default is 500; max is 1500.

Returns

(tibble) a tibble with the kline data. Symbol Order Book Ticker

Best price/qty on the order book for a symbol or symbols.


Method order_book_ticker()

Usage

BinanceFutures$order_book_ticker(symbol = NULL)

Arguments

symbol

(character) the trading symbol.

Returns

(tibble) a tibble with the price ticker data. Open Interest

Get present open interest of a specific symbol.


Method open_interest()

Usage

BinanceFutures$open_interest(symbol)

Arguments

symbol

(character) the trading symbol.

Returns

(tibble) a tibble with the open interest data. Quarterly Contract Settlement Price

Get the quarterly settlement price for a specific pair.


Method quarterly_settlement_price()

Usage

BinanceFutures$quarterly_settlement_price(pair)

Arguments

pair

(character) the trading pair.

Returns

(tibble) a tibble with the settlement price data. Open Interest Statistics

Get open interest statistics for a specific pair.


Method index_constituents()

Usage

BinanceFutures$index_constituents(symbol)

Arguments

symbol

(character) the trading symbol.

Returns

(tibble) a tibble with the open interest statistics. Basis

Get basis data for a specific pair.


Method basis()

Usage

BinanceFutures$basis(
  pair,
  contract_type,
  period,
  limit = 30,
  start_time = NULL,
  end_time = NULL
)

Arguments

pair

(character) the trading pair.

contract_type

(character) the contract type. Ppossible values: "CURRENT_QUARTER", "NEXT_QUARTER", "PERPETUAL"

period

(character) the period for the basis. Possible values: "5m", "15m", "30m", "1h", "2h", "4h", "6h", "12h", "1d"

limit

(integer) the number of results to return. Default is 30; max is 500.

start_time

(numeric) the start time for the basis in epoch milliseconds.

end_time

(numeric) the end time for the basis in epoch milliseconds.

Returns

(tibble) a tibble with the basis data.


Method clone()

The objects of this class are cloneable with this method.

Usage

BinanceFutures$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.