For the complete documentation index, see llms.txt. This page is also available as Markdown.

POST /agents/register

Register an agent key

Register an agent key.

operationId: registerAgent

Not reachable through CCXT. Nexus-specific trading-agent registration. No CCXT equivalent — the closest unified concepts are API-key management, which CCXT deliberately leaves to the venue.

Authentication: none declared, and the contract declares no document-level default — this operation carries its own signature in the request body. See the description above.

Register a new agent key for your wallet. An agent is an Ethereum-derived keypair that can sign trading requests on your behalf without exposing your main wallet. The registration is authorized by an EIP-712 signature from the wallet that will own the agent — no session token required.

EIP-712 domain: { name: 'Nexus Exchange', version: '1', chainId: <per-network chain id> }. The chainId is network-scoped: read signing_domain.chain_id from /metadata for the network you are connected to (see x-nexus-networks) instead of hardcoding it, and refuse to sign if you cannot obtain it — a wrong domain either fails verification or produces a signature that is valid somewhere you did not intend. Mainnet is the real-funds exchange on Ethereum Mainnet, not a Nexus L1 chain, so a Nexus L1 chain id is never correct there. Because the domain differs per network, a registration signed for one network does not verify on another; never replay one across networks. Typed data type: RegisterAgent { address agent, uint64 expiresAt, uint64 nonce }.

Request body

Required. AgentRegistrationRequestapplication/json.

{
  "wallet": "0xAbCdEf0123456789AbCdEf0123456789AbCdEf01",
  "agent": "0x1234567890AbCdEf1234567890AbCdEf12345678",
  "expires_at": 1782000000000,
  "nonce": 1,
  "signature": "0xdeadbeef..."
}

Responses

Status
Body
Meaning

200

AgentRegistrationResponse

Agent registered

400

(no schema declared)

Bad request: bad_wallet, bad_agent, expiry_out_of_range [1 d, 90 d from now], or invalid_json

401

(no schema declared)

signature_invalid or signer_mismatch — the EIP-712 signature did not recover to the claimed wallet

409

(no schema declared)

duplicate_agent — the agent address is already registered to this wallet

Example


Generated from eng/apps/exchange/api/openapi.json (spec 0.9.36). Do not edit by hand — regenerate with python3 product/docs/tools/api-reference/generate.py. Hand-authored context lives in the Guides pages.

Last updated