| Title: | 'Binance' REST API Client |
|---|---|
| Description: | Client for the 'Binance' <https://www.binance.com/> Spot, Futures, and Options REST APIs. Provides helper functions for signed and unsigned requests, market data retrieval, account access, and order management with 'data.table' output by default. |
| Authors: | Oliver Zhou [aut, cre], Lily Li [aut] |
| Maintainer: | Oliver Zhou <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.1 |
| Built: | 2026-05-18 21:14:30 UTC |
| Source: | https://github.com/cran/binxr |
Backward-compatible futures config constructor
binxr_config_futures( api_key = Sys.getenv("BINX_API_KEY", unset = ""), secret_key = Sys.getenv("BINX_SECRET_KEY", unset = ""), base = "https://fapi.binance.com", recvWindow = 10000L )binxr_config_futures( api_key = Sys.getenv("BINX_API_KEY", unset = ""), secret_key = Sys.getenv("BINX_SECRET_KEY", unset = ""), base = "https://fapi.binance.com", recvWindow = 10000L )
api_key |
character API key. Leave |
secret_key |
character Secret key. Leave |
base |
Legacy alias for |
recvWindow |
Legacy alias for |
A binxr_config list.
Backward-compatible options config constructor
binxr_config_options( api_key = Sys.getenv("BINX_API_KEY", unset = ""), secret_key = Sys.getenv("BINX_SECRET_KEY", unset = ""), base = "https://eapi.binance.com", recvWindow = 10000L )binxr_config_options( api_key = Sys.getenv("BINX_API_KEY", unset = ""), secret_key = Sys.getenv("BINX_SECRET_KEY", unset = ""), base = "https://eapi.binance.com", recvWindow = 10000L )
api_key |
character API key. Leave |
secret_key |
character Secret key. Leave |
base |
Legacy alias for |
recvWindow |
Legacy alias for |
A binxr_config list.
Backward-compatible spot config constructor
binxr_config_spot( api_key = Sys.getenv("BINX_API_KEY", unset = ""), secret_key = Sys.getenv("BINX_SECRET_KEY", unset = ""), base = "https://api.binance.com", recvWindow = 10000L )binxr_config_spot( api_key = Sys.getenv("BINX_API_KEY", unset = ""), secret_key = Sys.getenv("BINX_SECRET_KEY", unset = ""), base = "https://api.binance.com", recvWindow = 10000L )
api_key |
character API key. Leave |
secret_key |
character Secret key. Leave |
base |
Legacy alias for |
recvWindow |
Legacy alias for |
A binxr_config list.
(Optional) Coerce account to data.frames
coerce_account_frames(account)coerce_account_frames(account)
account |
get_account() result |
list(assets=..., positions=...)
account <- list( assets = list(list(asset = "USDT", walletBalance = "10")), positions = list(list(symbol = "ETHUSDT", positionAmt = "0")) ) coerce_account_frames(account)account <- list( assets = list(list(asset = "USDT", walletBalance = "10")), positions = list(list(symbol = "ETHUSDT", positionAmt = "0")) ) coerce_account_frames(account)
Create a Binance futures configuration
config_futures( api_key = Sys.getenv("BINX_API_KEY", unset = ""), secret_key = Sys.getenv("BINX_SECRET_KEY", unset = ""), base_url = "https://fapi.binance.com", recv_window = 10000L, timeout = 30, verbose = FALSE )config_futures( api_key = Sys.getenv("BINX_API_KEY", unset = ""), secret_key = Sys.getenv("BINX_SECRET_KEY", unset = ""), base_url = "https://fapi.binance.com", recv_window = 10000L, timeout = 30, verbose = FALSE )
api_key |
character API key. Leave |
secret_key |
character Secret key. Leave |
base_url |
character Base URL for the Binance Futures API. |
recv_window |
integer recvWindow in milliseconds used for signed requests. |
timeout |
numeric request timeout in seconds. |
verbose |
logical whether to enable verbose request debugging in future helpers. |
A binxr_config list.
cfg <- config_futures(api_key = NULL, secret_key = NULL) cfg$productcfg <- config_futures(api_key = NULL, secret_key = NULL) cfg$product
Create a Binance options configuration
config_options( api_key = Sys.getenv("BINX_API_KEY", unset = ""), secret_key = Sys.getenv("BINX_SECRET_KEY", unset = ""), base_url = "https://eapi.binance.com", recv_window = 10000L, timeout = 30, verbose = FALSE )config_options( api_key = Sys.getenv("BINX_API_KEY", unset = ""), secret_key = Sys.getenv("BINX_SECRET_KEY", unset = ""), base_url = "https://eapi.binance.com", recv_window = 10000L, timeout = 30, verbose = FALSE )
api_key |
character API key. Leave |
secret_key |
character Secret key. Leave |
base_url |
character Base URL for the Binance Options API. |
recv_window |
integer recvWindow in milliseconds used for signed requests. |
timeout |
numeric request timeout in seconds. |
verbose |
logical whether to enable verbose request debugging in future helpers. |
A binxr_config list.
cfg <- config_options(api_key = NULL, secret_key = NULL) cfg$productcfg <- config_options(api_key = NULL, secret_key = NULL) cfg$product
Create a Binance spot configuration
config_spot( api_key = Sys.getenv("BINX_API_KEY", unset = ""), secret_key = Sys.getenv("BINX_SECRET_KEY", unset = ""), base_url = "https://api.binance.com", recv_window = 10000L, timeout = 30, verbose = FALSE )config_spot( api_key = Sys.getenv("BINX_API_KEY", unset = ""), secret_key = Sys.getenv("BINX_SECRET_KEY", unset = ""), base_url = "https://api.binance.com", recv_window = 10000L, timeout = 30, verbose = FALSE )
api_key |
character API key. Leave |
secret_key |
character Secret key. Leave |
base_url |
character Base URL for the Binance Spot API. |
recv_window |
integer recvWindow in milliseconds used for signed requests. |
timeout |
numeric request timeout in seconds. |
verbose |
logical whether to enable verbose request debugging in future helpers. |
A binxr_config list.
cfg <- config_spot(api_key = NULL, secret_key = NULL) cfg$productcfg <- config_spot(api_key = NULL, secret_key = NULL) cfg$product
Cancel all open Binance Futures orders for a symbol
futures_cancel_all_orders(symbol, config = config_futures()) cancel_fapi_trade_orders_all(symbol, config = binxr_config_futures())futures_cancel_all_orders(symbol, config = config_futures()) cancel_fapi_trade_orders_all(symbol, config = binxr_config_futures())
symbol |
Trading pair symbol, for example |
config |
A futures configuration created by |
A parsed list.
Cancel a Binance Futures order
futures_cancel_order( symbol, order_id = NULL, orig_client_order_id = NULL, config = config_futures() ) cancel_fapi_trade_order( symbol, orderId = NULL, origClientOrderId = NULL, config = binxr_config_futures() )futures_cancel_order( symbol, order_id = NULL, orig_client_order_id = NULL, config = config_futures() ) cancel_fapi_trade_order( symbol, orderId = NULL, origClientOrderId = NULL, config = binxr_config_futures() )
symbol |
Trading pair symbol, for example |
order_id |
Optional exchange order ID. |
orig_client_order_id |
Optional client order ID. |
config |
A futures configuration created by |
orderId |
Legacy alias for |
origClientOrderId |
Legacy alias for |
A parsed list.
Set Binance Futures countdown cancel-all
futures_countdown_cancel_all(symbol, countdown_time, config = config_futures())futures_countdown_cancel_all(symbol, countdown_time, config = config_futures())
symbol |
Trading pair symbol, for example |
countdown_time |
Countdown time in milliseconds. |
config |
A futures configuration created by |
A parsed list.
Get Binance Futures 24hr ticker statistics
futures_get_24hr_ticker(symbol = NULL, config = config_futures())futures_get_24hr_ticker(symbol = NULL, config = config_futures())
symbol |
Optional trading pair symbol. |
config |
A futures configuration created by |
A parsed list.
Get Binance Futures account info
futures_get_account(config = config_futures()) get_fapi_account(config = binxr_config_futures())futures_get_account(config = config_futures()) get_fapi_account(config = binxr_config_futures())
config |
A futures configuration created by |
A parsed list.
Get Binance Futures account summary
futures_get_account_summary( acc = NULL, json_list = FALSE, config = config_futures() ) get_fapi_account_summary(acc = NULL, config = binxr_config_futures())futures_get_account_summary( acc = NULL, json_list = FALSE, config = config_futures() ) get_fapi_account_summary(acc = NULL, config = binxr_config_futures())
acc |
Optional account payload from |
json_list |
If |
config |
A futures configuration created by |
A one-row data.table by default, or a parsed list when
json_list = TRUE.
Get Binance Futures account trades
futures_get_account_trades( symbol, order_id = NULL, startTime = NULL, endTime = NULL, fromId = NULL, limit = 500, json_list = FALSE, config = config_futures() )futures_get_account_trades( symbol, order_id = NULL, startTime = NULL, endTime = NULL, fromId = NULL, limit = 500, json_list = FALSE, config = config_futures() )
symbol |
Trading pair symbol, for example |
order_id |
Optional order ID. |
startTime |
Optional start time in milliseconds since Unix epoch. |
endTime |
Optional end time in milliseconds since Unix epoch. |
fromId |
Optional trade ID to start from. |
limit |
Maximum number of rows to return. Must not exceed |
json_list |
If |
config |
A futures configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Futures aggregate trades
futures_get_aggregate_trades( symbol, fromId = NULL, startTime = NULL, endTime = NULL, limit = 500, json_list = FALSE, config = config_futures() )futures_get_aggregate_trades( symbol, fromId = NULL, startTime = NULL, endTime = NULL, limit = 500, json_list = FALSE, config = config_futures() )
symbol |
Trading pair symbol, for example |
fromId |
Optional aggregate trade ID. |
startTime |
Optional start time in milliseconds since Unix epoch. |
endTime |
Optional end time in milliseconds since Unix epoch. |
limit |
Maximum number of trades to return. Must not exceed |
json_list |
If |
config |
A futures configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Futures balances
futures_get_balance(json_list = FALSE, config = config_futures())futures_get_balance(json_list = FALSE, config = config_futures())
json_list |
If |
config |
A futures configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Futures order book ticker
futures_get_book_ticker(symbol = NULL, config = config_futures())futures_get_book_ticker(symbol = NULL, config = config_futures())
symbol |
Optional trading pair symbol. |
config |
A futures configuration created by |
A parsed list.
Get Binance Futures commission rate
futures_get_commission_rate(symbol, config = config_futures())futures_get_commission_rate(symbol, config = config_futures())
symbol |
Trading pair symbol, for example |
config |
A futures configuration created by |
A parsed list.
Get Binance Futures continuous contract klines
futures_get_continuous_klines( pair, contract_type = c("PERPETUAL", "CURRENT_MONTH", "NEXT_MONTH", "CURRENT_QUARTER", "NEXT_QUARTER"), interval, startTime = NULL, endTime = NULL, limit = 500, json_list = FALSE, config = config_futures() )futures_get_continuous_klines( pair, contract_type = c("PERPETUAL", "CURRENT_MONTH", "NEXT_MONTH", "CURRENT_QUARTER", "NEXT_QUARTER"), interval, startTime = NULL, endTime = NULL, limit = 500, json_list = FALSE, config = config_futures() )
pair |
Futures pair, for example |
contract_type |
One of |
interval |
Kline interval string. |
startTime |
Optional start time in milliseconds since Unix epoch. |
endTime |
Optional end time in milliseconds since Unix epoch. |
limit |
Maximum number of rows to return. Must not exceed |
json_list |
If |
config |
A futures configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Futures exchange info
futures_get_exchange_info(config = config_futures()) get_fapi_exchange_info(config = binxr_config_futures())futures_get_exchange_info(config = config_futures()) get_fapi_exchange_info(config = binxr_config_futures())
config |
A futures configuration created by |
A parsed list. Symbol and asset lists are named when present.
Get Binance Futures force orders
futures_get_force_orders( symbol = NULL, auto_close_type = NULL, startTime = NULL, endTime = NULL, limit = 50, json_list = FALSE, config = config_futures() )futures_get_force_orders( symbol = NULL, auto_close_type = NULL, startTime = NULL, endTime = NULL, limit = 50, json_list = FALSE, config = config_futures() )
symbol |
Optional trading pair symbol. |
auto_close_type |
Optional auto-close type. |
startTime |
Optional start time in milliseconds since Unix epoch. |
endTime |
Optional end time in milliseconds since Unix epoch. |
limit |
Maximum number of rows to return. Must not exceed |
json_list |
If |
config |
A futures configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Futures funding info
futures_get_funding_info( symbol = NULL, json_list = FALSE, config = config_futures() )futures_get_funding_info( symbol = NULL, json_list = FALSE, config = config_futures() )
symbol |
Optional trading pair symbol. |
json_list |
If |
config |
A futures configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Futures funding rate history
futures_get_funding_rate_history( symbol = NULL, startTime = NULL, endTime = NULL, limit = 100, json_list = FALSE, config = config_futures() )futures_get_funding_rate_history( symbol = NULL, startTime = NULL, endTime = NULL, limit = 100, json_list = FALSE, config = config_futures() )
symbol |
Optional trading pair symbol. |
startTime |
Optional start time in milliseconds since Unix epoch. |
endTime |
Optional end time in milliseconds since Unix epoch. |
limit |
Maximum number of rows to return. Must not exceed |
json_list |
If |
config |
A futures configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Futures index price klines
futures_get_index_price_klines( symbol, interval, startTime = NULL, endTime = NULL, limit = 500, json_list = FALSE, config = config_futures() )futures_get_index_price_klines( symbol, interval, startTime = NULL, endTime = NULL, limit = 500, json_list = FALSE, config = config_futures() )
symbol |
Trading pair symbol, for example |
interval |
Kline interval string. |
startTime |
Optional start time in milliseconds since Unix epoch. |
endTime |
Optional end time in milliseconds since Unix epoch. |
limit |
Maximum number of rows to return. |
json_list |
If |
config |
A futures configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Futures klines
futures_get_klines( symbol, interval, startTime = NULL, endTime = NULL, limit = 500, json_list = FALSE, config = config_futures() ) get_fapi_klines( symbol, interval, startTime = NULL, endTime = NULL, limit = 500, config = binxr_config_futures() )futures_get_klines( symbol, interval, startTime = NULL, endTime = NULL, limit = 500, json_list = FALSE, config = config_futures() ) get_fapi_klines( symbol, interval, startTime = NULL, endTime = NULL, limit = 500, config = binxr_config_futures() )
symbol |
Trading pair symbol, for example |
interval |
Kline interval string. |
startTime |
Optional start time in milliseconds since Unix epoch. |
endTime |
Optional end time in milliseconds since Unix epoch. |
limit |
Maximum number of rows to return. |
json_list |
If |
config |
A futures configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Futures mark price
futures_get_mark_price(symbol = NULL, config = config_futures()) get_fapi_mark_price(symbol = NULL, config = binxr_config_futures())futures_get_mark_price(symbol = NULL, config = config_futures()) get_fapi_mark_price(symbol = NULL, config = binxr_config_futures())
symbol |
Optional trading pair symbol such as |
config |
A futures configuration created by |
A parsed list.
Get Binance Futures mark price klines
futures_get_mark_price_klines( symbol, interval, startTime = NULL, endTime = NULL, limit = 500, json_list = FALSE, config = config_futures() )futures_get_mark_price_klines( symbol, interval, startTime = NULL, endTime = NULL, limit = 500, json_list = FALSE, config = config_futures() )
symbol |
Trading pair symbol, for example |
interval |
Kline interval string. |
startTime |
Optional start time in milliseconds since Unix epoch. |
endTime |
Optional end time in milliseconds since Unix epoch. |
limit |
Maximum number of rows to return. |
json_list |
If |
config |
A futures configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Futures multi-assets mode
futures_get_multi_assets_mode(config = config_futures())futures_get_multi_assets_mode(config = config_futures())
config |
A futures configuration created by |
A parsed list.
Get Binance Futures open interest
futures_get_open_interest(symbol, config = config_futures())futures_get_open_interest(symbol, config = config_futures())
symbol |
Trading pair symbol, for example |
config |
A futures configuration created by |
A parsed list.
Get Binance Futures open orders
futures_get_open_orders( symbol = NULL, json_list = FALSE, config = config_futures() ) get_fapi_trade_open_orders(symbol = NULL, config = binxr_config_futures())futures_get_open_orders( symbol = NULL, json_list = FALSE, config = config_futures() ) get_fapi_trade_open_orders(symbol = NULL, config = binxr_config_futures())
symbol |
Optional trading pair symbol. If |
json_list |
If |
config |
A futures configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get a Binance Futures order
futures_get_order( symbol, order_id = NULL, orig_client_order_id = NULL, config = config_futures() ) get_fapi_trade_order( symbol, orderId = NULL, origClientOrderId = NULL, config = binxr_config_futures() )futures_get_order( symbol, order_id = NULL, orig_client_order_id = NULL, config = config_futures() ) get_fapi_trade_order( symbol, orderId = NULL, origClientOrderId = NULL, config = binxr_config_futures() )
symbol |
Trading pair symbol, for example |
order_id |
Optional exchange order ID. |
orig_client_order_id |
Optional client order ID. |
config |
A futures configuration created by |
orderId |
Legacy alias for |
origClientOrderId |
Legacy alias for |
A parsed list.
Get Binance Futures order book
futures_get_order_book(symbol, limit = NULL, config = config_futures())futures_get_order_book(symbol, limit = NULL, config = config_futures())
symbol |
Trading pair symbol, for example |
limit |
Optional depth limit. One of |
config |
A futures configuration created by |
A parsed list.
Get Binance Futures order rate limits
futures_get_order_rate_limit(json_list = FALSE, config = config_futures())futures_get_order_rate_limit(json_list = FALSE, config = config_futures())
json_list |
If |
config |
A futures configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Futures order history
futures_get_orders( symbol, limit = 500, json_list = FALSE, config = config_futures() ) get_fapi_trade_orders(symbol, limit = 500, config = binxr_config_futures())futures_get_orders( symbol, limit = 500, json_list = FALSE, config = config_futures() ) get_fapi_trade_orders(symbol, limit = 500, config = binxr_config_futures())
symbol |
Trading pair symbol, for example |
limit |
Maximum number of orders to return. |
json_list |
If |
config |
A futures configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Futures position mode
futures_get_position_mode(config = config_futures())futures_get_position_mode(config = config_futures())
config |
A futures configuration created by |
A parsed list.
Get Binance Futures position risk
futures_get_position_risk(json_list = FALSE, config = config_futures()) get_fapi_account_position_risk(config = binxr_config_futures())futures_get_position_risk(json_list = FALSE, config = config_futures()) get_fapi_account_position_risk(config = binxr_config_futures())
json_list |
If |
config |
A futures configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get standardized Binance Futures positions
futures_get_positions(acc = NULL, json_list = FALSE, config = config_futures()) get_fapi_account_positions(acc = NULL, config = binxr_config_futures())futures_get_positions(acc = NULL, json_list = FALSE, config = config_futures()) get_fapi_account_positions(acc = NULL, config = binxr_config_futures())
acc |
Optional account payload from |
json_list |
If |
config |
A futures configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Futures recent trades
futures_get_recent_trades( symbol, limit = 500, json_list = FALSE, config = config_futures() )futures_get_recent_trades( symbol, limit = 500, json_list = FALSE, config = config_futures() )
symbol |
Trading pair symbol, for example |
limit |
Maximum number of trades to return. Must not exceed |
json_list |
If |
config |
A futures configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Futures server time
futures_get_server_time(config = config_futures()) get_fapi_system_time(config = binxr_config_futures())futures_get_server_time(config = config_futures()) get_fapi_system_time(config = binxr_config_futures())
config |
A futures configuration created by |
A POSIXct timestamp.
Get Binance Futures ticker price
futures_get_ticker_price( symbol = NULL, version = c("v2", "deprecated"), config = config_futures() )futures_get_ticker_price( symbol = NULL, version = c("v2", "deprecated"), config = config_futures() )
symbol |
Optional trading pair symbol. |
version |
One of |
config |
A futures configuration created by |
A parsed list.
Test Binance Futures connectivity
futures_ping(config = config_futures())futures_ping(config = config_futures())
config |
A futures configuration created by |
A parsed list.
Place a Binance Futures order
futures_place_order( symbol, side = c("BUY", "SELL"), type = c("LIMIT", "MARKET", "STOP", "STOP_MARKET", "TAKE_PROFIT", "TAKE_PROFIT_MARKET", "TRAILING_STOP_MARKET"), quantity, price = NULL, time_in_force = NULL, position_side = c("BOTH", "LONG", "SHORT"), reduce_only = FALSE, stop_price = NULL, working_type = NULL, new_client_order_id = NULL, config = config_futures() ) place_fapi_trade_order( symbol, side = c("BUY", "SELL"), type = c("LIMIT", "MARKET", "STOP", "STOP_MARKET", "TAKE_PROFIT", "TAKE_PROFIT_MARKET", "TRAILING_STOP_MARKET"), quantity, price = NULL, timeInForce = c("GTC", "IOC", "FOK", "GTX"), positionSide = c("BOTH", "LONG", "SHORT"), reduceOnly = FALSE, stopPrice = NULL, workingType = c("CONTRACT_PRICE", "MARK_PRICE"), newClientOrderId = NULL, config = binxr_config_futures() )futures_place_order( symbol, side = c("BUY", "SELL"), type = c("LIMIT", "MARKET", "STOP", "STOP_MARKET", "TAKE_PROFIT", "TAKE_PROFIT_MARKET", "TRAILING_STOP_MARKET"), quantity, price = NULL, time_in_force = NULL, position_side = c("BOTH", "LONG", "SHORT"), reduce_only = FALSE, stop_price = NULL, working_type = NULL, new_client_order_id = NULL, config = config_futures() ) place_fapi_trade_order( symbol, side = c("BUY", "SELL"), type = c("LIMIT", "MARKET", "STOP", "STOP_MARKET", "TAKE_PROFIT", "TAKE_PROFIT_MARKET", "TRAILING_STOP_MARKET"), quantity, price = NULL, timeInForce = c("GTC", "IOC", "FOK", "GTX"), positionSide = c("BOTH", "LONG", "SHORT"), reduceOnly = FALSE, stopPrice = NULL, workingType = c("CONTRACT_PRICE", "MARK_PRICE"), newClientOrderId = NULL, config = binxr_config_futures() )
symbol |
Trading pair symbol, for example |
side |
One of |
type |
Order type. |
quantity |
Order quantity. |
price |
Optional limit price. |
time_in_force |
Optional time-in-force value. Required for |
position_side |
One of |
reduce_only |
Whether the order is reduce-only. |
stop_price |
Optional trigger price for conditional orders. |
working_type |
Optional trigger source. Must only be supplied with
|
new_client_order_id |
Optional client order identifier. |
config |
A futures configuration created by |
timeInForce |
Legacy alias for |
positionSide |
Legacy alias for |
reduceOnly |
Legacy alias for |
stopPrice |
Legacy alias for |
workingType |
Legacy alias for |
newClientOrderId |
Legacy alias for |
A parsed list.
Set Binance Futures leverage
futures_set_leverage(symbol, leverage, config = config_futures()) set_fapi_account_leverage(symbol, leverage, config = binxr_config_futures())futures_set_leverage(symbol, leverage, config = config_futures()) set_fapi_account_leverage(symbol, leverage, config = binxr_config_futures())
symbol |
Trading pair symbol, for example |
leverage |
Desired leverage. |
config |
A futures configuration created by |
A parsed list.
Set Binance Futures margin type
futures_set_margin_type( symbol, margin_type = c("CROSSED", "ISOLATED"), config = config_futures() ) set_fapi_account_margin_type( symbol, marginType = c("CROSSED", "ISOLATED"), config = binxr_config_futures() )futures_set_margin_type( symbol, margin_type = c("CROSSED", "ISOLATED"), config = config_futures() ) set_fapi_account_margin_type( symbol, marginType = c("CROSSED", "ISOLATED"), config = binxr_config_futures() )
symbol |
Trading pair symbol, for example |
margin_type |
One of |
config |
A futures configuration created by |
marginType |
Legacy alias for |
A parsed list.
Set Binance Futures multi-assets mode
futures_set_multi_assets_mode( multi_assets_margin = TRUE, config = config_futures() )futures_set_multi_assets_mode( multi_assets_margin = TRUE, config = config_futures() )
multi_assets_margin |
|
config |
A futures configuration created by |
A parsed list.
Set Binance Futures position mode
futures_set_position_mode(dual_side_position = TRUE, config = config_futures()) set_fapi_account_position_side( dualSidePosition = TRUE, config = binxr_config_futures() )futures_set_position_mode(dual_side_position = TRUE, config = config_futures()) set_fapi_account_position_side( dualSidePosition = TRUE, config = binxr_config_futures() )
dual_side_position |
|
config |
A futures configuration created by |
dualSidePosition |
Legacy alias for |
A parsed list.
Test a Binance Futures order
futures_test_order( symbol, side = c("BUY", "SELL"), type = c("LIMIT", "MARKET", "STOP", "STOP_MARKET", "TAKE_PROFIT", "TAKE_PROFIT_MARKET", "TRAILING_STOP_MARKET"), quantity, price = NULL, time_in_force = NULL, position_side = c("BOTH", "LONG", "SHORT"), reduce_only = FALSE, stop_price = NULL, working_type = NULL, new_client_order_id = NULL, config = config_futures() )futures_test_order( symbol, side = c("BUY", "SELL"), type = c("LIMIT", "MARKET", "STOP", "STOP_MARKET", "TAKE_PROFIT", "TAKE_PROFIT_MARKET", "TRAILING_STOP_MARKET"), quantity, price = NULL, time_in_force = NULL, position_side = c("BOTH", "LONG", "SHORT"), reduce_only = FALSE, stop_price = NULL, working_type = NULL, new_client_order_id = NULL, config = config_futures() )
symbol |
Trading pair symbol, for example |
side |
One of |
type |
Order type. |
quantity |
Order quantity. |
price |
Optional limit price. |
time_in_force |
Optional time-in-force value. Required for |
position_side |
One of |
reduce_only |
Whether the order is reduce-only. |
stop_price |
Optional trigger price for conditional orders. |
working_type |
Optional trigger source. Must only be supplied with
|
new_client_order_id |
Optional client order identifier. |
config |
A futures configuration created by |
A parsed list.
Cancel all Binance Options orders for a symbol
options_cancel_all_orders(symbol, config = config_options())options_cancel_all_orders(symbol, config = config_options())
symbol |
Option symbol, for example |
config |
An options configuration created by |
A parsed list.
Cancel all Binance Options orders by underlying
options_cancel_all_orders_by_underlying(underlying, config = config_options())options_cancel_all_orders_by_underlying(underlying, config = config_options())
underlying |
Underlying symbol, for example |
config |
An options configuration created by |
A parsed list.
Cancel a Binance Options order
options_cancel_order( symbol, order_id = NULL, client_order_id = NULL, config = config_options() )options_cancel_order( symbol, order_id = NULL, client_order_id = NULL, config = config_options() )
symbol |
Option symbol, for example |
order_id |
Optional exchange order ID. |
client_order_id |
Optional client order ID. |
config |
An options configuration created by |
A parsed list.
Get Binance Options 24hr ticker statistics
options_get_24hr_ticker( symbol = NULL, json_list = FALSE, config = config_options() )options_get_24hr_ticker( symbol = NULL, json_list = FALSE, config = config_options() )
symbol |
Optional option symbol. |
json_list |
If |
config |
An options configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Options account trades
options_get_account_trades( symbol = NULL, fromId = NULL, startTime = NULL, endTime = NULL, limit = 100, json_list = FALSE, config = config_options() )options_get_account_trades( symbol = NULL, fromId = NULL, startTime = NULL, endTime = NULL, limit = 100, json_list = FALSE, config = config_options() )
symbol |
Optional option symbol. |
fromId |
Optional trade ID to start from. |
startTime |
Optional start time in milliseconds since Unix epoch. |
endTime |
Optional end time in milliseconds since Unix epoch. |
limit |
Maximum number of rows to return. Must not exceed |
json_list |
If |
config |
An options configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Options user commission
options_get_commission(config = config_options())options_get_commission(config = config_options())
config |
An options configuration created by |
A parsed list.
Get Binance Options exchange info
options_get_exchange_info(config = config_options())options_get_exchange_info(config = config_options())
config |
An options configuration created by |
A parsed list. Option symbol and asset lists are named when present.
Get Binance Options historical exercise records
options_get_exercise_history( underlying = NULL, startTime = NULL, endTime = NULL, limit = 100, json_list = FALSE, config = config_options() )options_get_exercise_history( underlying = NULL, startTime = NULL, endTime = NULL, limit = 100, json_list = FALSE, config = config_options() )
underlying |
Optional underlying symbol, for example |
startTime |
Optional start time in milliseconds since Unix epoch. |
endTime |
Optional end time in milliseconds since Unix epoch. |
limit |
Maximum number of rows to return. Must not exceed |
json_list |
If |
config |
An options configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Options exercise records
options_get_exercise_records( symbol = NULL, startTime = NULL, endTime = NULL, limit = 1000, json_list = FALSE, config = config_options() )options_get_exercise_records( symbol = NULL, startTime = NULL, endTime = NULL, limit = 1000, json_list = FALSE, config = config_options() )
symbol |
Optional option symbol. |
startTime |
Optional start time in milliseconds since Unix epoch. |
endTime |
Optional end time in milliseconds since Unix epoch. |
limit |
Maximum number of rows to return. Must not exceed |
json_list |
If |
config |
An options configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Options funding flow
options_get_funding_flow( currency = "USDT", recordId = NULL, startTime = NULL, endTime = NULL, limit = 100, json_list = FALSE, config = config_options() )options_get_funding_flow( currency = "USDT", recordId = NULL, startTime = NULL, endTime = NULL, limit = 100, json_list = FALSE, config = config_options() )
currency |
Asset type. Currently Binance supports |
recordId |
Optional record ID to start from. |
startTime |
Optional start time in milliseconds since Unix epoch. |
endTime |
Optional end time in milliseconds since Unix epoch. |
limit |
Maximum number of rows to return. Must not exceed |
json_list |
If |
config |
An options configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Options underlying index price
options_get_index_price(underlying, config = config_options())options_get_index_price(underlying, config = config_options())
underlying |
Underlying spot pair, for example |
config |
An options configuration created by |
A parsed list.
Get Binance Options klines
options_get_klines( symbol, interval, startTime = NULL, endTime = NULL, limit = 500, json_list = FALSE, config = config_options() )options_get_klines( symbol, interval, startTime = NULL, endTime = NULL, limit = 500, json_list = FALSE, config = config_options() )
symbol |
Option symbol, for example |
interval |
Kline interval string. |
startTime |
Optional start time in milliseconds since Unix epoch. |
endTime |
Optional end time in milliseconds since Unix epoch. |
limit |
Maximum number of rows to return. Must not exceed |
json_list |
If |
config |
An options configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Options margin account information
options_get_margin_account(config = config_options())options_get_margin_account(config = config_options())
config |
An options configuration created by |
A parsed list.
Get Binance Options mark prices
options_get_mark_price( symbol = NULL, json_list = FALSE, config = config_options() )options_get_mark_price( symbol = NULL, json_list = FALSE, config = config_options() )
symbol |
Optional option symbol. |
json_list |
If |
config |
An options configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Options open interest
options_get_open_interest( underlying_asset, expiration, json_list = FALSE, config = config_options() )options_get_open_interest( underlying_asset, expiration, json_list = FALSE, config = config_options() )
underlying_asset |
Underlying asset, for example |
expiration |
Expiration date, for example |
json_list |
If |
config |
An options configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Options open orders
options_get_open_orders( symbol = NULL, order_id = NULL, startTime = NULL, endTime = NULL, json_list = FALSE, config = config_options() )options_get_open_orders( symbol = NULL, order_id = NULL, startTime = NULL, endTime = NULL, json_list = FALSE, config = config_options() )
symbol |
Optional option symbol. |
order_id |
Optional order ID to start from. |
startTime |
Optional start time in milliseconds since Unix epoch. |
endTime |
Optional end time in milliseconds since Unix epoch. |
json_list |
If |
config |
An options configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get a Binance Options order
options_get_order( symbol, order_id = NULL, client_order_id = NULL, config = config_options() )options_get_order( symbol, order_id = NULL, client_order_id = NULL, config = config_options() )
symbol |
Option symbol, for example |
order_id |
Optional exchange order ID. |
client_order_id |
Optional client order ID. |
config |
An options configuration created by |
A parsed list.
Get Binance Options order book
options_get_order_book(symbol, limit = NULL, config = config_options())options_get_order_book(symbol, limit = NULL, config = config_options())
symbol |
Option symbol, for example |
limit |
Optional depth limit. One of |
config |
An options configuration created by |
A parsed list.
Get Binance Options order history
options_get_order_history( symbol, order_id = NULL, startTime = NULL, endTime = NULL, limit = 100, json_list = FALSE, config = config_options() )options_get_order_history( symbol, order_id = NULL, startTime = NULL, endTime = NULL, limit = 100, json_list = FALSE, config = config_options() )
symbol |
Option symbol, for example |
order_id |
Optional order ID to start from. |
startTime |
Optional start time in milliseconds since Unix epoch. |
endTime |
Optional end time in milliseconds since Unix epoch. |
limit |
Maximum number of rows to return. Must not exceed |
json_list |
If |
config |
An options configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Options positions
options_get_positions( symbol = NULL, json_list = FALSE, config = config_options() )options_get_positions( symbol = NULL, json_list = FALSE, config = config_options() )
symbol |
Optional option symbol. |
json_list |
If |
config |
An options configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Options recent block trades
options_get_recent_block_trades( symbol = NULL, limit = 100, json_list = FALSE, config = config_options() )options_get_recent_block_trades( symbol = NULL, limit = 100, json_list = FALSE, config = config_options() )
symbol |
Optional option symbol. |
limit |
Maximum number of trades to return. Must not exceed |
json_list |
If |
config |
An options configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Options recent trades
options_get_recent_trades( symbol, limit = 100, json_list = FALSE, config = config_options() )options_get_recent_trades( symbol, limit = 100, json_list = FALSE, config = config_options() )
symbol |
Option symbol, for example |
limit |
Maximum number of trades to return. Must not exceed |
json_list |
If |
config |
An options configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Options server time
options_get_server_time(config = config_options())options_get_server_time(config = config_options())
config |
An options configuration created by |
A POSIXct timestamp.
Test Binance Options connectivity
options_ping(config = config_options())options_ping(config = config_options())
config |
An options configuration created by |
A parsed list.
Place a Binance Options order
options_place_order( symbol, side = c("BUY", "SELL"), type = c("LIMIT"), quantity, price, time_in_force = c("GTC", "IOC", "FOK"), reduce_only = FALSE, post_only = FALSE, new_order_resp_type = c("ACK", "RESULT"), client_order_id = NULL, is_mmp = FALSE, self_trade_prevention_mode = NULL, config = config_options() )options_place_order( symbol, side = c("BUY", "SELL"), type = c("LIMIT"), quantity, price, time_in_force = c("GTC", "IOC", "FOK"), reduce_only = FALSE, post_only = FALSE, new_order_resp_type = c("ACK", "RESULT"), client_order_id = NULL, is_mmp = FALSE, self_trade_prevention_mode = NULL, config = config_options() )
symbol |
Option symbol, for example |
side |
One of |
type |
Order type. Only |
quantity |
Order quantity. |
price |
Order price. |
time_in_force |
Time in force. Default is |
reduce_only |
Whether the order is reduce-only. |
post_only |
Whether the order is post-only. |
new_order_resp_type |
Response type. One of |
client_order_id |
Optional client order ID. |
is_mmp |
Whether the order is an MMP order. |
self_trade_prevention_mode |
Optional STP mode. |
config |
An options configuration created by |
A parsed list.
Round price and quantity to exchange increments
round_price_qty( exchangeInfo, symbol, price = NULL, quantity = NULL, round_dir = c("down", "up") ) util_round_price_qty( exchangeInfo, symbol, price = NULL, quantity = NULL, round_dir = c("down", "up") )round_price_qty( exchangeInfo, symbol, price = NULL, quantity = NULL, round_dir = c("down", "up") ) util_round_price_qty( exchangeInfo, symbol, price = NULL, quantity = NULL, round_dir = c("down", "up") )
exchangeInfo |
Exchange info from |
symbol |
Trading pair symbol, for example |
price |
Optional price to round using the symbol tick size. |
quantity |
Optional quantity to round using the symbol step size. |
round_dir |
Direction: |
A list with elements price and quantity.
exchange_info <- list( symbols = list( ETHUSDT = list( filters = list( list(filterType = "PRICE_FILTER", tickSize = "0.01"), list(filterType = "LOT_SIZE", stepSize = "0.001") ) ) ) ) round_price_qty(exchange_info, "ETHUSDT", price = 1800.123, quantity = 0.12345)exchange_info <- list( symbols = list( ETHUSDT = list( filters = list( list(filterType = "PRICE_FILTER", tickSize = "0.01"), list(filterType = "LOT_SIZE", stepSize = "0.001") ) ) ) ) round_price_qty(exchange_info, "ETHUSDT", price = 1800.123, quantity = 0.12345)
Amend a Binance Spot order while keeping priority
spot_amend_order_keep_priority( symbol, order_id = NULL, orig_client_order_id = NULL, new_client_order_id = NULL, new_qty, config = config_spot() )spot_amend_order_keep_priority( symbol, order_id = NULL, orig_client_order_id = NULL, new_client_order_id = NULL, new_qty, config = config_spot() )
symbol |
Trading pair symbol, for example |
order_id |
Optional exchange order ID. |
orig_client_order_id |
Optional client order ID. |
new_client_order_id |
Optional new client order ID after amendment. |
new_qty |
New order quantity. Must be positive. |
config |
A spot configuration created by |
A parsed list.
Cancel all open Binance Spot orders for a symbol
spot_cancel_all_orders(symbol, config = config_spot())spot_cancel_all_orders(symbol, config = config_spot())
symbol |
Trading pair symbol, for example |
config |
A spot configuration created by |
A parsed list by default.
Cancel a Binance Spot order
spot_cancel_order( symbol, order_id = NULL, orig_client_order_id = NULL, new_client_order_id = NULL, cancel_restrictions = NULL, config = config_spot() )spot_cancel_order( symbol, order_id = NULL, orig_client_order_id = NULL, new_client_order_id = NULL, cancel_restrictions = NULL, config = config_spot() )
symbol |
Trading pair symbol, for example |
order_id |
Optional exchange order ID. |
orig_client_order_id |
Optional client order ID. |
new_client_order_id |
Optional client order ID for the cancel request. |
cancel_restrictions |
Optional cancel restriction. One of |
config |
A spot configuration created by |
A parsed list.
Cancel a Binance Spot order list
spot_cancel_order_list( symbol, order_list_id = NULL, list_client_order_id = NULL, new_client_order_id = NULL, config = config_spot() )spot_cancel_order_list( symbol, order_list_id = NULL, list_client_order_id = NULL, new_client_order_id = NULL, config = config_spot() )
symbol |
Trading pair symbol, for example |
order_list_id |
Optional exchange order-list ID. |
list_client_order_id |
Optional order-list client ID. |
new_client_order_id |
Optional client order ID for the cancel request. |
config |
A spot configuration created by |
A parsed list.
Cancel and replace a Binance Spot order
spot_cancel_replace_order( symbol, side = c("BUY", "SELL"), type = c("LIMIT", "MARKET", "STOP_LOSS", "STOP_LOSS_LIMIT", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT", "LIMIT_MAKER"), cancel_replace_mode = c("STOP_ON_FAILURE", "ALLOW_FAILURE"), time_in_force = NULL, quantity = NULL, quote_order_qty = NULL, price = NULL, cancel_new_client_order_id = NULL, cancel_orig_client_order_id = NULL, cancel_order_id = NULL, new_client_order_id = NULL, strategy_id = NULL, strategy_type = NULL, stop_price = NULL, trailing_delta = NULL, iceberg_qty = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, cancel_restrictions = NULL, order_rate_limit_exceeded_mode = NULL, peg_price_type = NULL, peg_offset_value = NULL, peg_offset_type = NULL, config = config_spot() )spot_cancel_replace_order( symbol, side = c("BUY", "SELL"), type = c("LIMIT", "MARKET", "STOP_LOSS", "STOP_LOSS_LIMIT", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT", "LIMIT_MAKER"), cancel_replace_mode = c("STOP_ON_FAILURE", "ALLOW_FAILURE"), time_in_force = NULL, quantity = NULL, quote_order_qty = NULL, price = NULL, cancel_new_client_order_id = NULL, cancel_orig_client_order_id = NULL, cancel_order_id = NULL, new_client_order_id = NULL, strategy_id = NULL, strategy_type = NULL, stop_price = NULL, trailing_delta = NULL, iceberg_qty = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, cancel_restrictions = NULL, order_rate_limit_exceeded_mode = NULL, peg_price_type = NULL, peg_offset_value = NULL, peg_offset_type = NULL, config = config_spot() )
symbol |
Trading pair symbol, for example |
side |
One of |
type |
Order type. |
cancel_replace_mode |
One of |
time_in_force |
Optional time-in-force value. |
quantity |
Optional order quantity. |
quote_order_qty |
Optional quote-order quantity for |
price |
Optional limit price. |
cancel_new_client_order_id |
Optional client order ID for the cancel request. |
cancel_orig_client_order_id |
Optional original client order ID to cancel. |
cancel_order_id |
Optional exchange order ID to cancel. |
new_client_order_id |
Optional client order identifier. |
strategy_id |
Optional numeric strategy identifier. |
strategy_type |
Optional numeric strategy type. Must be at least |
stop_price |
Optional trigger price. |
trailing_delta |
Optional trailing delta value. |
iceberg_qty |
Optional iceberg quantity. |
new_order_resp_type |
Optional response type. One of |
self_trade_prevention_mode |
Optional self-trade prevention mode. |
cancel_restrictions |
Optional cancel restriction. One of |
order_rate_limit_exceeded_mode |
Optional order-rate-limit behavior. One of |
peg_price_type |
Optional pegged price type. One of |
peg_offset_value |
Optional peg offset value. |
peg_offset_type |
Optional peg offset type. Only |
config |
A spot configuration created by |
A parsed list.
Get Binance Spot 24-hour ticker statistics
spot_get_24hr_ticker( symbol = NULL, symbols = NULL, type = c("FULL", "MINI"), symbol_status = NULL, json_list = FALSE, config = config_spot() )spot_get_24hr_ticker( symbol = NULL, symbols = NULL, type = c("FULL", "MINI"), symbol_status = NULL, json_list = FALSE, config = config_spot() )
symbol |
Optional trading pair symbol. |
symbols |
Optional character vector of trading pair symbols. |
type |
One of |
symbol_status |
Optional trading status filter. |
json_list |
If |
config |
A spot configuration created by |
A parsed list for single-symbol requests, or a data.table for
multi-symbol/all-symbol requests unless json_list = TRUE.
Get Binance Spot account information
spot_get_account(omit_zero_balances = FALSE, config = config_spot())spot_get_account(omit_zero_balances = FALSE, config = config_spot())
omit_zero_balances |
Whether to omit zero balances from the response. |
config |
A spot configuration created by |
A parsed list.
Get Binance Spot account trades
spot_get_account_trades( symbol, order_id = NULL, start_time = NULL, end_time = NULL, from_id = NULL, limit = 500, json_list = FALSE, config = config_spot() )spot_get_account_trades( symbol, order_id = NULL, start_time = NULL, end_time = NULL, from_id = NULL, limit = 500, json_list = FALSE, config = config_spot() )
symbol |
Trading pair symbol, for example |
order_id |
Optional exchange order ID. |
start_time |
Optional start time in milliseconds. |
end_time |
Optional end time in milliseconds. |
from_id |
Optional trade ID to start from. |
limit |
Maximum number of trades to return. Must not exceed |
json_list |
If |
config |
A spot configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Spot aggregate trades
spot_get_aggregate_trades( symbol, fromId = NULL, startTime = NULL, endTime = NULL, limit = 500, json_list = FALSE, config = config_spot() )spot_get_aggregate_trades( symbol, fromId = NULL, startTime = NULL, endTime = NULL, limit = 500, json_list = FALSE, config = config_spot() )
symbol |
Trading pair symbol, for example |
fromId |
Optional aggregate trade identifier to fetch from, inclusive. |
startTime |
Optional start time in milliseconds since Unix epoch, inclusive. |
endTime |
Optional end time in milliseconds since Unix epoch, inclusive. |
limit |
Maximum number of rows to return. |
json_list |
If |
config |
A spot configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get all Binance Spot order lists
spot_get_all_order_lists( from_id = NULL, start_time = NULL, end_time = NULL, limit = 500, json_list = FALSE, config = config_spot() )spot_get_all_order_lists( from_id = NULL, start_time = NULL, end_time = NULL, limit = 500, json_list = FALSE, config = config_spot() )
from_id |
Optional order-list ID to start from. |
start_time |
Optional start time in milliseconds. |
end_time |
Optional end time in milliseconds. |
limit |
Maximum number of order lists to return. Must not exceed
|
json_list |
If |
config |
A spot configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Spot allocations
spot_get_allocations( symbol, start_time = NULL, end_time = NULL, from_allocation_id = NULL, limit = 500, order_id = NULL, json_list = FALSE, config = config_spot() )spot_get_allocations( symbol, start_time = NULL, end_time = NULL, from_allocation_id = NULL, limit = 500, order_id = NULL, json_list = FALSE, config = config_spot() )
symbol |
Trading pair symbol, for example |
start_time |
Optional start time in milliseconds. |
end_time |
Optional end time in milliseconds. |
from_allocation_id |
Optional allocation ID to start from. |
limit |
Maximum number of records to return. Must not exceed |
order_id |
Optional exchange order ID. |
json_list |
If |
config |
A spot configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Spot average price
spot_get_average_price(symbol, config = config_spot())spot_get_average_price(symbol, config = config_spot())
symbol |
Trading pair symbol, for example |
config |
A spot configuration created by |
A parsed list.
Get Binance Spot book ticker
spot_get_book_ticker( symbol = NULL, symbols = NULL, symbol_status = NULL, json_list = FALSE, config = config_spot() )spot_get_book_ticker( symbol = NULL, symbols = NULL, symbol_status = NULL, json_list = FALSE, config = config_spot() )
symbol |
Optional trading pair symbol. |
symbols |
Optional character vector of trading pair symbols. |
symbol_status |
Optional trading status filter. |
json_list |
If |
config |
A spot configuration created by |
A parsed list for single-symbol requests, or a data.table for
multi-symbol/all-symbol requests unless json_list = TRUE.
Get Binance Spot commission rates
spot_get_commission_rates(symbol, config = config_spot())spot_get_commission_rates(symbol, config = config_spot())
symbol |
Trading pair symbol, for example |
config |
A spot configuration created by |
A parsed list.
Get Binance Spot exchange information
spot_get_exchange_info( symbol = NULL, symbols = NULL, permissions = NULL, show_permission_sets = TRUE, symbol_status = NULL, config = config_spot() )spot_get_exchange_info( symbol = NULL, symbols = NULL, permissions = NULL, show_permission_sets = TRUE, symbol_status = NULL, config = config_spot() )
symbol |
Optional trading pair symbol. |
symbols |
Optional character vector of trading pair symbols. |
permissions |
Optional character vector of permission strings. |
show_permission_sets |
Logical flag forwarded as |
symbol_status |
Optional trading status filter. |
config |
A spot configuration created by |
A parsed list.
Get Binance Spot execution rules
spot_get_execution_rules( symbol = NULL, symbols = NULL, symbol_status = NULL, config = config_spot() )spot_get_execution_rules( symbol = NULL, symbols = NULL, symbol_status = NULL, config = config_spot() )
symbol |
Optional trading pair symbol. |
symbols |
Optional character vector of trading pair symbols. |
symbol_status |
Optional trading status filter. |
config |
A spot configuration created by |
A parsed list.
Get Binance Spot historical trades
spot_get_historical_trades( symbol, limit = 500, fromId = NULL, json_list = FALSE, config = config_spot() )spot_get_historical_trades( symbol, limit = 500, fromId = NULL, json_list = FALSE, config = config_spot() )
symbol |
Trading pair symbol, for example |
limit |
Maximum number of rows to return. |
fromId |
Optional trade identifier to fetch from. |
json_list |
If |
config |
A spot configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Spot klines
spot_get_klines( symbol, interval, startTime = NULL, endTime = NULL, timeZone = NULL, limit = 500, json_list = FALSE, config = config_spot() )spot_get_klines( symbol, interval, startTime = NULL, endTime = NULL, timeZone = NULL, limit = 500, json_list = FALSE, config = config_spot() )
symbol |
Trading pair symbol, for example |
interval |
Kline interval string. |
startTime |
Optional start time in milliseconds since Unix epoch. |
endTime |
Optional end time in milliseconds since Unix epoch. |
timeZone |
Optional timezone string accepted by Binance. |
limit |
Maximum number of rows to return. |
json_list |
If |
config |
A spot configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Spot open order lists
spot_get_open_order_lists(json_list = FALSE, config = config_spot())spot_get_open_order_lists(json_list = FALSE, config = config_spot())
json_list |
If |
config |
A spot configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Spot open orders
spot_get_open_orders(symbol = NULL, json_list = FALSE, config = config_spot())spot_get_open_orders(symbol = NULL, json_list = FALSE, config = config_spot())
symbol |
Optional trading pair symbol. If |
json_list |
If |
config |
A spot configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get a Binance Spot order
spot_get_order( symbol, order_id = NULL, orig_client_order_id = NULL, config = config_spot() )spot_get_order( symbol, order_id = NULL, orig_client_order_id = NULL, config = config_spot() )
symbol |
Trading pair symbol, for example |
order_id |
Optional exchange order ID. |
orig_client_order_id |
Optional client order ID. |
config |
A spot configuration created by |
A parsed list.
Get Binance Spot order amendments
spot_get_order_amendments( symbol, order_id, from_execution_id = NULL, limit = 500, json_list = FALSE, config = config_spot() )spot_get_order_amendments( symbol, order_id, from_execution_id = NULL, limit = 500, json_list = FALSE, config = config_spot() )
symbol |
Trading pair symbol, for example |
order_id |
Exchange order ID. |
from_execution_id |
Optional execution ID to start from. |
limit |
Maximum number of records to return. Must not exceed |
json_list |
If |
config |
A spot configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Spot order book
spot_get_order_book( symbol, limit = NULL, symbol_status = NULL, config = config_spot() )spot_get_order_book( symbol, limit = NULL, symbol_status = NULL, config = config_spot() )
symbol |
Trading pair symbol, for example |
limit |
Optional order book depth limit. |
symbol_status |
Optional trading status filter. |
config |
A spot configuration created by |
A parsed list.
Get a Binance Spot order list
spot_get_order_list( order_list_id = NULL, orig_client_order_id = NULL, config = config_spot() )spot_get_order_list( order_list_id = NULL, orig_client_order_id = NULL, config = config_spot() )
order_list_id |
Optional exchange order-list ID. |
orig_client_order_id |
Optional order-list client ID. |
config |
A spot configuration created by |
A parsed list.
Get Binance Spot order history
spot_get_orders( symbol, order_id = NULL, start_time = NULL, end_time = NULL, limit = 500, json_list = FALSE, config = config_spot() )spot_get_orders( symbol, order_id = NULL, start_time = NULL, end_time = NULL, limit = 500, json_list = FALSE, config = config_spot() )
symbol |
Trading pair symbol, for example |
order_id |
Optional exchange order ID to start from. |
start_time |
Optional start time in milliseconds. |
end_time |
Optional end time in milliseconds. |
limit |
Maximum number of orders to return. Must not exceed |
json_list |
If |
config |
A spot configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Spot prevented matches
spot_get_prevented_matches( symbol, prevented_match_id = NULL, order_id = NULL, from_prevented_match_id = NULL, limit = 500, json_list = FALSE, config = config_spot() )spot_get_prevented_matches( symbol, prevented_match_id = NULL, order_id = NULL, from_prevented_match_id = NULL, limit = 500, json_list = FALSE, config = config_spot() )
symbol |
Trading pair symbol, for example |
prevented_match_id |
Optional prevented-match ID. |
order_id |
Optional exchange order ID. |
from_prevented_match_id |
Optional prevented-match ID to start from. |
limit |
Maximum number of records to return. Must not exceed |
json_list |
If |
config |
A spot configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Spot recent trades
spot_get_recent_trades( symbol, limit = 500, json_list = FALSE, config = config_spot() )spot_get_recent_trades( symbol, limit = 500, json_list = FALSE, config = config_spot() )
symbol |
Trading pair symbol, for example |
limit |
Maximum number of rows to return. |
json_list |
If |
config |
A spot configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Spot reference price
spot_get_reference_price(symbol, config = config_spot())spot_get_reference_price(symbol, config = config_spot())
symbol |
Trading pair symbol, for example |
config |
A spot configuration created by |
A parsed list.
Get Binance Spot reference price calculation metadata
spot_get_reference_price_calculation( symbol, symbol_status = NULL, config = config_spot() )spot_get_reference_price_calculation( symbol, symbol_status = NULL, config = config_spot() )
symbol |
Trading pair symbol, for example |
symbol_status |
Optional trading status filter. |
config |
A spot configuration created by |
A parsed list.
Get Binance Spot relevant account filters
spot_get_relevant_filters(symbol, config = config_spot())spot_get_relevant_filters(symbol, config = config_spot())
symbol |
Trading pair symbol, for example |
config |
A spot configuration created by |
A parsed list.
Get Binance Spot rolling window ticker statistics
spot_get_rolling_window_ticker( symbol = NULL, symbols = NULL, windowSize = NULL, type = c("FULL", "MINI"), symbol_status = NULL, json_list = FALSE, config = config_spot() )spot_get_rolling_window_ticker( symbol = NULL, symbols = NULL, windowSize = NULL, type = c("FULL", "MINI"), symbol_status = NULL, json_list = FALSE, config = config_spot() )
symbol |
Optional trading pair symbol. |
symbols |
Optional character vector of trading pair symbols. |
windowSize |
Optional rolling window size such as |
type |
One of |
symbol_status |
Optional trading status filter. |
json_list |
If |
config |
A spot configuration created by |
A parsed list for single-symbol requests, or a data.table for
multi-symbol requests unless json_list = TRUE.
Get Binance Spot server time
spot_get_server_time(config = config_spot())spot_get_server_time(config = config_spot())
config |
A spot configuration created by |
A POSIXct timestamp.
Get Binance Spot ticker price
spot_get_ticker_price( symbol = NULL, symbols = NULL, symbol_status = NULL, json_list = FALSE, config = config_spot() ) get_spot_mark_price(symbol = NULL, config = binxr_config_spot())spot_get_ticker_price( symbol = NULL, symbols = NULL, symbol_status = NULL, json_list = FALSE, config = config_spot() ) get_spot_mark_price(symbol = NULL, config = binxr_config_spot())
symbol |
Optional trading pair symbol. |
symbols |
Optional character vector of trading pair symbols. |
symbol_status |
Optional trading status filter. |
json_list |
If |
config |
A spot configuration created by |
A parsed list for single-symbol requests, or a data.table for
multi-symbol/all-symbol requests unless json_list = TRUE.
Get Binance Spot trading day ticker statistics
spot_get_trading_day_ticker( symbol = NULL, symbols = NULL, timeZone = NULL, type = c("FULL", "MINI"), symbol_status = NULL, json_list = FALSE, config = config_spot() )spot_get_trading_day_ticker( symbol = NULL, symbols = NULL, timeZone = NULL, type = c("FULL", "MINI"), symbol_status = NULL, json_list = FALSE, config = config_spot() )
symbol |
Optional trading pair symbol. |
symbols |
Optional character vector of trading pair symbols. |
timeZone |
Optional timezone string accepted by Binance. |
type |
One of |
symbol_status |
Optional trading status filter. |
json_list |
If |
config |
A spot configuration created by |
A parsed list for single-symbol requests, or a data.table for
multi-symbol requests unless json_list = TRUE.
Get Binance Spot UI klines
spot_get_ui_klines( symbol, interval, startTime = NULL, endTime = NULL, timeZone = NULL, limit = 500, json_list = FALSE, config = config_spot() )spot_get_ui_klines( symbol, interval, startTime = NULL, endTime = NULL, timeZone = NULL, limit = 500, json_list = FALSE, config = config_spot() )
symbol |
Trading pair symbol, for example |
interval |
Kline interval string. |
startTime |
Optional start time in milliseconds since Unix epoch. |
endTime |
Optional end time in milliseconds since Unix epoch. |
timeZone |
Optional timezone string accepted by Binance. |
limit |
Maximum number of rows to return. |
json_list |
If |
config |
A spot configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Get Binance Spot unfilled order counts
spot_get_unfilled_order_count(json_list = FALSE, config = config_spot())spot_get_unfilled_order_count(json_list = FALSE, config = config_spot())
json_list |
If |
config |
A spot configuration created by |
A data.table by default, or a parsed list when json_list = TRUE.
Test Binance Spot API connectivity
spot_ping(config = config_spot())spot_ping(config = config_spot())
config |
A spot configuration created by |
An empty parsed list on success.
Place a deprecated Binance Spot OCO order
spot_place_oco_order( symbol, side = c("BUY", "SELL"), quantity, price, stop_price, list_client_order_id = NULL, limit_client_order_id = NULL, limit_strategy_id = NULL, limit_strategy_type = NULL, limit_iceberg_qty = NULL, trailing_delta = NULL, stop_client_order_id = NULL, stop_strategy_id = NULL, stop_strategy_type = NULL, stop_limit_price = NULL, stop_iceberg_qty = NULL, stop_limit_time_in_force = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, config = config_spot() )spot_place_oco_order( symbol, side = c("BUY", "SELL"), quantity, price, stop_price, list_client_order_id = NULL, limit_client_order_id = NULL, limit_strategy_id = NULL, limit_strategy_type = NULL, limit_iceberg_qty = NULL, trailing_delta = NULL, stop_client_order_id = NULL, stop_strategy_id = NULL, stop_strategy_type = NULL, stop_limit_price = NULL, stop_iceberg_qty = NULL, stop_limit_time_in_force = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, config = config_spot() )
symbol |
Trading pair symbol, for example |
side |
One of |
quantity |
Order quantity shared by both legs. |
price |
Limit price for the maker leg. |
stop_price |
Stop trigger price. |
list_client_order_id |
Optional order-list client ID. |
limit_client_order_id |
Optional limit-leg client ID. |
limit_strategy_id |
Optional limit-leg strategy ID. |
limit_strategy_type |
Optional limit-leg strategy type. |
limit_iceberg_qty |
Optional limit-leg iceberg quantity. |
trailing_delta |
Optional shared trailing delta. |
stop_client_order_id |
Optional stop-leg client ID. |
stop_strategy_id |
Optional stop-leg strategy ID. |
stop_strategy_type |
Optional stop-leg strategy type. |
stop_limit_price |
Optional stop-limit price. |
stop_iceberg_qty |
Optional stop-leg iceberg quantity. |
stop_limit_time_in_force |
Optional stop-limit time-in-force. |
new_order_resp_type |
Optional response type. One of |
self_trade_prevention_mode |
Optional self-trade prevention mode. |
config |
A spot configuration created by |
A parsed list.
Place a Binance Spot order
spot_place_order( symbol, side = c("BUY", "SELL"), type = c("LIMIT", "MARKET", "STOP_LOSS", "STOP_LOSS_LIMIT", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT", "LIMIT_MAKER"), time_in_force = NULL, quantity = NULL, quote_order_qty = NULL, price = NULL, new_client_order_id = NULL, strategy_id = NULL, strategy_type = NULL, stop_price = NULL, trailing_delta = NULL, iceberg_qty = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, peg_price_type = NULL, peg_offset_value = NULL, peg_offset_type = NULL, config = config_spot() )spot_place_order( symbol, side = c("BUY", "SELL"), type = c("LIMIT", "MARKET", "STOP_LOSS", "STOP_LOSS_LIMIT", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT", "LIMIT_MAKER"), time_in_force = NULL, quantity = NULL, quote_order_qty = NULL, price = NULL, new_client_order_id = NULL, strategy_id = NULL, strategy_type = NULL, stop_price = NULL, trailing_delta = NULL, iceberg_qty = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, peg_price_type = NULL, peg_offset_value = NULL, peg_offset_type = NULL, config = config_spot() )
symbol |
Trading pair symbol, for example |
side |
One of |
type |
Order type. |
time_in_force |
Optional time-in-force value. |
quantity |
Optional order quantity. |
quote_order_qty |
Optional quote-order quantity for |
price |
Optional limit price. |
new_client_order_id |
Optional client order identifier. |
strategy_id |
Optional numeric strategy identifier. |
strategy_type |
Optional numeric strategy type. Must be at least |
stop_price |
Optional trigger price. |
trailing_delta |
Optional trailing delta value. |
iceberg_qty |
Optional iceberg quantity. |
new_order_resp_type |
Optional response type. One of |
self_trade_prevention_mode |
Optional self-trade prevention mode. |
peg_price_type |
Optional pegged price type. One of |
peg_offset_value |
Optional peg offset value. |
peg_offset_type |
Optional peg offset type. Only |
config |
A spot configuration created by |
A parsed list.
Place a Binance Spot OCO order list
spot_place_order_list_oco( symbol, side = c("BUY", "SELL"), quantity, above_type = c("STOP_LOSS_LIMIT", "STOP_LOSS", "LIMIT_MAKER", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT"), above_client_order_id = NULL, above_iceberg_qty = NULL, above_price = NULL, above_stop_price = NULL, above_trailing_delta = NULL, above_time_in_force = NULL, above_strategy_id = NULL, above_strategy_type = NULL, above_peg_price_type = NULL, above_peg_offset_type = NULL, above_peg_offset_value = NULL, below_type = c("STOP_LOSS", "STOP_LOSS_LIMIT", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT"), below_client_order_id = NULL, below_iceberg_qty = NULL, below_price = NULL, below_stop_price = NULL, below_trailing_delta = NULL, below_time_in_force = NULL, below_strategy_id = NULL, below_strategy_type = NULL, below_peg_price_type = NULL, below_peg_offset_type = NULL, below_peg_offset_value = NULL, list_client_order_id = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, config = config_spot() )spot_place_order_list_oco( symbol, side = c("BUY", "SELL"), quantity, above_type = c("STOP_LOSS_LIMIT", "STOP_LOSS", "LIMIT_MAKER", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT"), above_client_order_id = NULL, above_iceberg_qty = NULL, above_price = NULL, above_stop_price = NULL, above_trailing_delta = NULL, above_time_in_force = NULL, above_strategy_id = NULL, above_strategy_type = NULL, above_peg_price_type = NULL, above_peg_offset_type = NULL, above_peg_offset_value = NULL, below_type = c("STOP_LOSS", "STOP_LOSS_LIMIT", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT"), below_client_order_id = NULL, below_iceberg_qty = NULL, below_price = NULL, below_stop_price = NULL, below_trailing_delta = NULL, below_time_in_force = NULL, below_strategy_id = NULL, below_strategy_type = NULL, below_peg_price_type = NULL, below_peg_offset_type = NULL, below_peg_offset_value = NULL, list_client_order_id = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, config = config_spot() )
symbol |
Trading pair symbol, for example |
side |
One of |
quantity |
Order quantity shared by both legs. |
above_type |
Type for the above leg. |
above_client_order_id |
Optional above-leg client ID. |
above_iceberg_qty |
Optional above-leg iceberg quantity. |
above_price |
Optional above-leg limit price. |
above_stop_price |
Optional above-leg stop price. |
above_trailing_delta |
Optional above-leg trailing delta. |
above_time_in_force |
Optional above-leg time-in-force. |
above_strategy_id |
Optional above-leg strategy ID. |
above_strategy_type |
Optional above-leg strategy type. |
above_peg_price_type |
Optional above-leg peg price type. |
above_peg_offset_type |
Optional above-leg peg offset type. |
above_peg_offset_value |
Optional above-leg peg offset value. |
below_type |
Type for the below leg. |
below_client_order_id |
Optional below-leg client ID. |
below_iceberg_qty |
Optional below-leg iceberg quantity. |
below_price |
Optional below-leg limit price. |
below_stop_price |
Optional below-leg stop price. |
below_trailing_delta |
Optional below-leg trailing delta. |
below_time_in_force |
Optional below-leg time-in-force. |
below_strategy_id |
Optional below-leg strategy ID. |
below_strategy_type |
Optional below-leg strategy type. |
below_peg_price_type |
Optional below-leg peg price type. |
below_peg_offset_type |
Optional below-leg peg offset type. |
below_peg_offset_value |
Optional below-leg peg offset value. |
list_client_order_id |
Optional order-list client ID. |
new_order_resp_type |
Optional response type. One of |
self_trade_prevention_mode |
Optional self-trade prevention mode. |
config |
A spot configuration created by |
A parsed list.
Place a Binance Spot OPO order list
spot_place_order_list_opo( symbol, list_client_order_id = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, working_type = c("LIMIT", "LIMIT_MAKER"), working_side = c("BUY", "SELL"), working_client_order_id = NULL, working_price, working_quantity, working_iceberg_qty = NULL, working_time_in_force = NULL, working_strategy_id = NULL, working_strategy_type = NULL, working_peg_price_type = NULL, working_peg_offset_type = NULL, working_peg_offset_value = NULL, pending_type = c("LIMIT", "MARKET", "STOP_LOSS", "STOP_LOSS_LIMIT", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT", "LIMIT_MAKER"), pending_side = c("BUY", "SELL"), pending_client_order_id = NULL, pending_price = NULL, pending_stop_price = NULL, pending_trailing_delta = NULL, pending_iceberg_qty = NULL, pending_time_in_force = NULL, pending_strategy_id = NULL, pending_strategy_type = NULL, pending_peg_price_type = NULL, pending_peg_offset_type = NULL, pending_peg_offset_value = NULL, config = config_spot() )spot_place_order_list_opo( symbol, list_client_order_id = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, working_type = c("LIMIT", "LIMIT_MAKER"), working_side = c("BUY", "SELL"), working_client_order_id = NULL, working_price, working_quantity, working_iceberg_qty = NULL, working_time_in_force = NULL, working_strategy_id = NULL, working_strategy_type = NULL, working_peg_price_type = NULL, working_peg_offset_type = NULL, working_peg_offset_value = NULL, pending_type = c("LIMIT", "MARKET", "STOP_LOSS", "STOP_LOSS_LIMIT", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT", "LIMIT_MAKER"), pending_side = c("BUY", "SELL"), pending_client_order_id = NULL, pending_price = NULL, pending_stop_price = NULL, pending_trailing_delta = NULL, pending_iceberg_qty = NULL, pending_time_in_force = NULL, pending_strategy_id = NULL, pending_strategy_type = NULL, pending_peg_price_type = NULL, pending_peg_offset_type = NULL, pending_peg_offset_value = NULL, config = config_spot() )
symbol |
Trading pair symbol, for example |
list_client_order_id |
Optional order-list client ID. |
new_order_resp_type |
Optional response type. One of |
self_trade_prevention_mode |
Optional self-trade prevention mode. |
working_type |
Working leg type. One of |
working_side |
Working leg side. One of |
working_client_order_id |
Optional working-leg client ID. |
working_price |
Working leg price. |
working_quantity |
Working leg quantity. |
working_iceberg_qty |
Optional working-leg iceberg quantity. |
working_time_in_force |
Optional working-leg time-in-force. |
working_strategy_id |
Optional working-leg strategy ID. |
working_strategy_type |
Optional working-leg strategy type. |
working_peg_price_type |
Optional working-leg peg price type. |
working_peg_offset_type |
Optional working-leg peg offset type. |
working_peg_offset_value |
Optional working-leg peg offset value. |
pending_type |
Pending leg order type. |
pending_side |
Pending leg side. One of |
pending_client_order_id |
Optional pending-leg client ID. |
pending_price |
Optional pending-leg price. |
pending_stop_price |
Optional pending-leg stop price. |
pending_trailing_delta |
Optional pending-leg trailing delta. |
pending_iceberg_qty |
Optional pending-leg iceberg quantity. |
pending_time_in_force |
Optional pending-leg time-in-force. |
pending_strategy_id |
Optional pending-leg strategy ID. |
pending_strategy_type |
Optional pending-leg strategy type. |
pending_peg_price_type |
Optional pending-leg peg price type. |
pending_peg_offset_type |
Optional pending-leg peg offset type. |
pending_peg_offset_value |
Optional pending-leg peg offset value. |
config |
A spot configuration created by |
A parsed list.
Place a Binance Spot OPOCO order list
spot_place_order_list_opoco( symbol, list_client_order_id = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, working_type = c("LIMIT", "LIMIT_MAKER"), working_side = c("BUY", "SELL"), working_client_order_id = NULL, working_price, working_quantity, working_iceberg_qty = NULL, working_time_in_force = NULL, working_strategy_id = NULL, working_strategy_type = NULL, working_peg_price_type = NULL, working_peg_offset_type = NULL, working_peg_offset_value = NULL, pending_side = c("BUY", "SELL"), pending_above_type = c("STOP_LOSS_LIMIT", "STOP_LOSS", "LIMIT_MAKER", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT"), pending_above_client_order_id = NULL, pending_above_price = NULL, pending_above_stop_price = NULL, pending_above_trailing_delta = NULL, pending_above_iceberg_qty = NULL, pending_above_time_in_force = NULL, pending_above_strategy_id = NULL, pending_above_strategy_type = NULL, pending_above_peg_price_type = NULL, pending_above_peg_offset_type = NULL, pending_above_peg_offset_value = NULL, pending_below_type = c("STOP_LOSS", "STOP_LOSS_LIMIT", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT"), pending_below_client_order_id = NULL, pending_below_price = NULL, pending_below_stop_price = NULL, pending_below_trailing_delta = NULL, pending_below_iceberg_qty = NULL, pending_below_time_in_force = NULL, pending_below_strategy_id = NULL, pending_below_strategy_type = NULL, pending_below_peg_price_type = NULL, pending_below_peg_offset_type = NULL, pending_below_peg_offset_value = NULL, config = config_spot() )spot_place_order_list_opoco( symbol, list_client_order_id = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, working_type = c("LIMIT", "LIMIT_MAKER"), working_side = c("BUY", "SELL"), working_client_order_id = NULL, working_price, working_quantity, working_iceberg_qty = NULL, working_time_in_force = NULL, working_strategy_id = NULL, working_strategy_type = NULL, working_peg_price_type = NULL, working_peg_offset_type = NULL, working_peg_offset_value = NULL, pending_side = c("BUY", "SELL"), pending_above_type = c("STOP_LOSS_LIMIT", "STOP_LOSS", "LIMIT_MAKER", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT"), pending_above_client_order_id = NULL, pending_above_price = NULL, pending_above_stop_price = NULL, pending_above_trailing_delta = NULL, pending_above_iceberg_qty = NULL, pending_above_time_in_force = NULL, pending_above_strategy_id = NULL, pending_above_strategy_type = NULL, pending_above_peg_price_type = NULL, pending_above_peg_offset_type = NULL, pending_above_peg_offset_value = NULL, pending_below_type = c("STOP_LOSS", "STOP_LOSS_LIMIT", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT"), pending_below_client_order_id = NULL, pending_below_price = NULL, pending_below_stop_price = NULL, pending_below_trailing_delta = NULL, pending_below_iceberg_qty = NULL, pending_below_time_in_force = NULL, pending_below_strategy_id = NULL, pending_below_strategy_type = NULL, pending_below_peg_price_type = NULL, pending_below_peg_offset_type = NULL, pending_below_peg_offset_value = NULL, config = config_spot() )
symbol |
Trading pair symbol, for example |
list_client_order_id |
Optional order-list client ID. |
new_order_resp_type |
Optional response type. One of |
self_trade_prevention_mode |
Optional self-trade prevention mode. |
working_type |
Working leg type. One of |
working_side |
Working leg side. One of |
working_client_order_id |
Optional working-leg client ID. |
working_price |
Working leg price. |
working_quantity |
Working leg quantity. |
working_iceberg_qty |
Optional working-leg iceberg quantity. |
working_time_in_force |
Optional working-leg time-in-force. |
working_strategy_id |
Optional working-leg strategy ID. |
working_strategy_type |
Optional working-leg strategy type. |
working_peg_price_type |
Optional working-leg peg price type. |
working_peg_offset_type |
Optional working-leg peg offset type. |
working_peg_offset_value |
Optional working-leg peg offset value. |
pending_side |
Shared side for the pending OCO legs. |
pending_above_type |
Type for the pending-above leg. |
pending_above_client_order_id |
Optional pending-above client ID. |
pending_above_price |
Optional pending-above price. |
pending_above_stop_price |
Optional pending-above stop price. |
pending_above_trailing_delta |
Optional pending-above trailing delta. |
pending_above_iceberg_qty |
Optional pending-above iceberg quantity. |
pending_above_time_in_force |
Optional pending-above time-in-force. |
pending_above_strategy_id |
Optional pending-above strategy ID. |
pending_above_strategy_type |
Optional pending-above strategy type. |
pending_above_peg_price_type |
Optional pending-above peg price type. |
pending_above_peg_offset_type |
Optional pending-above peg offset type. |
pending_above_peg_offset_value |
Optional pending-above peg offset value. |
pending_below_type |
Type for the pending-below leg. |
pending_below_client_order_id |
Optional pending-below client ID. |
pending_below_price |
Optional pending-below price. |
pending_below_stop_price |
Optional pending-below stop price. |
pending_below_trailing_delta |
Optional pending-below trailing delta. |
pending_below_iceberg_qty |
Optional pending-below iceberg quantity. |
pending_below_time_in_force |
Optional pending-below time-in-force. |
pending_below_strategy_id |
Optional pending-below strategy ID. |
pending_below_strategy_type |
Optional pending-below strategy type. |
pending_below_peg_price_type |
Optional pending-below peg price type. |
pending_below_peg_offset_type |
Optional pending-below peg offset type. |
pending_below_peg_offset_value |
Optional pending-below peg offset value. |
config |
A spot configuration created by |
A parsed list.
Place a Binance Spot OTO order list
spot_place_order_list_oto( symbol, list_client_order_id = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, working_type = c("LIMIT", "LIMIT_MAKER"), working_side = c("BUY", "SELL"), working_client_order_id = NULL, working_price, working_quantity, working_iceberg_qty = NULL, working_time_in_force = NULL, working_strategy_id = NULL, working_strategy_type = NULL, working_peg_price_type = NULL, working_peg_offset_type = NULL, working_peg_offset_value = NULL, pending_type = c("LIMIT", "MARKET", "STOP_LOSS", "STOP_LOSS_LIMIT", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT", "LIMIT_MAKER"), pending_side = c("BUY", "SELL"), pending_client_order_id = NULL, pending_price = NULL, pending_stop_price = NULL, pending_trailing_delta = NULL, pending_quantity, pending_iceberg_qty = NULL, pending_time_in_force = NULL, pending_strategy_id = NULL, pending_strategy_type = NULL, pending_peg_price_type = NULL, pending_peg_offset_type = NULL, pending_peg_offset_value = NULL, config = config_spot() )spot_place_order_list_oto( symbol, list_client_order_id = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, working_type = c("LIMIT", "LIMIT_MAKER"), working_side = c("BUY", "SELL"), working_client_order_id = NULL, working_price, working_quantity, working_iceberg_qty = NULL, working_time_in_force = NULL, working_strategy_id = NULL, working_strategy_type = NULL, working_peg_price_type = NULL, working_peg_offset_type = NULL, working_peg_offset_value = NULL, pending_type = c("LIMIT", "MARKET", "STOP_LOSS", "STOP_LOSS_LIMIT", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT", "LIMIT_MAKER"), pending_side = c("BUY", "SELL"), pending_client_order_id = NULL, pending_price = NULL, pending_stop_price = NULL, pending_trailing_delta = NULL, pending_quantity, pending_iceberg_qty = NULL, pending_time_in_force = NULL, pending_strategy_id = NULL, pending_strategy_type = NULL, pending_peg_price_type = NULL, pending_peg_offset_type = NULL, pending_peg_offset_value = NULL, config = config_spot() )
symbol |
Trading pair symbol, for example |
list_client_order_id |
Optional order-list client ID. |
new_order_resp_type |
Optional response type. One of |
self_trade_prevention_mode |
Optional self-trade prevention mode. |
working_type |
Working leg type. One of |
working_side |
Working leg side. One of |
working_client_order_id |
Optional working-leg client ID. |
working_price |
Working leg price. |
working_quantity |
Working leg quantity. |
working_iceberg_qty |
Optional working-leg iceberg quantity. |
working_time_in_force |
Optional working-leg time-in-force. |
working_strategy_id |
Optional working-leg strategy ID. |
working_strategy_type |
Optional working-leg strategy type. |
working_peg_price_type |
Optional working-leg peg price type. |
working_peg_offset_type |
Optional working-leg peg offset type. |
working_peg_offset_value |
Optional working-leg peg offset value. |
pending_type |
Pending leg order type. |
pending_side |
Pending leg side. One of |
pending_client_order_id |
Optional pending-leg client ID. |
pending_price |
Optional pending-leg price. |
pending_stop_price |
Optional pending-leg stop price. |
pending_trailing_delta |
Optional pending-leg trailing delta. |
pending_quantity |
Pending leg quantity. |
pending_iceberg_qty |
Optional pending-leg iceberg quantity. |
pending_time_in_force |
Optional pending-leg time-in-force. |
pending_strategy_id |
Optional pending-leg strategy ID. |
pending_strategy_type |
Optional pending-leg strategy type. |
pending_peg_price_type |
Optional pending-leg peg price type. |
pending_peg_offset_type |
Optional pending-leg peg offset type. |
pending_peg_offset_value |
Optional pending-leg peg offset value. |
config |
A spot configuration created by |
A parsed list.
Place a Binance Spot OTOCO order list
spot_place_order_list_otoco( symbol, list_client_order_id = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, working_type = c("LIMIT", "LIMIT_MAKER"), working_side = c("BUY", "SELL"), working_client_order_id = NULL, working_price, working_quantity, working_iceberg_qty = NULL, working_time_in_force = NULL, working_strategy_id = NULL, working_strategy_type = NULL, working_peg_price_type = NULL, working_peg_offset_type = NULL, working_peg_offset_value = NULL, pending_side = c("BUY", "SELL"), pending_quantity, pending_above_type = c("STOP_LOSS_LIMIT", "STOP_LOSS", "LIMIT_MAKER", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT"), pending_above_client_order_id = NULL, pending_above_price = NULL, pending_above_stop_price = NULL, pending_above_trailing_delta = NULL, pending_above_iceberg_qty = NULL, pending_above_time_in_force = NULL, pending_above_strategy_id = NULL, pending_above_strategy_type = NULL, pending_above_peg_price_type = NULL, pending_above_peg_offset_type = NULL, pending_above_peg_offset_value = NULL, pending_below_type = c("STOP_LOSS", "STOP_LOSS_LIMIT", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT"), pending_below_client_order_id = NULL, pending_below_price = NULL, pending_below_stop_price = NULL, pending_below_trailing_delta = NULL, pending_below_iceberg_qty = NULL, pending_below_time_in_force = NULL, pending_below_strategy_id = NULL, pending_below_strategy_type = NULL, pending_below_peg_price_type = NULL, pending_below_peg_offset_type = NULL, pending_below_peg_offset_value = NULL, config = config_spot() )spot_place_order_list_otoco( symbol, list_client_order_id = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, working_type = c("LIMIT", "LIMIT_MAKER"), working_side = c("BUY", "SELL"), working_client_order_id = NULL, working_price, working_quantity, working_iceberg_qty = NULL, working_time_in_force = NULL, working_strategy_id = NULL, working_strategy_type = NULL, working_peg_price_type = NULL, working_peg_offset_type = NULL, working_peg_offset_value = NULL, pending_side = c("BUY", "SELL"), pending_quantity, pending_above_type = c("STOP_LOSS_LIMIT", "STOP_LOSS", "LIMIT_MAKER", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT"), pending_above_client_order_id = NULL, pending_above_price = NULL, pending_above_stop_price = NULL, pending_above_trailing_delta = NULL, pending_above_iceberg_qty = NULL, pending_above_time_in_force = NULL, pending_above_strategy_id = NULL, pending_above_strategy_type = NULL, pending_above_peg_price_type = NULL, pending_above_peg_offset_type = NULL, pending_above_peg_offset_value = NULL, pending_below_type = c("STOP_LOSS", "STOP_LOSS_LIMIT", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT"), pending_below_client_order_id = NULL, pending_below_price = NULL, pending_below_stop_price = NULL, pending_below_trailing_delta = NULL, pending_below_iceberg_qty = NULL, pending_below_time_in_force = NULL, pending_below_strategy_id = NULL, pending_below_strategy_type = NULL, pending_below_peg_price_type = NULL, pending_below_peg_offset_type = NULL, pending_below_peg_offset_value = NULL, config = config_spot() )
symbol |
Trading pair symbol, for example |
list_client_order_id |
Optional order-list client ID. |
new_order_resp_type |
Optional response type. One of |
self_trade_prevention_mode |
Optional self-trade prevention mode. |
working_type |
Working leg type. One of |
working_side |
Working leg side. One of |
working_client_order_id |
Optional working-leg client ID. |
working_price |
Working leg price. |
working_quantity |
Working leg quantity. |
working_iceberg_qty |
Optional working-leg iceberg quantity. |
working_time_in_force |
Optional working-leg time-in-force. |
working_strategy_id |
Optional working-leg strategy ID. |
working_strategy_type |
Optional working-leg strategy type. |
working_peg_price_type |
Optional working-leg peg price type. |
working_peg_offset_type |
Optional working-leg peg offset type. |
working_peg_offset_value |
Optional working-leg peg offset value. |
pending_side |
Shared side for the pending OCO legs. |
pending_quantity |
Pending leg quantity. |
pending_above_type |
Type for the pending-above leg. |
pending_above_client_order_id |
Optional pending-above client ID. |
pending_above_price |
Optional pending-above price. |
pending_above_stop_price |
Optional pending-above stop price. |
pending_above_trailing_delta |
Optional pending-above trailing delta. |
pending_above_iceberg_qty |
Optional pending-above iceberg quantity. |
pending_above_time_in_force |
Optional pending-above time-in-force. |
pending_above_strategy_id |
Optional pending-above strategy ID. |
pending_above_strategy_type |
Optional pending-above strategy type. |
pending_above_peg_price_type |
Optional pending-above peg price type. |
pending_above_peg_offset_type |
Optional pending-above peg offset type. |
pending_above_peg_offset_value |
Optional pending-above peg offset value. |
pending_below_type |
Type for the pending-below leg. |
pending_below_client_order_id |
Optional pending-below client ID. |
pending_below_price |
Optional pending-below price. |
pending_below_stop_price |
Optional pending-below stop price. |
pending_below_trailing_delta |
Optional pending-below trailing delta. |
pending_below_iceberg_qty |
Optional pending-below iceberg quantity. |
pending_below_time_in_force |
Optional pending-below time-in-force. |
pending_below_strategy_id |
Optional pending-below strategy ID. |
pending_below_strategy_type |
Optional pending-below strategy type. |
pending_below_peg_price_type |
Optional pending-below peg price type. |
pending_below_peg_offset_type |
Optional pending-below peg offset type. |
pending_below_peg_offset_value |
Optional pending-below peg offset value. |
config |
A spot configuration created by |
A parsed list.
Place a Binance Spot SOR order
spot_place_sor_order( symbol, side = c("BUY", "SELL"), type = c("LIMIT", "MARKET"), quantity, time_in_force = NULL, price = NULL, new_client_order_id = NULL, strategy_id = NULL, strategy_type = NULL, iceberg_qty = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, config = config_spot() )spot_place_sor_order( symbol, side = c("BUY", "SELL"), type = c("LIMIT", "MARKET"), quantity, time_in_force = NULL, price = NULL, new_client_order_id = NULL, strategy_id = NULL, strategy_type = NULL, iceberg_qty = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, config = config_spot() )
symbol |
Trading pair symbol, for example |
side |
One of |
type |
SOR order type. One of |
quantity |
Order quantity. |
time_in_force |
Optional time-in-force value. |
price |
Optional limit price. |
new_client_order_id |
Optional client order identifier. |
strategy_id |
Optional numeric strategy identifier. |
strategy_type |
Optional numeric strategy type. Must be at least |
iceberg_qty |
Optional iceberg quantity. |
new_order_resp_type |
Optional response type. One of |
self_trade_prevention_mode |
Optional self-trade prevention mode. |
config |
A spot configuration created by |
A parsed list.
Test a Binance Spot order
spot_test_order( symbol, side = c("BUY", "SELL"), type = c("LIMIT", "MARKET", "STOP_LOSS", "STOP_LOSS_LIMIT", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT", "LIMIT_MAKER"), time_in_force = NULL, quantity = NULL, quote_order_qty = NULL, price = NULL, new_client_order_id = NULL, strategy_id = NULL, strategy_type = NULL, stop_price = NULL, trailing_delta = NULL, iceberg_qty = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, peg_price_type = NULL, peg_offset_value = NULL, peg_offset_type = NULL, compute_commission_rates = FALSE, config = config_spot() )spot_test_order( symbol, side = c("BUY", "SELL"), type = c("LIMIT", "MARKET", "STOP_LOSS", "STOP_LOSS_LIMIT", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT", "LIMIT_MAKER"), time_in_force = NULL, quantity = NULL, quote_order_qty = NULL, price = NULL, new_client_order_id = NULL, strategy_id = NULL, strategy_type = NULL, stop_price = NULL, trailing_delta = NULL, iceberg_qty = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, peg_price_type = NULL, peg_offset_value = NULL, peg_offset_type = NULL, compute_commission_rates = FALSE, config = config_spot() )
symbol |
Trading pair symbol, for example |
side |
One of |
type |
Order type. |
time_in_force |
Optional time-in-force value. |
quantity |
Optional order quantity. |
quote_order_qty |
Optional quote-order quantity for |
price |
Optional limit price. |
new_client_order_id |
Optional client order identifier. |
strategy_id |
Optional numeric strategy identifier. |
strategy_type |
Optional numeric strategy type. Must be at least |
stop_price |
Optional trigger price. |
trailing_delta |
Optional trailing delta value. |
iceberg_qty |
Optional iceberg quantity. |
new_order_resp_type |
Optional response type. One of |
self_trade_prevention_mode |
Optional self-trade prevention mode. |
peg_price_type |
Optional pegged price type. One of |
peg_offset_value |
Optional peg offset value. |
peg_offset_type |
Optional peg offset type. Only |
compute_commission_rates |
Whether to return commission-rate details. |
config |
A spot configuration created by |
A parsed list.
Test a Binance Spot SOR order
spot_test_sor_order( symbol, side = c("BUY", "SELL"), type = c("LIMIT", "MARKET"), quantity, time_in_force = NULL, price = NULL, new_client_order_id = NULL, strategy_id = NULL, strategy_type = NULL, iceberg_qty = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, compute_commission_rates = FALSE, config = config_spot() )spot_test_sor_order( symbol, side = c("BUY", "SELL"), type = c("LIMIT", "MARKET"), quantity, time_in_force = NULL, price = NULL, new_client_order_id = NULL, strategy_id = NULL, strategy_type = NULL, iceberg_qty = NULL, new_order_resp_type = NULL, self_trade_prevention_mode = NULL, compute_commission_rates = FALSE, config = config_spot() )
symbol |
Trading pair symbol, for example |
side |
One of |
type |
SOR order type. One of |
quantity |
Order quantity. |
time_in_force |
Optional time-in-force value. |
price |
Optional limit price. |
new_client_order_id |
Optional client order identifier. |
strategy_id |
Optional numeric strategy identifier. |
strategy_type |
Optional numeric strategy type. Must be at least |
iceberg_qty |
Optional iceberg quantity. |
new_order_resp_type |
Optional response type. One of |
self_trade_prevention_mode |
Optional self-trade prevention mode. |
compute_commission_rates |
Whether to return commission-rate details. |
config |
A spot configuration created by |
A parsed list.