Create Portfolio API Key

Create a RapidX Portfolio API key. Main User Level key with TRADE required.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Creates an API key for a RapidX Portfolio under the main user. The response includes the new key configuration and its Secret Key. A Portfolio can have up to 10 API keys.

API key access

Requires a signed LTP Open API request with TRADE permission on the calling key.

API key typeCan callScope
Main User Level API key (also the Main Portfolio key)YesAPI keys for RapidX Portfolios under the main user.
Sub-user Level API keyNoThis Open API endpoint does not support Sub-user Level keys.
Sub Portfolio Level API keyNoTRADE on a Sub Portfolio key does not grant API key management access.

Client UI access and Open API access are different. A sub-user's ability to manage an assigned Portfolio's keys in the client does not allow their Sub-user Level key to call this endpoint. See API Management.

Sub-user Level keys do not support TRADE and cannot use this endpoint.

Rate limit

3 requests per 10 seconds.

Request body

Send parameters as a JSON body with Content-Type: application/json.

NameTypeRequiredDescription
portfolioIdinteger (int64)YesRapidX Portfolio ID under the main user. This is not a user UID or a DMA account ID.
apiNamestringYesAPI key label, up to 20 characters.
ipstringConditionalIP whitelist: up to 20 addresses, comma-separated. Keys with TRADE or WITHDRAW require a configured whitelist.
permissionstringNoPermissions to assign to the target key, comma-separated: READ, TRANSFER, WITHDRAW, TRADE. Send the desired permission set explicitly.

Target key permissions

The request's permission field configures the target key. It is separate from the calling key's TRADE permission required to use this endpoint.

ValueMeaning
READRead data within the target key's scope. Always enabled.
TRANSFERTransfer assets within the target key's permitted scope.
WITHDRAWWithdraw assets to permitted external addresses.
TRADEPlace and manage RapidX orders for the target Portfolio.

A main user can grant WITHDRAW to a Sub Portfolio key. Sub-users cannot grant it when creating or editing keys in the client, and their Sub-user Level keys cannot call this Open API endpoint.

For a Sub Portfolio key, withdrawal destinations are the account's withdrawal whitelist, not an assigned sub-user's address subset. See API Management for scope restrictions.

A key with TRADE or WITHDRAW must have an IP whitelist. A read-only key may have an empty whitelist. READ cannot be removed.

Response fields

FieldTypeDescription
codeintegerApplication result code. 200 means success.
messagestringResult message.
dataobjectThe key configuration after this operation.

Key result: data

FieldTypeDescription
data.portfolioIdinteger (int64)Portfolio identifier. Preserve the full integer value.
data.apiNamestringKey label.
data.accessKeystringThe key identifier; use it as portfolioApiKey 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.
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"
}

The 200 response example shows the successful response structure. Credentials in examples are placeholders.

Error responses

Check the application code even when the HTTP status is 200.

CodeMeaning / action
2003Permission denied. The calling key type is not supported by this endpoint.
2004The calling key lacks TRADE. Sub-user Level keys cannot be granted this permission and are not supported.

See Error codes for common authentication and request errors.

Body Params
int64
required

RapidX Portfolio ID under the main user. This is not a user UID or a DMA account ID.

string
required
length ≤ 20

API key label, up to 20 characters.

string

IP whitelist: up to 20 addresses, comma-separated. Keys with TRADE or WITHDRAW require a configured whitelist.

string

Permissions to assign to the target key, comma-separated: READ, TRANSFER, WITHDRAW, TRADE. Send the desired permission set explicitly.

Response

Language
LoadingLoading…
Response
Choose an example:
application/json