This endpoint allows sending a limit, market, stop, take profit or immediate-or-cancel order for a currently listed Futures contract.
Authentication is required.
Endpoint |
Request Type | Permissible API Keys |
/api/v3/sendorder
|
POST | Read-write, Master |
Argument | Type | Required | Description |
orderType
|
string | Yes |
The order type, one of:
|
symbol
|
string | Yes | The symbol of the Futures, see Section 3.4.4 |
side
|
string | Yes | The direction of the order, either buy for a buy order or sell for a sell order |
size
|
positive integer | Yes | The size associated with the order |
limitPrice
|
positive float | Yes | The limit price associated with the order. Must not have more than 2 decimal places |
stopPrice
|
positive float | No | The stop price associated with a stop or take profit order. Required if orderType is stp or take_profit. Must not have more than 2 decimal places. Note that for stop orders, limitPrice denotes the worst price at which the stop or take_profit order can get filled at. If no limitPrice is provided the stop or take_profit order will trigger a market order. |
triggerSignal | string | No |
If placing a stp or take_profit, the signal used for trigger. One of:
|
cliOrdId
|
UUID | No | The order identity that is specified from the user. It must be globally unique. |
reduceOnly
|
string | No | Set as true if you wish the order to only reduce an existing position. Any order which increases an existing position will be rejected. Default false. |
Sample Calls |
https://www.cryptofacilities.com/derivatives/api/v3/sendorder?orderType=lmt&symbol=pi_xbtusd&side=buy&size=10000&limitPrice=9400&reduceOnly=true https://www.cryptofacilities.com/derivatives/api/v3/sendorder?orderType=lmt&symbol=pi_xbtusd&side=buy&size=10000&limitPrice=9400 https://www.cryptofacilities.com/derivatives/api/v3/sendorder?orderType=take_profit&symbol=PI_XBTUSD&side=buy&size=10&limitPrice=15000&stopPrice=9500&triggerSignal=mark https://www.cryptofacilities.com/derivatives/api/v3/sendorder?orderType=lmt&symbol=pi_xbtusd&side=sell&size=100000&limitPrice=10640&reduceOnly=true https://www.cryptofacilities.com/derivatives/api/v3/sendorder?orderType=lmt&symbol=PI_XBTUSD&side=buy&size=10&limitPrice=7500 |
Sample Return if Successful |
{ }, { }, "reducedQuantity":0, { }, |
Field |
Type | Description |
result
|
string | Always success |
sendStatus
|
structure | A structure containing information on the send order request, see below |
order_id | UUID | The unique identifier of the order |
cliOrdId | UUID | The unique client order identifier. This field is returned only if the order has a client order id. |
receivedTime | ISO8601 datetime | The date and time the order was received |
status | string | The status of the order, either of:
|
orderEvents | Structure | Order Events |
serverTime
|
ISO8601 datetime | The server date and time |
Sample Return if Unsuccessful |
{ "result":"error", "serverTime":"2016-02-25T09:45:53.818Z", "error":"apiLimitExceeded", } |
Field |
Type | Description |
result
|
String | Always error |
serverTime
|
ISO8601 datetime | The server date and time |
error
|
string |
The reason the API call failed, either of:
|