Create an API for Trading 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 nameTypeNecessaryRemarks
portfolioIdLongYportfolioId
apiNameStringYAPI key label, up to 20 characters.
ipStringNip address
permissionStringNPermissions to assign to the target key, comma-separated: READ, TRANSFER, WITHDRAW, TRADE. Send the desired permission set explicitly.

Response fields

Field nameTypeRemarks
codeintegerApplication result code. 200 means success.
messageStringResult message.
dataobjectThe key configuration after this operation.
data.portfolioIdinteger (int64)Portfolio identifier. Preserve the full integer value.
data.apiNameStringAPI Key note
data.accessKeyStringThe key identifier; use it as portfolio ApiKey when filtering, updating or deleting.
data.secretKeyStringReturned by this creation response only. Store securely; listing and updating cannot retrieve it.
data.statusInteger1 = Normal; 2 = Frozen.
data.ipStringComma-separated IP whitelist; empty string means no IP restriction.
data.permissionStringGranted permissions, comma-separated,READ,TRANSFER,WITHDRAW,TRADE
data.createdAtinteger (int64)Creation time, Unix timestamp in milliseconds.
data.updatedAtinteger (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:

  1. 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.
  2. Permission:
ValueMeaning
READRead account and transaction data of the Trading Portfolio.
TRANSFERSupport transfer between different ‘account type’(Binance or OKX) of the API-owned Trading Portfolio
WithdrawOnly support withdrawal from different ‘account type’(Binance or OKX) of the API-owned Trading Portfolio
TradeOnly support placing orders on the API-owned Trading Portfolio.
  1. The read permission is automatically granted by default and permissions can be directly separated by commas.
Body Params
int64

portfolio id

string
required

api name

string

ip

string

READ,TRANSFER,WITHDRAW,TRADE

Response

Language
LoadingLoading…
Response
Choose an example:
application/json