v56

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-03113163377.5 KB
Subkey

Register Subkey

Register a new subkey for the authenticated account.

post/account/keys/subkeys

Request body

allowed_cidrsstring[]

Optional IP CIDR allowlist applied atomically at creation, so the subkey is never live unrestricted. Empty/omitted = unrestricted. Max 50 entries; same format as PUT .../allowed-cidrs (e.g. "203.0.113.0/24"). Not covered by the registration signature: the list is mutable post-creation via the JWT-only allowed-cidrs endpoint, so signing it would add no protection.

encrypted_keystring

Encrypted private key (required if state=pending).

eph_public_keystring

Ephemeral public key for signature verification (required if state=pending).

evm_signaturestring

EVM (EIP-191) registration signature, used in place of signature / signature_timestamp / signature_expiry when the account's main key is a secp256k1 key (AccountSignerType == EIP191). The server reconstructs nothing — the raw SIWE message presented to the user is supplied verbatim in siwe_message and the personal_sign signature in evm_signature. The SIWE message's Statement must equal "Paradex Subkey Registration: 0x<new_subkey_pubkey>" (lowercased pubkey); that line is what binds the authorisation to the specific subkey being registered.

namestring required

User-friendly name for the subkey.

public_keystring required

Public key to be registered as a subkey.

signaturestring[]

Signature from the account's main StarkNet private key over pedersen_array(account, public_key, signature_timestamp, signature_expiry). Required when the server enforces main-key authorization on subkey registration (feature flag EnableSubkeyRegistrationSignature). Format: [r, s].

signature_expiryinteger

Unix seconds; included in signed message and bounds replay window.

signature_timestampinteger

Unix seconds; included in signed message.

siwe_messagestring
statestring

State of the subkey: 'active' or 'pending'. Defaults to 'active'.

Example request

{
  "allowed_cidrs": [
    "[\"203.0.113.0/24\"",
    "\"198.51.100.42/32\"]"
  ],
  "encrypted_key": "0xabc...",
  "eph_public_key": "0x123...",
  "evm_signature": "0x...",
  "name": "My Trading Subkey",
  "public_key": "0x3d9f2b2e5f50c1aade60ca540368cd7490160f41270c192c05729fe35b656a9",
  "signature": [
    "[\"0xr...\"",
    "\"0xs...\"]"
  ],
  "signature_expiry": 1706400600,
  "signature_timestamp": 1706400000,
  "siwe_message": "app.paradex.trade wants you to sign in...",
  "state": "active"
}

Response

An empty response