Orders
Poloniex Futures v2 API It will gradually go offline later, and you can access the V3 API to provide you with a better trading experience.
Place an Order
You can place two 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.
Please note that the system will hold the fees from the orders entered in the orderbook in advance. Read Get Fills to learn more.
Do NOT include extra spaces in JSON strings.
Place Order Limit:
The maximum limit orders for a single contract is 100 per account, and the maximum stop orders for a single contract is 50 per account.
HTTP Request
POST https://futures-api.poloniex.com/api/v1/orders
API Permission
This endpoint requires the Trade permission
REQUEST RATE LIMIT
This API is restricted for each account, the request rate limit is 30 times/3s.
Parameters
Param | type | Description |
---|---|---|
clientOid | String | Unique order id created by users to identify their orders, e.g. UUID, Only allows numbers, characters, underline(_), and separator(-) |
side | String | buy or sell |
symbol | String | a valid contract code. e.g. BTCUSDTPERP |
type | String | [optional] Either limit or market |
String | Deprecated,Leverage of the order | |
remark | String | [optional] remark for the order, length cannot exceed 100 utf8 characters |
stop | String | [optional] Either down or up. Requires stopPrice and stopPriceType to be defined |
stopPriceType | String | [optional] Either TP, IP or MP, Need to be defined if stop is specified. |
stopPrice | String | [optional] Need to be defined if stop is specified. |
reduceOnly | boolean | [optional] A mark to reduce the position size only. Set to false by default. |
closeOrder | boolean | [optional] A mark to close the position. Set to false by default. |
forceHold | boolean | [optional] A mark to forcely hold the funds for an order, even though it's an order to reduce the position size. This helps the order stay on the order book and not get canceled when the position size changes. Set to false by default. |
See Advanced Description for more details.
LIMIT ORDER PARAMETERS
Param | type | Description |
---|---|---|
price | String | Limit price |
size | Integer | Order size. Must be a positive number |
quantity | String | [optional] Order quantity. Must be a positive number. Only takes effect when size is empty |
timeInForce | String | [optional] GTC, IOC(default is GTC), read Time In Force |
postOnly | boolean | [optional] Post only flag, invalid when timeInForce is IOC. When postOnly chose, not allowed choose hidden or iceberg. |
boolean | Deprecated,[optional] Orders not displaying in order book. When hidden chose, not allowed choose postOnly. | |
boolean | Deprecated,[optional] Only visible portion of the order is displayed in the order book. When iceberg chose, not allowed choose postOnly. | |
Integer | Deprecated,[optional] The maximum visible size of an iceberg order |
MARKET ORDER PARAMETERS
Param | type | Description |
---|---|---|
size | Integer | [optional] amount of contract to buy or sell |
quantity | String | [optional] Order quantity. Must be a positive number. Only takes effect when size is empty |
Example:
Request:
{
"clientOid": "5c52e11203aa677f33e493fb",
"reduceOnly": false,
"closeOrder": false,
"forceHold": false,
"hidden": false,
"iceberg": false,
"leverage": 20,
"postOnly": false,
"price": 8000,
"remark": "remark",
"side": "buy",
"size": 20,
"stop": "",
"stopPrice": 0,
"stopPriceType": "",
"symbol": "BTCUSDTPERP",
"timeInForce": "",
"type": "limit",
"visibleSize": 0
}
Response:
{
"code": "200000",
"data": {
"orderId": "5bd6e9286d99522a52e458de"
}
}
Advanced Description
SYMBOL
The symbol must match a contract symbol, e.g. BTCUSDTPERP
CLIENT ORDER ID
Generated by yourself, the optional clientOid field must be a unique id (e.g UUID). Only numbers, characters, underline(_) and separator(-) are allowed. The value will be returned in the order detail. You can use this field to identify your orders via the public feed. The client_oid is different from the server-assigned order id. Please do not send a repeated client_oid. The length of the client_oid cannot exceed 40 characters. You should record the server-assigned order_id as it will be used for future queries of your order status.
TYPE
The order type you specify may decide whether other optional parameters are required, as well as how your order will be executed by the matching engine. If order type is not specified, the order will be a limit order by default.
Price and size are required to be specified for a limit order. The order will be filled at the price specified or better, depending on the market condition. If a limit order cannot be filled immediately, it will be outstanding in the open order book until matched by another order, or canceled by the user.
A market order differs from a limit order in that the execution price is not guaranteed. Market order, however, provides a way to buy or sell a specific size of contract without having to specify the price. Market orders will be executed immediately, and no orders will enter the open order book afterwards. Market orders are always considered takers and incur taker fees.
LEVERAGE
The “leverage” parameter is used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required.
STOP ORDERS
A stop order is an order to buy or sell at the market or pre-specified limit price once the contact has traded at or through a pre-specified stopPrice. There are two types of stop orders, down and up.
Stop Order Types
- down: Triggers when the price reaches or goes below the stopPrice.
- up: Triggers when the price reaches or goes above the stopPrice.
- stopPriceType: There are three types of stop prices for a contract, including: TP for trade price, MP for mark price, and IP for index price.
The last trade price is the last price at which an order was filled. This price can be found in the latest match message. The mark price and the index price can be obtained through relevant OPEN API for index services.
Note that when triggered, stop orders will be executed as either market or limit orders, depending on the pre-specified type.
When placing a stop order, the system will not pre-freeze the funds in your account. Do note that when triggered, a stop order may be canceled if the available balance is not enough.
PRICE
The price specified must be a multiple number of the contract tickSize, otherwise the system will report an error when you place the order. The tick size is the smallest price increment in which the prices are quoted. A valid price shall not be higher than the maxPrice in the contract specification. Poloniex Futures implements IEPR(Immediately Executable Price Range) rule, in which the price of a buy order cannot be higher than 1.05 * mark price, and the price of a sell order cannot be lower than 0.95 * mark price.
Price field is not required for market orders.