Add Order - Old
POST
/api/v1/orders:::tip[]
It is recommended to use the POST /api/v1/hf/orders endpoint instead of this endpoint
:::
:::info[Description]
Place order to the Spot trading system, you can place two major types of orders: limit and market. Orders can only be placed if your account has sufficient funds. Once an order is placed, your funds will be put on hold for the duration of the order. The amount of funds on hold depends on the order type and parameters specified.
:::
:::tip[Tips]
Please note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.
Before placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.
:::
:::tip[Tips]
The maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.(including stop orders).
:::
Public order placement request parameters
Param | Type | Mandatory | Description |
---|---|---|---|
clientOid | String | Yes | clientOid, the unique identifier created by the client, use of UUID, with a maximum length of 128 bits. |
side | String | Yes | buy or sell |
symbol | String | Yes | symbol, e.g. ETH-BTC |
type | String | No | limit or market (default is limit) |
remark | String | No | remark, length cannot exceed 50 characters (ASCII) |
stp | String | No | self trade prevention, CN, CO, CB or DC |
tradeType | String | No | The type of trading : TRADE(Spot Trade), MARGIN_TRADE (Margin Trade). Default is TRADE. Note: To improve the system performance and to accelerate order placing and processing, KuCoin has added a new interface for order placing of margin. For traders still using the current interface, please move to the new one as soon as possible. The current one will no longer accept margin orders by May 1st, 2021 (UTC). At the time, KuCoin will notify users via the announcement, please pay attention to it. |
Additional Request Parameters Required by limit
Orders
Param | Type | Mandatory | Description |
---|---|---|---|
price | String | Yes | Specify price for currency |
size | String | Yes | Specify quantity for currency |
timeInForce | String | No | Order timing strategy GTC , GTT , IOC , FOK (The default is GTC ) |
cancelAfter | long | No | Cancel after n seconds,the order timing strategy is GTT |
postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is IOC or FOK |
hidden | boolean | No | Hidden or not (not shown in order book) |
iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |
visibleSize | String | No | Maximum visible quantity in iceberg orders |
Additional request parameters required by market
orders
Param | Type | Mandatory | Description |
---|---|---|---|
size | String | No | (Select one out of two: size or funds ) |
funds | String | No | (Select one out of two: size or funds ) |
Request
symbol
specify if the order is to 'buy' or 'sell'
Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.
Please remember the orderId created by the service provider, it used to check for updates in order status.
specify if the order is an 'limit' order or 'market' order.
The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.
When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.
Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged.
Self Trade Prevention is divided into four strategies: CN, CO, CB , and DC
Order placement remarks, length cannot exceed 20 characters (ASCII)
The type of trading : TRADE(Spot Trade), MARGIN_TRADE (Margin Trade). Default is TRADE. Note: To improve the system performance and to accelerate order placing and processing, KuCoin has added a new interface for order placing of margin. For traders still using the current interface, please move to the new one as soon as possible. The current one will no longer accept margin orders by May 1st, 2021 (UTC). At the time, KuCoin will notify users via the announcement, please pay attention to it.
Specify price for order
When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error.
Time in force is a special strategy used during trading
Cancel after n seconds,the order timing strategy is GTT
passive order labels, this is disabled when the order timing strategy is IOC or FOK
Hidden or not (not shown in order book)
Whether or not only visible portions of orders are shown in iceberg orders
Maximum visible quantity in iceberg orders
Specify quantity for order
When type is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.
When type is market, select one out of two: size or funds
When type is market, select one out of two: size or funds
//limit order
{
"type": "limit",
"symbol": "BTC-USDT",
"side": "buy",
"price": "50000",
"size": "0.00001",
"clientOid": "5c52e11203aa677f33e493fb",
"remark": "order remarks"
}
//market order 1
// {
// "type": "market",
// "symbol": "BTC-USDT",
// "side": "buy",
// "size": "0.00001",
// "clientOid": "5c52e11203aa677f33e493fc",
// "remark": "order remarks"
// }
//market order 2
// {
// "type": "market",
// "symbol": "BTC-USDT",
// "side": "buy",
// "funds": "1",
// "clientOid": "5c52e11203aa677f33e493fc",
// "remark": "order remarks"
// }
Request samples
Responses
The unique order id generated by the trading system,which can be used later for further actions such as canceling the order.
{
"code": "200000",
"data": {
"orderId": "674a8635b38d120007709c0f"
}
}