api-keys

Generate API Key

Endpoint for generating a new API key with an automatically created key pair. This endpoint generates both a public and private RSA key pair. The public key is stored on the platform, while the private key is returned to the user and must be stored securely. The private key cannot be retrieved again.

post/api_keys/generate

Request body

namestring required

Name for the API key. This helps identify the key's purpose

scopesApiKeyScope[]

List of scopes to grant to the API key. If the broad write parent scope is included, read must also be included. Child scopes may be granted without the broad parent scope. Defaults to full access (read, write) if not provided.

subaccountinteger

If set, restricts the API key to a single sub-account (0-63) that you own. A restricted key may only read and trade on that sub-account; it cannot act on other sub-accounts, transfer funds between sub-accounts, or create sub-accounts. Omit to leave the key unrestricted. Mutually exclusive with fcm_subtrader_id.

fcm_subtrader_idstring

FCM members only. If set, binds the API key to a single FCM subtrader that you own, spelled {your_user_id}_{suffix} with a suffix of 1-16 lowercase alphanumeric characters. The subtrader must already exist. A bound key is the institution's trading credential for that subtrader - FIX order-entry and market-data sessions, plus margin WebSocket sessions scoped to the subtrader's own data - and is denied on every REST endpoint, including key management. Mutually exclusive with subaccount.

Response

API key generated successfully

api_key_idstring required

Unique identifier for the newly generated API key

private_keystring required

RSA private key in PEM format. This must be stored securely and cannot be retrieved again after this response

warningstring nullable

Present only when the minted key is bound to an FCM subtrader that has no initial-margin cap at any scope. The mint still succeeds; once SMA enforcement is enabled, the subtrader's orders will be rejected until a cap is set.

Changes

Changed in 1 of the 20 revisions of this API.4

    • added the new optional request property

      new-optional-request-property

    • added the non-success response with the status

      response-non-success-status-added

    • added the non-success response with the status

      response-non-success-status-added

    • added the optional property to the response with the status

      response-optional-property-added