Send new order
POST /v1/orders
This request creating new order for the specific exchange.
- application/json
Request Body required
OrderNewSingleRequest object.
- exchange_id string required
Exchange identifier used to identify the routing destination.
- client_order_id string required
The unique identifier of the order assigned by the client.
- symbol_id_exchange string
Exchange symbol. One of the properties (
symbol_id_exchange
,symbol_id_coinapi
) is required to identify the market for the new order. - symbol_id_coinapi string
CoinAPI symbol. One of the properties (
symbol_id_exchange
,symbol_id_coinapi
) is required to identify the market for the new order. - amount_order number required
Order quantity.
- price number required
Order price.
- side OrdSide required
Possible values: [
BUY
,SELL
]Side of order.
- order_type OrdType required
Possible values: [
LIMIT
]Order types are documented in the separate section: EMS / Starter Guide / Order parameters / Order type
- time_in_force TimeInForce required
Possible values: [
GOOD_TILL_CANCEL
,GOOD_TILL_TIME_EXCHANGE
,GOOD_TILL_TIME_OMS
,FILL_OR_KILL
,IMMEDIATE_OR_CANCEL
]Order time in force options are documented in the separate section: EMS / Starter Guide / Order parameters / Time in force
- expire_time date
Expiration time. Conditionaly required for orders with time_in_force =
GOOD_TILL_TIME_EXCHANGE
orGOOD_TILL_TIME_OEML
. - exec_inst string[]
Possible values: [
MAKER_OR_CANCEL
,AUCTION_ONLY
,INDICATION_OF_INTEREST
]Order execution instructions are documented in the separate section: EMS / Starter Guide / Order parameters / Execution instructions
- 200
- 400
- 490
- 504
Created
- application/json
- Schema
- Example (from schema)
Schema
- exchange_id string required
Exchange identifier used to identify the routing destination.
- client_order_id string required
The unique identifier of the order assigned by the client.
- symbol_id_exchange string
Exchange symbol. One of the properties (
symbol_id_exchange
,symbol_id_coinapi
) is required to identify the market for the new order. - symbol_id_coinapi string
CoinAPI symbol. One of the properties (
symbol_id_exchange
,symbol_id_coinapi
) is required to identify the market for the new order. - amount_order number required
Order quantity.
- price number required
Order price.
- side OrdSide required
Possible values: [
BUY
,SELL
]Side of order.
- order_type OrdType required
Possible values: [
LIMIT
]Order types are documented in the separate section: EMS / Starter Guide / Order parameters / Order type
- time_in_force TimeInForce required
Possible values: [
GOOD_TILL_CANCEL
,GOOD_TILL_TIME_EXCHANGE
,GOOD_TILL_TIME_OMS
,FILL_OR_KILL
,IMMEDIATE_OR_CANCEL
]Order time in force options are documented in the separate section: EMS / Starter Guide / Order parameters / Time in force
- expire_time date
Expiration time. Conditionaly required for orders with time_in_force =
GOOD_TILL_TIME_EXCHANGE
orGOOD_TILL_TIME_OEML
. - exec_inst string[]
Possible values: [
MAKER_OR_CANCEL
,AUCTION_ONLY
,INDICATION_OF_INTEREST
]Order execution instructions are documented in the separate section: EMS / Starter Guide / Order parameters / Execution instructions
- client_order_id_format_exchange string required
The unique identifier of the order assigned by the client converted to the exchange order tag format for the purpose of tracking it.
- exchange_order_id string
Unique identifier of the order assigned by the exchange or executing system.
- amount_open number required
Quantity open for further execution.
amount_open
=amount_order
-amount_filled
- amount_filled number required
Total quantity filled.
- avg_px number
Calculated average price of all fills on this order.
- status OrdStatus required
Possible values: [
RECEIVED
,ROUTING
,ROUTED
,NEW
,PENDING_CANCEL
,PARTIALLY_FILLED
,FILLED
,CANCELED
,REJECTED
]Order statuses and the lifecycle are documented in the separate section: EMS / Starter Guide / Order Lifecycle
- status_history array[]
Timestamped history of order status changes.
- error_message string
Error message.
fills object[]
Relay fill information on working orders.
Array [time dateExecution time.
price numberExecution price.
amount numberExecuted quantity.
]
{
"exchange_id": "KRAKEN",
"client_order_id": "6ab36bc1-344d-432e-ac6d-0bf44ee64c2b",
"symbol_id_exchange": "XBT/USDT",
"symbol_id_coinapi": "KRAKEN_SPOT_BTC_USDT",
"amount_order": 0.045,
"price": 0.0783,
"side": "BUY",
"order_type": "LIMIT",
"time_in_force": "GOOD_TILL_CANCEL",
"expire_time": "2020-01-01T10:45:20.1677709Z",
"exec_inst": [
"MAKER_OR_CANCEL"
],
"client_order_id_format_exchange": "f81211e2-27c4-b86a-8143-01088ba9222c",
"exchange_order_id": 3456456754,
"amount_open": 0.22,
"amount_filled": 0,
"avg_px": 0.0783,
"status": "RECEIVED",
"status_history": [
[
[
[
"RECEIVED",
"2020-05-27T11:16:20.1677709Z"
],
[
"REJECTED",
"2020-05-27T11:16:20.1677710Z"
]
]
]
],
"error_message": "{\"result\":\"error\",\"reason\":\"InsufficientFunds\",\"message\":\"Failed to place buy order on symbol 'BTCUSD' for price $7,000.00 and quantity 0.22 BTC due to insufficient funds\"}",
"fills": [
{
"time": "2020-01-01T10:45:20.1677709Z",
"price": 10799.2,
"amount": 0.002
}
]
}
Input model validation errors.
- application/json
- Schema
- Example (from schema)
Schema
- type string
- title string
- status number
- traceId string
- errors string
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "d200e8b5-4271a5461ce5342f",
"errors": "string"
}
Exchange is unreachable.
- appliction/json
- Schema
- Example (from schema)
Schema
- type string
Message type, constant.
- reject_reason RejectReason
Possible values: [
OTHER
,EXCHANGE_UNREACHABLE
,EXCHANGE_RESPONSE_TIMEOUT
,ORDER_ID_NOT_FOUND
,INVALID_TYPE
,METHOD_NOT_SUPPORTED
,JSON_ERROR
]Cause of rejection.
- exchange_id string
If the message related to exchange, then the identifier of the exchange will be provided.
- message string
Message text.
- rejected_message string
Value of rejected request, if available.
{
"type": "MESSAGE_REJECT",
"reject_reason": "ORDER_ID_NOT_FOUND",
"exchange_id": "BINANCE",
"message": "Order with ID: BINANCE-7d8a-4888 not found",
"rejected_message": "{\"client_order_id\":\"BINANCE-7d8a-4888\",\"exchange_id\":\"BINANCE\",\"type\":\"ORDER_CANCEL_SINGLE_REQUEST\"}"
}
Exchange didn't responded in the defined timeout.
- appliction/json
- Schema
- Example (from schema)
Schema
- type string
Message type, constant.
- reject_reason RejectReason
Possible values: [
OTHER
,EXCHANGE_UNREACHABLE
,EXCHANGE_RESPONSE_TIMEOUT
,ORDER_ID_NOT_FOUND
,INVALID_TYPE
,METHOD_NOT_SUPPORTED
,JSON_ERROR
]Cause of rejection.
- exchange_id string
If the message related to exchange, then the identifier of the exchange will be provided.
- message string
Message text.
- rejected_message string
Value of rejected request, if available.
{
"type": "MESSAGE_REJECT",
"reject_reason": "ORDER_ID_NOT_FOUND",
"exchange_id": "BINANCE",
"message": "Order with ID: BINANCE-7d8a-4888 not found",
"rejected_message": "{\"client_order_id\":\"BINANCE-7d8a-4888\",\"exchange_id\":\"BINANCE\",\"type\":\"ORDER_CANCEL_SINGLE_REQUEST\"}"
}