post
https://api.liquiditytech.com/api/v1/apiKey/portfolio
Create an API for Trading Portfolio by a primary user
Authentication required. Permission: TRADE. Primary user API keys only.
Rate limit: 3 requests per 10 seconds.
Create an API key for a trading portfolio. Maximum 10 API keys per portfolio.
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
portfolioId | Long | Yes | Portfolio identifier. |
apiName | String | Yes | Label for the API key. |
ip | String | No | IP address whitelist. Up to 20 addresses, comma-separated. If omitted, all IPs are allowed. |
permission | String | No | Comma-separated list of permissions: READ, TRANSFER, WITHDRAW, TRADE. |
Permission descriptions:
READ— Access account data and order history.TRANSFER— Move assets between account types.WITHDRAW— Withdraw funds from the account.TRADE— Place and manage orders on the portfolio.
Response Fields
| Field | Type | Description |
|---|---|---|
portfolioId | Long | Portfolio identifier. |
apiName | String | API key label. |
accessKey | String | Public API key. |
secretKey | String | Secret API key. Only returned at creation time. Store it securely — it cannot be retrieved again. |
status | Integer | 1: Normal, 2: Frozen. |
ip | String | Whitelisted IP addresses. Empty string if no restriction. |
permission | String | Assigned permissions, comma-separated. |
createdAt | Long | Creation time, in milliseconds since Unix epoch. |
updatedAt | Long | Last update time, in milliseconds since Unix epoch. |
Example Request
{
"portfolioId": 2154503491108165,
"apiName": "my-trading-key",
"permission": "READ,TRADE"
}
Example Response
{
"code": 200,
"message": "success",
"data": {
"portfolioId": 2154503491108165,
"apiName": "my-trading-key",
"accessKey": "6**4",
"secretKey": "2**B",
"status": 1,
"ip": "",
"permission": "READ,TRADE",
"createdAt": 1744466400000,
"updatedAt": 1744466400000
}
}
