post
https://api.connex.trade/api/v1/apiKey/portfolio
Create an API for Trading Portfolio by a primary use
Permission
- Applies to primary user's API Key only.
- Permission: TRADE.
Rate Limit
- 3 requests per 10 seconds
Request body
Send parameters as a JSON body with Content-Type: application/json.
| Field name | Type | Necessary | Remarks |
|---|---|---|---|
| portfolioId | Long | Y | portfolioId |
| apiName | String | Y | API key label, up to 20 characters. |
| ip | String | N | ip address |
| permission | String | N | Permissions to assign to the target key, comma-separated: READ, TRANSFER, WITHDRAW, TRADE. Send the desired permission set explicitly. |
Response fields
| Field name | Type | Remarks |
|---|---|---|
| code | integer | Application result code. 200 means success. |
| message | String | Result message. |
| data | object | The key configuration after this operation. |
| data.portfolioId | integer (int64) | Portfolio identifier. Preserve the full integer value. |
| data.apiName | String | API Key note |
| data.accessKey | String | The key identifier; use it as portfolio ApiKey when filtering, updating or deleting. |
| data.secretKey | String | Returned by this creation response only. Store securely; listing and updating cannot retrieve it. |
| data.status | Integer | 1 = Normal; 2 = Frozen. |
| data.ip | String | Comma-separated IP whitelist; empty string means no IP restriction. |
| data.permission | String | Granted permissions, comma-separated,READ,TRANSFER,WITHDRAW,TRADE |
| data.createdAt | integer (int64) | Creation time, Unix timestamp in milliseconds. |
| data.updatedAt | integer (int64) | Last update time, Unix timestamp in milliseconds. |
Example request
{
"portfolioId": 2154503491108165,
"apiName": "ExampleKey",
"ip": "203.0.113.10",
"permission": "READ,WITHDRAW"
}
Example response
{
"code": 200,
"message": "success",
"data": {
"portfolioId": 2154503491108165,
"apiName": "ExampleKey",
"accessKey": "EXAMPLE_ACCESS_KEY",
"status": 1,
"ip": "203.0.113.10",
"permission": "READ,WITHDRAW",
"createdAt": 1789061297969,
"updatedAt": 1789061297969,
"secretKey": "EXAMPLE_SECRET_KEY"
}
}
Note:
- The limit creation for ConneX API and Trading Portfolio API is a maximum of 10. By default, only one Transfer permission API, one Withdraw permission API, and one Trade permission API are allowed, or one API with transfer + withdraw + trade permission.
- Permission:
| Value | Meaning |
|---|---|
| READ | Read account and transaction data of the Trading Portfolio. |
| TRANSFER | Support transfer between different ‘account type’(Binance or OKX) of the API-owned Trading Portfolio |
| Withdraw | Only support withdrawal from different ‘account type’(Binance or OKX) of the API-owned Trading Portfolio |
| Trade | Only support placing orders on the API-owned Trading Portfolio. |
- The read permission is automatically granted by default and permissions can be directly separated by commas.
