Trade
Version: v1
POST /api/futures/exchange-data/candles
Summary:
Create order. After filling, order becomes a position.
Request body
{
"isMarket": true,
"isLong": true,
"price": 0,
"stopLoss": 0,
"takeProfit": 0,
"amount": 0,
"currencyPairCode": "string",
"futuresAccountId": 0
}
Response model
{
"id": 0
}
Response codes
Code | Description |
---|---|
200 | Success |
PUT /api/futures/trade/update-take-profit
Summary:
Update order take profit
Request body
{
"orderId": 0,
"takeProfit": 0
}
Response codes
Code | Description |
---|---|
200 | Success |
PUT /api/futures/trade/update-stop-loss
Summary:
Update order stop loss
Request body
{
"orderId": 0,
"stopLoss": 0
}
Response codes
Code | Description |
---|---|
200 | Success |
PUT /api/futures/trade/close
Summary:
Close position or cancel not filled order
Request body
{
"orderId": 0,
"isMarket": true,
"limitPrice": 0
}
Response codes
Code | Description |
---|---|
200 | Success |
GET /api/futures/trade/orders-history
Summary:
Get orders/positions history
Request parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
CurrencyPair | query | No | string | |
Page | query | No | integer | |
PageSize | query | No | integer | |
DateFrom | query | No | dateTime | |
DateTo | query | No | dateTime | |
Statuses | query | Created = 10, PositionClosed = 20, Cancelled = 30, Error = 40, InPosition = 50 | No | integer |
FuturesAccountId | query | No | long |
Response model
[
{
"id": 0,
"createTimestamp": "2024-04-26T04:48:24.681Z",
"updateTimestamp": "2024-04-26T04:48:24.681Z",
"price": 0,
"amount": 0,
"currencyPairCode": "string",
"takeProfit": 0,
"stopLoss": 0,
"realizedPnl": 0,
"leverage": 0,
"isLong": true,
"isMarket": true,
"liquidationPrice": 0,
"filled": 0,
"fee": 0,
"feeAsset": "string",
"amountInPosition": 0,
"futuresOrderStatus": 10,
"fundingFee": 0,
"initialMargin": 0,
"currentMargin": 0,
"unRealizedPnl": 0,
"unRealizedPnlPercentage": 0,
"totalPnlPercentage": 0,
"roe": 0
}
]
Response codes
Code | Description |
---|---|
200 | Success |
GET /api/futures/trade/positions
Summary:
Get positions
Request parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
CurrencyPair | query | No | string | |
Page | query | No | integer | |
PageSize | query | No | integer | |
DateFrom | query | No | dateTime | |
DateTo | query | No | dateTime | |
FuturesAccountId | query | No | long | |
IsActive | query | No | boolean |
Response model
[
{
"id": 0,
"createTimestamp": "2024-04-26T05:04:47.250Z",
"updateTimestamp": "2024-04-26T05:04:47.250Z",
"price": 0,
"amount": 0,
"currencyPairCode": "string",
"takeProfit": 0,
"stopLoss": 0,
"realizedPnl": 0,
"leverage": 0,
"isLong": true,
"isMarket": true,
"liquidationPrice": 0,
"filled": 0,
"fee": 0,
"feeAsset": "string",
"amountInPosition": 0,
"futuresOrderStatus": 10,
"fundingFee": 0,
"initialMargin": 0,
"currentMargin": 0,
"unRealizedPnl": 0,
"unRealizedPnlPercentage": 0,
"totalPnlPercentage": 0,
"roe": 0
}
]
Response codes
Code | Description |
---|---|
200 | Success |
GET /api/futures/trade/orderbook/{currencyPairCode}
Summary:
Get orderbook
Request route parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
currencyPairCode | route | Yes | string |
Response model
{
"currencyPairCode": "string",
"asks": [
{
"price": 0,
"quantity": 0
}
],
"bids": [
{
"price": 0,
"quantity": 0
}
]
}
Response codes
Code | Description |
---|---|
200 | Success |