curl --request POST \
--url https://api.coinbase.com/api/v3/brokerage/orders/close_position \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"client_order_id": "0000-00000-000000",
"product_id": "BIT-28JUL23-CDE",
"size": 3
}'{
"success": true,
"success_response": {
"order_id": "11111-00000-000000",
"product_id": "BTC-USD",
"client_order_id": "0000-00000-000000"
},
"error_response": {
"message": "The order configuration was invalid",
"error_details": "Market orders cannot be placed with empty order sizes"
},
"order_configuration": {
"market_market_ioc": {
"quote_size": "10.00",
"base_size": "0.001"
},
"market_market_fok": {
"quote_size": "10.00",
"base_size": "0.001"
},
"sor_limit_ioc": {
"quote_size": "10.00",
"base_size": "0.001",
"limit_price": "10000.00"
},
"limit_limit_gtc": {
"quote_size": "10.00",
"base_size": "0.001",
"limit_price": "10000.00",
"post_only": false
},
"limit_limit_gtd": {
"quote_size": "10.00",
"base_size": "0.001",
"limit_price": "10000.00",
"end_time": "2021-05-31T09:59:59.000Z",
"post_only": false
},
"limit_limit_fok": {
"quote_size": "10.00",
"base_size": "0.001",
"limit_price": "10000.00"
},
"twap_limit_gtd": {
"quote_size": "10.00",
"base_size": "0.001",
"start_time": "2021-05-31T07:59:59.000Z",
"end_time": "2021-05-31T09:59:59.000Z",
"limit_price": "10000.00",
"number_buckets": "5",
"bucket_size": "2.00",
"bucket_duration": "300s"
},
"stop_limit_stop_limit_gtc": {
"base_size": "0.001",
"limit_price": "10000.00",
"stop_price": "20000.00",
"stop_direction": "20000.00"
},
"stop_limit_stop_limit_gtd": {
"base_size": 0.001,
"limit_price": "10000.00",
"stop_price": "20000.00",
"end_time": "2021-05-31T09:59:59.000Z",
"stop_direction": "20000.00"
},
"trigger_bracket_gtc": {
"base_size": 0.001,
"limit_price": "10000.00",
"stop_trigger_price": "20000.00"
},
"trigger_bracket_gtd": {
"base_size": 0.001,
"limit_price": "10000.00",
"stop_trigger_price": "20000.00",
"end_time": "2021-05-31T09:59:59.000Z"
},
"scaled_limit_gtc": {
"orders": [
{
"quote_size": "10.00",
"base_size": "0.001",
"limit_price": "10000.00",
"post_only": false
}
]
}
}
}Places an order to close any open positions for a specified product_id.
curl --request POST \
--url https://api.coinbase.com/api/v3/brokerage/orders/close_position \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"client_order_id": "0000-00000-000000",
"product_id": "BIT-28JUL23-CDE",
"size": 3
}'{
"success": true,
"success_response": {
"order_id": "11111-00000-000000",
"product_id": "BTC-USD",
"client_order_id": "0000-00000-000000"
},
"error_response": {
"message": "The order configuration was invalid",
"error_details": "Market orders cannot be placed with empty order sizes"
},
"order_configuration": {
"market_market_ioc": {
"quote_size": "10.00",
"base_size": "0.001"
},
"market_market_fok": {
"quote_size": "10.00",
"base_size": "0.001"
},
"sor_limit_ioc": {
"quote_size": "10.00",
"base_size": "0.001",
"limit_price": "10000.00"
},
"limit_limit_gtc": {
"quote_size": "10.00",
"base_size": "0.001",
"limit_price": "10000.00",
"post_only": false
},
"limit_limit_gtd": {
"quote_size": "10.00",
"base_size": "0.001",
"limit_price": "10000.00",
"end_time": "2021-05-31T09:59:59.000Z",
"post_only": false
},
"limit_limit_fok": {
"quote_size": "10.00",
"base_size": "0.001",
"limit_price": "10000.00"
},
"twap_limit_gtd": {
"quote_size": "10.00",
"base_size": "0.001",
"start_time": "2021-05-31T07:59:59.000Z",
"end_time": "2021-05-31T09:59:59.000Z",
"limit_price": "10000.00",
"number_buckets": "5",
"bucket_size": "2.00",
"bucket_duration": "300s"
},
"stop_limit_stop_limit_gtc": {
"base_size": "0.001",
"limit_price": "10000.00",
"stop_price": "20000.00",
"stop_direction": "20000.00"
},
"stop_limit_stop_limit_gtd": {
"base_size": 0.001,
"limit_price": "10000.00",
"stop_price": "20000.00",
"end_time": "2021-05-31T09:59:59.000Z",
"stop_direction": "20000.00"
},
"trigger_bracket_gtc": {
"base_size": 0.001,
"limit_price": "10000.00",
"stop_trigger_price": "20000.00"
},
"trigger_bracket_gtd": {
"base_size": 0.001,
"limit_price": "10000.00",
"stop_trigger_price": "20000.00",
"end_time": "2021-05-31T09:59:59.000Z"
},
"scaled_limit_gtc": {
"orders": [
{
"quote_size": "10.00",
"base_size": "0.001",
"limit_price": "10000.00",
"post_only": false
}
]
}
}
}A JWT signed using your CDP API Key Secret, encoded in base64. Refer to the Creating API Keys section of our Coinbase App Authentication docs for information on how to generate your Bearer Token.
A successful response.
Whether the order was created.
true
Show child attributes
The ID of the order.
"11111-00000-000000"
The trading pair (e.g. 'BTC-USD').
"BTC-USD"
The side of the market that the order is on (e.g. 'BUY', 'SELL').
BUY, SELL The unique ID provided for the order (used for identification purposes).
"0000-00000-000000"
Show child attributes
(Deprecated) The reason the order failed to be created
UNKNOWN_FAILURE_REASON, UNSUPPORTED_ORDER_CONFIGURATION, INVALID_SIDE, INVALID_PRODUCT_ID, INVALID_SIZE_PRECISION, INVALID_PRICE_PRECISION, INSUFFICIENT_FUND, INVALID_LEDGER_BALANCE, ORDER_ENTRY_DISABLED, INELIGIBLE_PAIR, INVALID_LIMIT_PRICE_POST_ONLY, INVALID_LIMIT_PRICE, INVALID_NO_LIQUIDITY, INVALID_REQUEST, COMMANDER_REJECTED_NEW_ORDER, INSUFFICIENT_FUNDS, IN_LIQUIDATION, INVALID_MARGIN_TYPE, INVALID_LEVERAGE, UNTRADABLE_PRODUCT, INVALID_FCM_TRADING_SESSION, GEOFENCING_RESTRICTION, QUOTE_SIZE_NOT_ALLOWED_FOR_BRACKET, INVALID_BRACKET_PRICES, MISSING_MARKET_TRADE_DATA, INVALID_BRACKET_LIMIT_PRICE, INVALID_BRACKET_STOP_TRIGGER_PRICE, BRACKET_LIMIT_PRICE_OUT_OF_BOUNDS, STOP_TRIGGER_PRICE_OUT_OF_BOUNDS, BRACKET_ORDER_NOT_SUPPORTED, FOK_DISABLED, FOK_ONLY_ALLOWED_ON_LIMIT_ORDERS, POST_ONLY_NOT_ALLOWED_WITH_FOK, UBO_HIGH_LEVERAGE_QUANTITY_BREACHED, END_TIME_TOO_FAR_IN_FUTURE, LIMIT_PRICE_TOO_FAR_FROM_MARKET, OPEN_BRACKET_ORDERS, FUTURES_AFTER_HOUR_INVALID_ORDER_TYPE, FUTURES_AFTER_HOUR_INVALID_TIME_IN_FORCE, INVALID_ATTACHED_TAKE_PROFIT_PRICE, INVALID_ATTACHED_STOP_LOSS_PRICE, INVALID_ATTACHED_TAKE_PROFIT_PRICE_PRECISION, INVALID_ATTACHED_STOP_LOSS_PRICE_PRECISION, INVALID_ATTACHED_TAKE_PROFIT_PRICE_OUT_OF_BOUNDS, INVALID_ATTACHED_STOP_LOSS_PRICE_OUT_OF_BOUNDS, INVALID_ATTACHED_TAKE_PROFIT_PRICE_EXCEEDS_MAX_DISTANCE_FROM_ORIGINATING_PRICE, INVALID_ATTACHED_TAKE_PROFIT_SIZE_BELOW_MIN, ATTACHED_ORDER_SIZE_MUST_BE_NIL, INVALID_SETTLEMENT_CURRENCY, DURATION_TOO_SMALL, INTX_FOK_ONLY_ALLOWED_ON_LIMIT_AND_MARKET_ORDERS, BUCKET_SIZE_SMALLER_THAN_QUOTE_MIN, BUCKET_SIZE_SMALLER_THAN_BASE_MIN, END_TIME_AFTER_CONTRACT_EXPIRATION, START_TIME_MUST_BE_SPECIFIED, ICEBERG_ORDERS_NOT_SUPPORTED, END_TIME_IS_IN_THE_PAST, GTD_ORDERS_MUST_HAVE_END_TIME, ATTACHED_ORDER_MUST_HAVE_POSITIVE_PRICES, INVALID_ORDER_SIDE_FOR_ATTACHED_TPSL, ATTACHED_ORDERS_ONLY_ALLOWED_ON_MARKET_LIMIT, INVALID_ORDER_TYPE_FOR_ATTACHED, PRICE_NOT_ALLOWED_FOR_MARKET_ORDERS, REDUCE_ONLY_NOT_ALLOWED_ON_VENUE, DURATION_TOO_LARGE, REDUCE_ONLY_NOT_ALLOWED_ON_SPOT_PRODUCTS, LIMIT_ORDER_PRICE_EXCEEDS_PRICE_BAND_ON_BUY, LIMIT_ORDER_PRICE_EXCEEDS_PRICE_BAND_ON_SELL, INVALID_ATTACHED_TAKE_PROFIT_PRICE_OUT_OF_BOUNDS_ON_AGGRESSIVE_ORDER, INVALID_ATTACHED_STOP_LOSS_PRICE_OUT_OF_BOUNDS_ON_AGGRESSIVE_ORDER, STOP_ALREADY_TRIGGERED, REPLACE_NOT_SUPPORTED, ORDER_IS_PENDING_CANCEL, POSITION_SIZE_INCREASE_REJECT, ASSET_BALANCE_INCREASE_REJECT, TOO_MANY_PENDING_REPLACES, INVALID_RFQ_BASE_SIZE_TOO_SMALL, INVALID_RFQ_BASE_SIZE_TOO_LARGE, INVALID_RFQ_QUOTE_SIZE_TOO_SMALL, INVALID_RFQ_QUOTE_SIZE_TOO_LARGE, INVALID_UNSUPPORTED_INSTRUMENT, REDUCE_ONLY_INCREASED_POSITION_SIZE, SCALED_PARAM_INFEASIBLE, SCALED_MIN_ORDER_VIOLATION, SCALED_MAX_ORDER_VIOLATION, POST_ONLY_NOT_ALLOWED_WITH_PEG, INVALID_PEG_OFFSET, INVALID_PEG_WIG_LEVEL, INVALID_PEG_VENUE_OPTIONS, PEG_INVALID_ORDER_TYPE, SINGLE_LEGGED_TPSL_NOT_ALLOWED, FRACTIONAL_ORDERS_NOT_ALLOWED_FOR_PRODUCT, QUOTE_ORDERS_NOT_ALLOWED_FOR_PRODUCT, NBBO_NOT_PROVIDED, INVALID_NBBO_BID_PRICE, INVALID_NBBO_ASK_PRICE, NOTIONAL_SIZE_BREACHES_FRACTIONAL_MINIMUM, MARKET_ORDERS_PROHIBITED_DURING_NON_CORE_SESSION, NOTIONAL_ORDERS_PROHIBITED_DURING_NON_CORE_SESSION, MAX_NOTIONAL_PER_ORDER_BREACHED_15C35_CHECK, MAX_SHARES_PER_ORDER_BREACHED_15C35_CHECK, INVALID_EQUITY_TRADING_SESSION, PRODUCT_TRADING_HALTED, TRADING_DISABLED Generic error message explaining why the order was not created
"The order configuration was invalid"
Descriptive error message explaining why the order was not created
"Market orders cannot be placed with empty order sizes"
(Deprecated) The reason the order failed to be created
UNKNOWN_PREVIEW_FAILURE_REASON, PREVIEW_MISSING_COMMISSION_RATE, PREVIEW_INVALID_SIDE, PREVIEW_INVALID_ORDER_CONFIG, PREVIEW_INVALID_PRODUCT_ID, PREVIEW_INVALID_SIZE_PRECISION, PREVIEW_INVALID_PRICE_PRECISION, PREVIEW_MISSING_PRODUCT_PRICE_BOOK, PREVIEW_INVALID_LEDGER_BALANCE, PREVIEW_INSUFFICIENT_LEDGER_BALANCE, PREVIEW_INVALID_LIMIT_PRICE_POST_ONLY, PREVIEW_INVALID_LIMIT_PRICE, PREVIEW_INVALID_NO_LIQUIDITY, PREVIEW_INSUFFICIENT_FUND, PREVIEW_INVALID_COMMISSION_CONFIGURATION, PREVIEW_INVALID_STOP_PRICE, PREVIEW_INVALID_BASE_SIZE_TOO_LARGE, PREVIEW_INVALID_BASE_SIZE_TOO_SMALL, PREVIEW_INVALID_QUOTE_SIZE_PRECISION, PREVIEW_INVALID_QUOTE_SIZE_TOO_LARGE, PREVIEW_INVALID_PRICE_TOO_LARGE, PREVIEW_INVALID_QUOTE_SIZE_TOO_SMALL, PREVIEW_INSUFFICIENT_FUNDS_FOR_FUTURES, PREVIEW_BREACHED_PRICE_LIMIT, PREVIEW_BREACHED_ACCOUNT_POSITION_LIMIT, PREVIEW_BREACHED_COMPANY_POSITION_LIMIT, PREVIEW_INVALID_MARGIN_HEALTH, PREVIEW_RISK_PROXY_FAILURE, PREVIEW_UNTRADABLE_FCM_ACCOUNT_STATUS, PREVIEW_IN_LIQUIDATION, PREVIEW_INVALID_MARGIN_TYPE, PREVIEW_INVALID_LEVERAGE, PREVIEW_UNTRADABLE_PRODUCT, PREVIEW_INVALID_FCM_TRADING_SESSION, PREVIEW_NOT_ALLOWED_BY_MARKET_STATE, PREVIEW_BREACHED_OPEN_INTEREST_LIMIT, PREVIEW_GEOFENCING_RESTRICTION, PREVIEW_INVALID_END_TIME, PREVIEW_OPPOSITE_MARGIN_TYPE_EXISTS, PREVIEW_QUOTE_SIZE_NOT_ALLOWED_FOR_BRACKET, PREVIEW_INVALID_BRACKET_PRICES, PREVIEW_MISSING_MARKET_TRADE_DATA, PREVIEW_INVALID_BRACKET_LIMIT_PRICE, PREVIEW_INVALID_BRACKET_STOP_TRIGGER_PRICE, PREVIEW_BRACKET_LIMIT_PRICE_OUT_OF_BOUNDS, PREVIEW_STOP_TRIGGER_PRICE_OUT_OF_BOUNDS, PREVIEW_BRACKET_ORDER_NOT_SUPPORTED, PREVIEW_INVALID_STOP_PRICE_PRECISION, PREVIEW_STOP_PRICE_ABOVE_LIMIT_PRICE, PREVIEW_STOP_PRICE_BELOW_LIMIT_PRICE, PREVIEW_STOP_PRICE_ABOVE_LAST_TRADE_PRICE, PREVIEW_STOP_PRICE_BELOW_LAST_TRADE_PRICE, PREVIEW_FOK_DISABLED, PREVIEW_FOK_ONLY_ALLOWED_ON_LIMIT_ORDERS, PREVIEW_POST_ONLY_NOT_ALLOWED_WITH_FOK, PREVIEW_UBO_HIGH_LEVERAGE_QUANTITY_BREACHED, PREVIEW_ECOSYSTEM_LEVERAGE_UTILIZATION_BREACHED, PREVIEW_CLOSE_ONLY_FAILURE, PREVIEW_UBO_HIGH_LEVERAGE_NOTIONAL_BREACHED, PREVIEW_END_TIME_TOO_FAR_IN_FUTURE, PREVIEW_LIMIT_PRICE_TOO_FAR_FROM_MARKET, PREVIEW_FUTURES_AFTER_HOUR_INVALID_ORDER_TYPE, PREVIEW_FUTURES_AFTER_HOUR_INVALID_TIME_IN_FORCE, PREVIEW_INVALID_ATTACHED_TAKE_PROFIT_PRICE, PREVIEW_INVALID_ATTACHED_STOP_LOSS_PRICE, PREVIEW_INVALID_ATTACHED_TAKE_PROFIT_PRICE_PRECISION, PREVIEW_INVALID_ATTACHED_STOP_LOSS_PRICE_PRECISION, PREVIEW_INVALID_ATTACHED_TAKE_PROFIT_PRICE_OUT_OF_BOUNDS, PREVIEW_INVALID_ATTACHED_STOP_LOSS_PRICE_OUT_OF_BOUNDS, PREVIEW_INVALID_BRACKET_ORDER_SIDE, PREVIEW_BRACKET_ORDER_SIZE_EXCEEDS_POSITION, PREVIEW_ORDER_SIZE_EXCEEDS_BRACKETED_POSITION, PREVIEW_INVALID_LIMIT_PRICE_PRECISION, PREVIEW_INVALID_STOP_TRIGGER_PRICE_PRECISION, PREVIEW_INVALID_ATTACHED_TAKE_PROFIT_PRICE_EXCEEDS_MAX_DISTANCE_FROM_ORIGINATING_PRICE, PREVIEW_INVALID_ATTACHED_TAKE_PROFIT_SIZE_BELOW_MIN, PREVIEW_ATTACHED_ORDER_SIZE_MUST_BE_NIL, PREVIEW_BELOW_MIN_SIZE_FOR_DURATION, PREVIEW_MAX_DAILY_VOLUME_NOTIONAL_BREACHED, PREVIEW_INVALID_SETTLEMENT_CURRENCY, PREVIEW_DURATION_TOO_SMALL, PREVIEW_INTX_FOK_ONLY_ALLOWED_ON_LIMIT_AND_MARKET_ORDERS, PREVIEW_BUCKET_SIZE_SMALLER_THAN_QUOTE_MIN, PREVIEW_BUCKET_SIZE_SMALLER_THAN_BASE_MIN, PREVIEW_END_TIME_AFTER_CONTRACT_EXPIRATION, PREVIEW_START_TIME_MUST_BE_SPECIFIED, PREVIEW_ICEBERG_ORDERS_NOT_SUPPORTED, PREVIEW_END_TIME_IS_IN_THE_PAST, PREVIEW_GTD_ORDERS_MUST_HAVE_END_TIME, PREVIEW_ATTACHED_ORDER_MUST_HAVE_POSITIVE_PRICES, PREVIEW_INVALID_ORDER_SIDE_FOR_ATTACHED_TPSL, PREVIEW_ATTACHED_ORDERS_ONLY_ALLOWED_ON_MARKET_LIMIT, PREVIEW_INVALID_ORDER_TYPE_FOR_ATTACHED, PREVIEW_PRICE_NOT_ALLOWED_FOR_MARKET_ORDERS, PREVIEW_REDUCE_ONLY_NOT_ALLOWED_ON_VENUE, PREVIEW_NON_NUMERIC_ORDER_SIZE, PREVIEW_INVALID_INTX_CLIENT_ORDER_ID, PREVIEW_DURATION_TOO_LARGE, PREVIEW_REDUCE_ONLY_NOT_ALLOWED_ON_SPOT_PRODUCTS, PREVIEW_LIMIT_ORDER_PRICE_EXCEEDS_PRICE_BAND_ON_BUY, PREVIEW_LIMIT_ORDER_PRICE_EXCEEDS_PRICE_BAND_ON_SELL, PREVIEW_INVALID_ATTACHED_TAKE_PROFIT_PRICE_OUT_OF_BOUNDS_ON_AGGRESSIVE_ORDER, PREVIEW_INVALID_ATTACHED_STOP_LOSS_PRICE_OUT_OF_BOUNDS_ON_AGGRESSIVE_ORDER, PREVIEW_STOP_TRIGGERED, PREVIEW_REPLACE_NOT_SUPPORTED, PREVIEW_ORDER_IS_PENDING_CANCEL, PREVIEW_POSITION_SIZE_INCREASE_REJECT, PREVIEW_ASSET_BALANCE_INCREASE_REJECT, PREVIEW_TOO_MANY_PENDING_REPLACES, PREVIEW_INVALID_RFQ_BASE_SIZE_TOO_SMALL, PREVIEW_INVALID_RFQ_BASE_SIZE_TOO_LARGE, PREVIEW_INVALID_RFQ_QUOTE_SIZE_TOO_SMALL, PREVIEW_INVALID_RFQ_QUOTE_SIZE_TOO_LARGE, PREVIEW_REDUCE_ONLY_INCREASED_POSITION_SIZE, PREVIEW_COMPLIANCE_PURCHASE_LIMIT_EXCEEDED, PREVIEW_SCALED_PARAM_INFEASIBLE, PREVIEW_SCALED_MIN_ORDER_VIOLATION, PREVIEW_SCALED_MAX_ORDER_VIOLATION, PREVIEW_POST_ONLY_NOT_ALLOWED_WITH_PEG, PREVIEW_INVALID_PEG_OFFSET, PREVIEW_INVALID_PEG_WIG_LEVEL, PREVIEW_INVALID_PEG_VENUE_OPTIONS, PREVIEW_PEG_INVALID_ORDER_TYPE, PREVIEW_SINGLE_LEGGED_TPSL_NOT_ALLOWED, PREVIEW_FRACTIONAL_ORDERS_NOT_ALLOWED_FOR_PRODUCT, PREVIEW_QUOTE_ORDERS_NOT_ALLOWED_FOR_PRODUCT, PREVIEW_NBBO_NOT_PROVIDED, PREVIEW_INVALID_NBBO_BID_PRICE, PREVIEW_INVALID_NBBO_ASK_PRICE, PREVIEW_NOTIONAL_SIZE_BREACHES_FRACTIONAL_MINIMUM, PREVIEW_MARKET_ORDERS_PROHIBITED_DURING_NON_CORE_SESSION, PREVIEW_NOTIONAL_ORDERS_PROHIBITED_DURING_NON_CORE_SESSION, PREVIEW_MAX_NOTIONAL_PER_ORDER_BREACHED_15C35_CHECK, PREVIEW_MAX_SHARES_PER_ORDER_BREACHED_15C35_CHECK, PREVIEW_INVALID_EQUITY_TRADING_SESSION, PREVIEW_PRODUCT_TRADING_HALTED, PREVIEW_TRADING_DISABLED, PREVIEW_INVALID_BRACKET_LIMIT_PRICE_PRECISION The reason the order failed to be created
UNKNOWN_FAILURE_REASON, UNSUPPORTED_ORDER_CONFIGURATION, INVALID_SIDE, INVALID_PRODUCT_ID, INVALID_SIZE_PRECISION, INVALID_PRICE_PRECISION, INSUFFICIENT_FUND, INVALID_LEDGER_BALANCE, ORDER_ENTRY_DISABLED, INELIGIBLE_PAIR, INVALID_LIMIT_PRICE_POST_ONLY, INVALID_LIMIT_PRICE, INVALID_NO_LIQUIDITY, INVALID_REQUEST, COMMANDER_REJECTED_NEW_ORDER, INSUFFICIENT_FUNDS, IN_LIQUIDATION, INVALID_MARGIN_TYPE, INVALID_LEVERAGE, UNTRADABLE_PRODUCT, INVALID_FCM_TRADING_SESSION, GEOFENCING_RESTRICTION, QUOTE_SIZE_NOT_ALLOWED_FOR_BRACKET, INVALID_BRACKET_PRICES, MISSING_MARKET_TRADE_DATA, INVALID_BRACKET_LIMIT_PRICE, INVALID_BRACKET_STOP_TRIGGER_PRICE, BRACKET_LIMIT_PRICE_OUT_OF_BOUNDS, STOP_TRIGGER_PRICE_OUT_OF_BOUNDS, BRACKET_ORDER_NOT_SUPPORTED, FOK_DISABLED, FOK_ONLY_ALLOWED_ON_LIMIT_ORDERS, POST_ONLY_NOT_ALLOWED_WITH_FOK, UBO_HIGH_LEVERAGE_QUANTITY_BREACHED, END_TIME_TOO_FAR_IN_FUTURE, LIMIT_PRICE_TOO_FAR_FROM_MARKET, OPEN_BRACKET_ORDERS, FUTURES_AFTER_HOUR_INVALID_ORDER_TYPE, FUTURES_AFTER_HOUR_INVALID_TIME_IN_FORCE, INVALID_ATTACHED_TAKE_PROFIT_PRICE, INVALID_ATTACHED_STOP_LOSS_PRICE, INVALID_ATTACHED_TAKE_PROFIT_PRICE_PRECISION, INVALID_ATTACHED_STOP_LOSS_PRICE_PRECISION, INVALID_ATTACHED_TAKE_PROFIT_PRICE_OUT_OF_BOUNDS, INVALID_ATTACHED_STOP_LOSS_PRICE_OUT_OF_BOUNDS, INVALID_ATTACHED_TAKE_PROFIT_PRICE_EXCEEDS_MAX_DISTANCE_FROM_ORIGINATING_PRICE, INVALID_ATTACHED_TAKE_PROFIT_SIZE_BELOW_MIN, ATTACHED_ORDER_SIZE_MUST_BE_NIL, INVALID_SETTLEMENT_CURRENCY, DURATION_TOO_SMALL, INTX_FOK_ONLY_ALLOWED_ON_LIMIT_AND_MARKET_ORDERS, BUCKET_SIZE_SMALLER_THAN_QUOTE_MIN, BUCKET_SIZE_SMALLER_THAN_BASE_MIN, END_TIME_AFTER_CONTRACT_EXPIRATION, START_TIME_MUST_BE_SPECIFIED, ICEBERG_ORDERS_NOT_SUPPORTED, END_TIME_IS_IN_THE_PAST, GTD_ORDERS_MUST_HAVE_END_TIME, ATTACHED_ORDER_MUST_HAVE_POSITIVE_PRICES, INVALID_ORDER_SIDE_FOR_ATTACHED_TPSL, ATTACHED_ORDERS_ONLY_ALLOWED_ON_MARKET_LIMIT, INVALID_ORDER_TYPE_FOR_ATTACHED, PRICE_NOT_ALLOWED_FOR_MARKET_ORDERS, REDUCE_ONLY_NOT_ALLOWED_ON_VENUE, DURATION_TOO_LARGE, REDUCE_ONLY_NOT_ALLOWED_ON_SPOT_PRODUCTS, LIMIT_ORDER_PRICE_EXCEEDS_PRICE_BAND_ON_BUY, LIMIT_ORDER_PRICE_EXCEEDS_PRICE_BAND_ON_SELL, INVALID_ATTACHED_TAKE_PROFIT_PRICE_OUT_OF_BOUNDS_ON_AGGRESSIVE_ORDER, INVALID_ATTACHED_STOP_LOSS_PRICE_OUT_OF_BOUNDS_ON_AGGRESSIVE_ORDER, STOP_ALREADY_TRIGGERED, REPLACE_NOT_SUPPORTED, ORDER_IS_PENDING_CANCEL, POSITION_SIZE_INCREASE_REJECT, ASSET_BALANCE_INCREASE_REJECT, TOO_MANY_PENDING_REPLACES, INVALID_RFQ_BASE_SIZE_TOO_SMALL, INVALID_RFQ_BASE_SIZE_TOO_LARGE, INVALID_RFQ_QUOTE_SIZE_TOO_SMALL, INVALID_RFQ_QUOTE_SIZE_TOO_LARGE, INVALID_UNSUPPORTED_INSTRUMENT, REDUCE_ONLY_INCREASED_POSITION_SIZE, SCALED_PARAM_INFEASIBLE, SCALED_MIN_ORDER_VIOLATION, SCALED_MAX_ORDER_VIOLATION, POST_ONLY_NOT_ALLOWED_WITH_PEG, INVALID_PEG_OFFSET, INVALID_PEG_WIG_LEVEL, INVALID_PEG_VENUE_OPTIONS, PEG_INVALID_ORDER_TYPE, SINGLE_LEGGED_TPSL_NOT_ALLOWED, FRACTIONAL_ORDERS_NOT_ALLOWED_FOR_PRODUCT, QUOTE_ORDERS_NOT_ALLOWED_FOR_PRODUCT, NBBO_NOT_PROVIDED, INVALID_NBBO_BID_PRICE, INVALID_NBBO_ASK_PRICE, NOTIONAL_SIZE_BREACHES_FRACTIONAL_MINIMUM, MARKET_ORDERS_PROHIBITED_DURING_NON_CORE_SESSION, NOTIONAL_ORDERS_PROHIBITED_DURING_NON_CORE_SESSION, MAX_NOTIONAL_PER_ORDER_BREACHED_15C35_CHECK, MAX_SHARES_PER_ORDER_BREACHED_15C35_CHECK, INVALID_EQUITY_TRADING_SESSION, PRODUCT_TRADING_HALTED, TRADING_DISABLED The configuration of the order (e.g. the order type, size, etc).
Show child attributes
Buy or sell a specified quantity of an Asset at the current best available market price. Read more on Market Orders
Show child attributes
The amount of the second Asset in the Trading Pair. For example, on the BTC/USD Order Book, USD is the Quote Asset.
"10.00"
The amount of the first Asset in the Trading Pair. For example, on the BTC-USD Order Book, BTC is the Base Asset.
"0.001"
Buy or sell a specified quantity of an Asset at the current best available market price. The Order will only post to the Order Book if it is to immediately and completely Fill. Read more on Market Orders
Show child attributes
The amount of the second Asset in the Trading Pair. For example, on the BTC/USD Order Book, USD is the Quote Asset.
"10.00"
The amount of the first Asset in the Trading Pair. For example, on the BTC-USD Order Book, BTC is the Base Asset.
"0.001"
Buy or sell a specified quantity of an Asset at a specified price. The Order will only post to the Order Book if it will immediately Fill; any remaining quantity is canceled. Read more on Limit Orders.
Show child attributes
The amount of the second Asset in the Trading Pair. For example, on the BTC/USD Order Book, USD is the Quote Asset.
"10.00"
The amount of the first Asset in the Trading Pair. For example, on the BTC-USD Order Book, BTC is the Base Asset.
"0.001"
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.
"10000.00"
Buy or sell a specified quantity of an Asset at a specified price. If posted, the Order will remain on the Order Book until canceled. Read more on Limit Orders.
Show child attributes
The amount of the second Asset in the Trading Pair. For example, on the BTC/USD Order Book, USD is the Quote Asset.
"10.00"
The amount of the first Asset in the Trading Pair. For example, on the BTC-USD Order Book, BTC is the Base Asset.
"0.001"
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.
"10000.00"
Enable or disable Post-only Mode. When enabled, only Maker Orders will be posted to the Order Book. Orders that will be posted as a Taker Order will be rejected.
false
Buy or sell a specified quantity of an Asset at a specified price. If posted, the Order will remain on the Order Book until a certain time is reached or the Order is canceled. Read more on Limit Orders.
Show child attributes
The amount of the second Asset in the Trading Pair. For example, on the BTC/USD Order Book, USD is the Quote Asset.
"10.00"
The amount of the first Asset in the Trading Pair. For example, on the BTC-USD Order Book, BTC is the Base Asset.
"0.001"
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.
"10000.00"
The time at which the order will be cancelled if it is not Filled.
"2021-05-31T09:59:59.000Z"
Enable or disable Post-only Mode. When enabled, only Maker Orders will be posted to the Order Book. Orders that will be posted as a Taker Order will be rejected.
false
Buy or sell a specified quantity of an Asset at a specified price. The Order will only post to the Order Book if it is to immediately and completely Fill. Read more on Limit Orders.
Show child attributes
The amount of the second Asset in the Trading Pair. For example, on the BTC/USD Order Book, USD is the Quote Asset.
"10.00"
The amount of the first Asset in the Trading Pair. For example, on the BTC-USD Order Book, BTC is the Base Asset.
"0.001"
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.
"10000.00"
A time-weighted average price (TWAP) order type that calculates the average price of a product to programmatically execute an order over a specified duration.
Show child attributes
The amount of the second Asset in the Trading Pair. For example, on the BTC/USD Order Book, USD is the Quote Asset.
"10.00"
The amount of the first Asset in the Trading Pair. For example, on the BTC-USD Order Book, BTC is the Base Asset.
"0.001"
Time at which the order should begin executing.
"2021-05-31T07:59:59.000Z"
The time at which the order will be cancelled if it is not Filled.
"2021-05-31T09:59:59.000Z"
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.
"10000.00"
The number of smaller buckets/suborders over which the entire order will be broken into. Each suborder will be executed over a duration calculated based on the end_time
"5"
The size of each suborder. bucket_size multiplied by number_buckets should match the size of the entire twap order)
"2.00"
The duration over which each sub order was executed
"300s"
Posts an Order to buy or sell a specified quantity of an Asset, but only if and when the last trade price on the Order Book equals or surpasses the Stop Price. If posted, the Order will remain on the Order Book until canceled. Read more on Stop-Limit Orders.
Show child attributes
The amount of the first Asset in the Trading Pair. For example, on the BTC-USD Order Book, BTC is the Base Asset.
"0.001"
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.
"10000.00"
The specified price that will trigger the placement of the Order.
"20000.00"
The direction of the stop limit Order. If Up, then the Order will trigger when the last trade price goes above the stop_price. If Down, then the Order will trigger when the last trade price goes below the stop_price.
STOP_DIRECTION_STOP_UP, STOP_DIRECTION_STOP_DOWN "20000.00"
Posts an Order to buy or sell a specified quantity of an Asset, but only if and when the last trade price on the Order Book equals or surpasses the Stop Price. If posted, the Order will remain on the Order Book until a certain time is reached or the Order. Read more on Stop-Limit Orders.
Show child attributes
The amount of the first Asset in the Trading Pair. For example, on the BTC-USD Order Book, BTC is the Base Asset.
0.001
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.
"10000.00"
The specified price that will trigger the placement of the Order.
"20000.00"
The time at which the order will be cancelled if it is not Filled.
"2021-05-31T09:59:59.000Z"
The direction of the stop limit Order. If Up, then the Order will trigger when the last trade price goes above the stop_price. If Down, then the Order will trigger when the last trade price goes below the stop_price.
STOP_DIRECTION_STOP_UP, STOP_DIRECTION_STOP_DOWN "20000.00"
A Limit Order to buy or sell a specified quantity of an Asset at a specified price, with stop limit order parameters embedded in the order. If posted, the Order will remain on the Order Book until canceled. Read more on Bracket Orders.
Show child attributes
The amount of the first Asset in the Trading Pair. For example, on the BTC-USD Order Book, BTC is the Base Asset.
0.001
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.
"10000.00"
The price level (in quote currency) where the position will be exited. When triggered, a stop limit order is automatically placed with a limit price 5% higher for BUYS and 5% lower for SELLS.
"20000.00"
A Limit Order to buy or sell a specified quantity of an Asset at a specified price, with stop limit order parameters embedded in the order. If posted, the Order will remain on the Order Book until a certain time is reached or the Order is canceled. Read more on Bracket Orders.
Show child attributes
The amount of the first Asset in the Trading Pair. For example, on the BTC-USD Order Book, BTC is the Base Asset.
0.001
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.
"10000.00"
The price level (in quote currency) where the position will be exited. When triggered, a stop limit order is automatically placed with a limit price 5% higher for BUYS and 5% lower for SELLS.
"20000.00"
The time at which the order will be cancelled if it is not Filled.
"2021-05-31T09:59:59.000Z"
A scaled order enables users to divide a large order into multiple smaller limit orders, which are placed incrementally across a user-defined price range. Read more on Limit Orders.
Show child attributes
Show child attributes
The amount of the second Asset in the Trading Pair. For example, on the BTC/USD Order Book, USD is the Quote Asset.
"10.00"
The amount of the first Asset in the Trading Pair. For example, on the BTC-USD Order Book, BTC is the Base Asset.
"0.001"
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.
"10000.00"
Enable or disable Post-only Mode. When enabled, only Maker Orders will be posted to the Order Book. Orders that will be posted as a Taker Order will be rejected.
false
FLAT, LINEAR_INCREASING, LINEAR_DECREASING Size distribution across the child orders.
UNKNOWN_DISTRIBUTION, INCREASING, DECREASING, EVENLY_SPLIT Was this page helpful?