Skip to main content
QFEX provides three REST endpoints for subaccount workflows:
  • GET /user/subaccounts
  • POST /user/subaccounts
  • POST /user/transfer
These endpoints require authentication.

Authentication

The CLI authenticates these requests with either:
  • Authorization: Bearer <access_token> after qfex login, or
  • QFEX HMAC headers when API keys are configured
For HMAC auth, sign ${nonce}:${unix_ts} with HMAC-SHA256 using your secret key, then hex-encode the result. Send:
  • x-qfex-public-key
  • x-qfex-hmac-signature
  • x-qfex-nonce
  • x-qfex-timestamp

List Subaccounts

Returns the authenticated user’s subaccount IDs excluding the master account ID.
CLI command:
Example:
Response shape:

Create Subaccount

Allocates a new subaccount for the authenticated user.
CLI command:
The CLI sends an empty JSON body. Example:

Transfer Between Primary Account And Subaccounts

Transfers balance between two accounts owned by the authenticated user.
CLI command:
The CLI resolves primary to the authenticated user’s primary account ID, then sends:
  • src_account_id as a query parameter
  • dst_account_id as a query parameter
  • {"amount": <number>} as the JSON body
Example: