cb_stp_lmt_gtd_order {rCoinbase} | R Documentation |
Spot: Place Stop-Limit GTD Order
Description
Spot: Place Stop-Limit GTD Order
Usage
cb_stp_lmt_gtd_order(
client_order_id = cb_get_order_id(),
product_id,
side,
base_size,
limit_price,
stop_price,
order_exp,
stop_direction
)
Arguments
client_order_id |
= (string) A unique ID provided for the order (used for identification purposes) Example: 0000-00000-000000 |
product_id |
= (string) The trading pair (e.g. 'BTC-USD'). Example: BTC-USD |
side |
= (string) The side of the market that the order is on (e.g. 'BUY', 'SELL'). Possible values: BUY, SELL |
base_size |
= (string) The amount of the first Asset in the Trading Pair. Example: 0.001 |
limit_price |
= (string) The specified price, or better, that the Order should be executed at. A Buy Order will execute at or lower than the limit price. A Sell Order will execute at or higher than the limit price. Example: 10000.00 |
stop_price |
= (string) The specified price that will trigger the placement of the Order. Example: 20000.00 |
order_exp |
= (TimeStamp) Enter the time you wish to cancel if not filled: Ex. Sys.time()+minutes(10) |
stop_direction |
= (string) The direction of the stop limit Order. Possible values: STOP_DIRECTION_STOP_UP, STOP_DIRECTION_STOP_DOWN |
Value
returns order details as a data.frame
for stop-limit GTD orders
Examples
## Not run:
cb_stp_lmt_gtd_order(product_id="BTC-USD",
side="BUY",
base_size="0.00001",
limit_price="100000",
stop_price="85000",
order_exp=Sys.time()+minutes(15),
stop_direction='STOP_DIRECTION_STOP_DOWN')
## End(Not run)