post
https://api.connex.trade/api/v1/trading/data/export/create
Creates an export task and returns a task ID.
Permission
- Applies to both primary user and trading portfolio's API Key.
- Permission: TRADE.
Rate Limit
- 10 requests per second.
Request body
Send a JSON object with Content-Type: application/json.
| Field name | Type | Necessary | Remarks |
|---|---|---|---|
| exportType | Int | Y | Export type(1-History Order,3-History Position) |
| startTime | String | Y | Export data start time(millisecond timestamp). |
| endTime | String | Y | Export data end time(millisecond timestamp). |
| exchangeType | String | N | Default export all exchange data, the string supports multiple exchanges, separated by commas. Like "BINANCE, OKX" |
| businessType | String | N | Default export all business data, the string supports multiple businessTypes, separated by commas. Like "SPOT, MARGIN, PERP" |
| isFilterCancel | Int | N | 0-All Data, 1-Filtering orders with no quantity filled. Effective only when exporting order data. Default export all orders. |
Response
| Field name | Type | Remarks |
|---|---|---|
| exportId | Int | History Data Export ID |
| portfolioId | String | Portfolio ID |
| exportType | String | Export type(1-History Order,3-History Position). |
| exchangeType | String | Exchange type(BINANCE,OKX) |
| businessType | String | Business type(SPOT,MARGIN,PERP) |
| orderState | String | Please see Order State for supported values. |
| startTime | Long | Export data start time(millisecond timestamp) |
| endTime | Long | Export data end time(millisecond timestamp) |
| isFilterCancel | Int | 0-All Data, 1-Filtering orders with no quantity filled. Effective only when exporting order data. Default export all orders. |
| downloadUrl | String | download url |
| status | Int | 1-Pending, 2-Processing, 3-Processed. |
| createAt | Long | Create data time(millisecond timestamp) |
| updateAt | Long | Update data time(millisecond timestamp) |
Example Request
{
"exportType": "1",
"startTime": "1792512000000",
"endTime": "1794758400000",
"exchangeType": "BINANCE",
"businessType": "",
"isFilterCancel": "0"
}
Example Response
{
"code": 200000,
"message": "Success",
"data": {
"exportId": "408",
"portfolioId": "2224378439871813",
"exportType": 1,
"exchangeType": "BINANCE",
"businessType": "",
"orderState": "",
"startTime": 1792512000000,
"endTime": 1794758400000,
"isFilterCancel": 0,
"downloadUrl": "",
"status": 1,
"createAt": "1794842217259",
"updateAt": "1794842217259"
}
}
