Skip to main content

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

FieldTypeRequiredDescription
venuestringYesTarget venue (e.g., "BINANCE")
apiKeystringYesAPI key from exchange
apiSecretstringYesAPI secret from exchange
apiPassphrasestringNoAPI passphrase (required for some exchanges)
nicknamestringNoUser-friendly name for the credential

Result

Returns the created credential object.

Credential Object

FieldTypeDescription
credentialIdstringUnique credential identifier (UUID)
venuestringExchange venue
credentialTypestringCredential type (API_KEY)
nicknamestringCredential name
statusstringStatus (PENDING)
createdAtintegerCreation 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 PENDING status until verified
  • Use command.credential.verify to validate credentials