command.credential.create
Create a trading account credential.
Method
command.credential.create
Description
Creates a new API credential for connecting to an exchange. The credential must be verified before use with command.credential.verify.
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
venue | string | Yes | Target venue (e.g., "BINANCE") |
apiKey | string | Yes | API key from exchange |
apiSecret | string | Yes | API secret from exchange |
apiPassphrase | string | No | API passphrase (required for some exchanges) |
nickname | string | No | User-friendly name for the credential |
Result
Returns the created credential object.
Credential Object
| Field | Type | Description |
|---|---|---|
credentialId | string | Unique credential identifier (UUID) |
venue | string | Exchange venue |
credentialType | string | Credential type (API_KEY) |
nickname | string | Credential name |
status | string | Status (PENDING) |
createdAt | integer | Creation timestamp (ms) |
Usage
result = await client.rpc("command.credential.create", {
"venue": "BINANCE",
"apiKey": "your-api-key",
"apiSecret": "your-api-secret",
"nickname": "Main Trading Key"
})
Example Response
{
"credentialId": "660e8400-e29b-41d4-a716-446655440001",
"venue": "BINANCE",
"credentialType": "API_KEY",
"nickname": "Main Trading Key",
"status": "PENDING",
"createdAt": 1703052635110
}
Notes
- API secrets are encrypted at rest
- Credentials start in
PENDINGstatus until verified - Use
command.credential.verifyto validate credentials