spot-new-order.Rd
Exposes the POST /api/v3/order/
endpoint.
spot_new_order(
order_type,
symbol,
side,
quantity,
price = NULL,
time_in_force = NULL,
test = FALSE,
fills = TRUE
)
spot_new_market_order(...)
spot_new_limit_order(...)
Order type. One of "LIMIT"
, "MARKET"
,
"STOP_LOSS"
, "STOP_LOSS_LIMIT"
, "TAKE_PROFIT"
,
"TAKE_PROFIT_LIMIT"
or "LIMIT_MAKER"
.
Symbol.
Trade side. Either "BUY"
or "SELL"
.
Amount to buy or sell.
Price at which to buy or sell.
Time for which order is valid. Options are: "GTC"
— (Good Til Canceled) order will remain on the book unless canceled;
"IOC"
— (Immediate Or Cancel) try to fill as much as possible before
it expires; or "FOK"
— (Fill Or Kill) Order will expire if full
order cannot be filled.
Is this just a test?
Whether to returns fills
element.
Further arguments passed to or from other methods.
A data frame.
if (FALSE) {
# Create new order (returns a data frame).
spot_new_order(
order_type = "LIMIT",
symbol = "LTCUSDT",
side = "SELL",
quantity = 1,
price = 67,
time_in_force = "GTC"
)
# Test new order creation (returns a Boolean).
spot_new_order(
order_type = "LIMIT",
symbol = "LTCUSDT",
side = "SELL",
quantity = 1,
price = 67,
time_in_force = "GTC",
test = TRUE
)
}