PATCH /agents/{address}
Rename an agent
Rename an agent.
operationId: renameAgent
Declared server:
https://api.testnet.nexus.xyz/v1. See Networks.
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: hmacAuth, walletSignature.
Change the label of one of your agent keys. Only the label changes: the key's address, expiry and scope stay as they are, and the key keeps signing without being re-registered.
The label is trimmed and runs of whitespace are collapsed to one space before it is stored. It must be 1 to 32 characters after that, with no control characters (newlines, tabs). The response carries the stored record, so read the label back from it rather than from what you sent.
A key that is not registered to the calling wallet, has expired or does not exist returns 404 (code AGENT_NOT_FOUND). The three cases are not told apart, so this cannot be used to probe for keys on other accounts.
Agent keys are refused here with 403 (code AGENT_KEY_FORBIDDEN): a trade-only agent key may not list, rename or revoke its sibling credentials. Call this as the wallet itself: its own API key (hmacAuth), or a signature from the wallet over this action (walletSignature), which is how a client holding only an agent key does it.
HMAC API key authentication. Send three headers:
X-API-Key: your key ID (e.g.nx_a1b2c3...)X-Timestamp: current time in unix millisecondsX-Signature:hex(hmac_sha256(secret, timestamp + "\n" + METHOD + "\n" + path + "\n" + query + "\n" + sha256_hex(body)))
Timestamp must be within 30 seconds of server time.
The key is network-scoped; the signature is not. The canonical string above has no network component, so the same signed request is byte-identical on every host. What stops a testnet key from authenticating against mainnet is that the key does not exist in that host's key store — sign only for the host that minted the key, and never replay a signed payload against another network. Presented to the wrong host, a key is refused with the same opaque 401 as an unknown key and must not be retried there. See “API keys are bound to one network” in the API description.
Agent address to rename (0x-prefixed)
Body of PATCH /agents/{address}. label is the only field a rename can change; any other field is refused.
New label. Trimmed and whitespace-collapsed before storing; 1 to 32 characters after that, no control characters.
Agent renamed. The body is the updated record, in the GET /agents shape.
A registered agent key as GET /agents reports it.
This schema is camelCase, unlike the snake_case native Nexus schemas around it: expiresAt and registeredAt, not expires_at and registered_at. It is not one of the CCXT-compatible schemas either, so it matches neither naming family the Schema Reference's conventions describe. Read the field names here literally rather than inferring them from the rest of the API.
Agent address (0x-prefixed)
Expiry Unix ms
Registration time Unix ms
Optional label
INVALID_LABEL (empty, longer than 32 characters, or a control character), INVALID_JSON (unparseable body, missing label, or an unknown field), or BAD_AGENT (the address is not 20 bytes of hex), or WALLET_AUTH_INCOMPLETE: x-wallet-signature was sent without a valid x-wallet-account, x-wallet-nonce or x-wallet-chain-id
Missing or invalid credentials. With walletSignature, the code says why: WALLET_SIGNATURE_EXPIRED, WALLET_SIGNATURE_INVALID or WALLET_SIGNER_MISMATCH, or WALLET_NONCE_REPLAY.
AGENT_KEY_FORBIDDEN: the request was signed by an agent key and carried no walletSignature
AGENT_NOT_FOUND: no active agent key with that address on this wallet
PATCH /v1/agents/{address} HTTP/1.1
Host: api.testnet.nexus.xyz
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"label": "Desk bot"
}{
"address": "0x1234567890AbCdEf1234567890AbCdEf12345678",
"expiresAt": 1782000000000,
"registeredAt": 1779000000000,
"label": "Desk bot"
}Test it cannot sign this request. X-Signature is an HMAC computed per call: see Authentication, or use an SDK.
API version 0.9.131
Last updated

