put
https://api.connex.trade/api/v1/apiKey/portfolio
Update the API Key of a Trading Portfolio by a primary user.
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 | integer (int64) | Y | Trading Portfolio ID |
| portfolioApiKey | String | Y | API public key |
| apiName | String | N | API key label, up to 20 characters. |
| ip | String | N | up to 20 IP addresses, separated by comma. |
| 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. |
Key result: data
| Field name | Type | Remarks |
|---|---|---|
| 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.status | Integer | status: 1 normal, 2 frozen |
| data.ip | String | Comma-separated IP whitelist; empty string means no IP restriction. |
| data.permission | String | Granted permissions, comma-separated. |
| 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,
"portfolioApiKey": "EXAMPLE_ACCESS_KEY",
"apiName": "ExampleKeyUpdated",
"ip": "203.0.113.10",
"permission": "READ,WITHDRAW"
}
Example response
{
"code": 200,
"message": "success",
"data": {
"portfolioId": 2154503491108165,
"apiName": "ExampleKeyUpdated",
"accessKey": "EXAMPLE_ACCESS_KEY",
"status": 1,
"ip": "203.0.113.10",
"permission": "READ,WITHDRAW",
"createdAt": 1789061449714,
"updatedAt": 1789061456665
}
}
