Skip to contents

Class that implements the API methods for the Binance Coin-M Futures API.

Super classes

binance::Binance -> binance::BinanceFutures -> BinanceFuturesCoinM

Methods

Inherited methods


Method new()

Usage

BinanceFuturesCoinM$new(testnet = FALSE)

Arguments

testnet

(logical) whether to use the testnet. Default is FALSE. Old Trades Lookup

Get older market historical trades.


Method old_trade_lookup()

Usage

BinanceFuturesCoinM$old_trade_lookup(symbol, limit = 500, from_id = NULL)

Arguments

symbol

(character) the trading symbol.

limit

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

from_id

(numeric) trade id to fetch from. 24hr Ticker Price Change Statistics

24 hour rolling window price change statistics. Careful when accessing this with no symbol.


Method ticker_stats_24hr()

Usage

BinanceFuturesCoinM$ticker_stats_24hr(symbol)

Arguments

symbol

(character) the trading symbol.

Returns

(tibble) a tibble with the 24 hour ticker price change statistics. Index Price and Mark Price

Get the index price and mark price for a specific symbol.


Method index_and_mark_price()

Usage

BinanceFuturesCoinM$index_and_mark_price(symbol = NULL, pair = NULL)

Arguments

symbol

(character) the trading symbol.

pair

(character) the trading pair.

Returns

(tibble) a tibble with the index and mark price data. Get Funding Rate Info

Query funding rate info for symbols that had FundingRateCap/ FundingRateFloor / fundingIntervalHours adjustment


Method funding_rate()

Usage

BinanceFuturesCoinM$funding_rate(
  symbol,
  start_time = NULL,
  end_time = NULL,
  limit = 100
)

Arguments

symbol

(character) the trading symbol.

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 100; max is 1000.

Returns

(tibble) a tibble with the funding rate info. Open Interest Statistics

Get open interest statistics for a specific pair.


Method open_interest_stats()

Usage

BinanceFuturesCoinM$open_interest_stats(
  pair,
  contract_type,
  period,
  limit = 30,
  start_time = NULL,
  end_time = NULL
)

Arguments

pair

(character) the trading pair.

contract_type

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

period

(character) the period for the open interest statistics. 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 open interest statistics in epoch milliseconds.

end_time

(numeric) the end time for the open interest statistics in epoch milliseconds.

Returns

(tibble) a tibble with the open interest statistics. Top Trader Long/Short Ratio (Accounts)

Get top trader long/short ratio (accounts) for a specific pair.


Method top_ls_ratio_accounts()

Usage

BinanceFuturesCoinM$top_ls_ratio_accounts(
  pair,
  period,
  limit = 30,
  start_time = NULL,
  end_time = NULL
)

Arguments

pair

(character) the trading pair.

period

(character) the period for the top trader long/short ratio. 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 top trader long/short ratio in epoch milliseconds.

end_time

(numeric) the end time for the top trader long/short ratio in epoch milliseconds.

Returns

(tibble) a tibble with the top trader long/short ratio (accounts) data. Top Trader Long/Short Ratio (Positions)

Get top trader long/short ratio (positions) for a specific pair.


Method top_ls_ratio_positions()

Usage

BinanceFuturesCoinM$top_ls_ratio_positions(
  pair,
  period,
  limit = 30,
  start_time = NULL,
  end_time = NULL
)

Arguments

pair

(character) the trading pair.

period

(character) the period for the top trader long/short ratio. 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 top trader long/short ratio in epoch milliseconds.

end_time

(numeric) the end time for the top trader long/short ratio in epoch milliseconds.

Returns

(tibble) a tibble with the top trader long/short ratio (accounts) data. Long/Short Ratio

Get long/short ratio for a specific pair.


Method ls_ratio()

Usage

BinanceFuturesCoinM$ls_ratio(
  pair,
  period,
  limit = 30,
  start_time = NULL,
  end_time = NULL
)

Arguments

pair

(character) the trading pair.

period

(character) the period for the top trader long/short ratio. 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 top trader long/short ratio in epoch milliseconds.

end_time

(numeric) the end time for the top trader long/short ratio in epoch milliseconds.

Returns

(tibble) a tibble with the top trader long/short ratio (accounts) data. Taker Buy/Sell Volume

Get taker buy/sell volume for a specific pair.


Method taker_buy_sell_volume()

Usage

BinanceFuturesCoinM$taker_buy_sell_volume(
  pair,
  contract_type,
  period,
  limit = 30,
  start_time = NULL,
  end_time = NULL
)

Arguments

pair

(character) the trading pair.

contract_type

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

period

(character) the period for the top trader long/short ratio. 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 top trader long/short ratio in epoch milliseconds.

end_time

(numeric) the end time for the top trader long/short ratio in epoch milliseconds.

Returns

(tibble) a tibble with the top trader long/short ratio (accounts) data.


Method clone()

The objects of this class are cloneable with this method.

Usage

BinanceFuturesCoinM$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.