Send new order
POST/v1/orders
This request creating new order for the specific exchange.
Request
- application/json
Body
required
OrderNewSingleRequest object.
Exchange identifier used to identify the routing destination.
The unique identifier of the order assigned by the client.
Exchange symbol. One of the properties (symbol_id_exchange
, symbol_id_coinapi
) is required to identify the market for the new order.
CoinAPI symbol. One of the properties (symbol_id_exchange
, symbol_id_coinapi
) is required to identify the market for the new order.
Order quantity.
Order price.
Possible values: [BUY
, SELL
]
Side of order.
Possible values: [LIMIT
]
Order types are documented in the separate section: EMS / Starter Guide / Order parameters / Order type
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
Expiration time. Conditionaly required for orders with time_in_force = GOOD_TILL_TIME_EXCHANGE
or GOOD_TILL_TIME_OEML
.
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
Responses
- 200
- 400
- 490
- 504
Created
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
Exchange identifier used to identify the routing destination.
The unique identifier of the order assigned by the client.
Exchange symbol. One of the properties (symbol_id_exchange
, symbol_id_coinapi
) is required to identify the market for the new order.
CoinAPI symbol. One of the properties (symbol_id_exchange
, symbol_id_coinapi
) is required to identify the market for the new order.
Order quantity.
Order price.
Possible values: [BUY
, SELL
]
Side of order.
Possible values: [LIMIT
]
Order types are documented in the separate section: EMS / Starter Guide / Order parameters / Order type
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
Expiration time. Conditionaly required for orders with time_in_force = GOOD_TILL_TIME_EXCHANGE
or GOOD_TILL_TIME_OEML
.
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
The unique identifier of the order assigned by the client converted to the exchange order tag format for the purpose of tracking it.
Unique identifier of the order assigned by the exchange or executing system.
Quantity open for further execution. amount_open
= amount_order
- amount_filled
Total quantity filled.
Calculated average price of all fills on this order.
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
Timestamped history of order status changes.
Error message.
fills
object[]
Relay fill information on working orders.
Execution time.
Execution price.
Executed 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": "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
Message type, constant.
Possible values: [OTHER
, EXCHANGE_UNREACHABLE
, EXCHANGE_RESPONSE_TIMEOUT
, ORDER_ID_NOT_FOUND
, INVALID_TYPE
, METHOD_NOT_SUPPORTED
, JSON_ERROR
]
Cause of rejection.
If the message related to exchange, then the identifier of the exchange will be provided.
Message text.
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
Message type, constant.
Possible values: [OTHER
, EXCHANGE_UNREACHABLE
, EXCHANGE_RESPONSE_TIMEOUT
, ORDER_ID_NOT_FOUND
, INVALID_TYPE
, METHOD_NOT_SUPPORTED
, JSON_ERROR
]
Cause of rejection.
If the message related to exchange, then the identifier of the exchange will be provided.
Message text.
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\"}"
}