Skip to main content
POST
Upsert delegated agent

Authorizations

X-Monaco-Signature
string
header
required

Ed25519 session-key request signing. Every authenticated request carries three headers: X-Monaco-PublicKey (64-char lowercase-hex session public key), X-Monaco-Timestamp (Unix milliseconds, within 30s of server time), and X-Monaco-Signature (hex ed25519 signature). The signature is over METHOD\npath?query\ntimestamp_ms\nSHA256_hex(body), where the body hash is the SHA-256 of the empty byte string when there is no body. Obtain the session keypair from POST /api/v1/auth/challenge followed by POST /api/v1/auth/verify.

Body

application/json
agentAddress
string | null

Agent wallet address (EVM, 42 chars including 0x)

Example:

"0x742d35cc6634c0532925a3b8d4060f31e2c3d8b5"

name
string | null

Optional human-friendly label for the agent

Example:

"market-maker-bot"

expiresAt
string | null

Optional delegation expiry timestamp (ISO 8601). Omit for no expiry.

Example:

"2026-12-31T23:59:59Z"

allowedActions
string[] | null

Actions the agent may perform: CREATE_ORDER, CANCEL_ORDER, REPLACE_ORDER

Minimum string length: 1
Example:
allowedTradingPairIds
string<uuid>[] | null

Trading pair UUIDs the agent may trade. An order is allowed if its market or its margin account is permitted.

Minimum string length: 1
allowedMarginAccountIds
string<uuid>[] | null

Margin account UUIDs the agent may trade against. An order is allowed if its market or its margin account is permitted.

Minimum string length: 1
allowedOrderTypes
string[] | null

Permitted order types (LIMIT, MARKET). Empty means unrestricted.

Minimum string length: 1
Example:
allowedTimeInForce
string[] | null

Permitted time-in-force values (GTC, IOC, FOK). Empty means unrestricted.

Minimum string length: 1
Example:
maxLeverage
string | null

Maximum leverage the agent may use (decimal string). Omit for no limit.

Example:

"10"

maxOrderNotional
string | null

Maximum order notional (price * quantity, decimal string). Omit for no limit.

Example:

"50000"

maxOpenOrders
integer<int32> | null

Maximum concurrent open orders. Omit for no limit.

Example:

100

Response

OK

id
string<uuid> | null

Delegation UUID

Example:

"123e4567-e89b-12d3-a456-426614174000"

ownerUserId
string<uuid> | null

Owner account UUID the agent acts on behalf of

agentAddress
string | null

Agent wallet address (EVM)

Example:

"0x742d35cc6634c0532925a3b8d4060f31e2c3d8b5"

name
string | null

Human-friendly label for the agent

isActive
boolean | null

Whether the delegation is active

expiresAt
string | null

Delegation expiry timestamp (ISO 8601), if set

revokedAt
string | null

Revocation timestamp (ISO 8601), if revoked

allowedActions
string[] | null

Actions the agent may perform

Minimum string length: 1
allowedTradingPairIds
string<uuid>[] | null

Trading pair UUIDs the agent may trade

Minimum string length: 1
allowedMarginAccountIds
string<uuid>[] | null

Margin account UUIDs the agent may trade against

Minimum string length: 1
allowedOrderTypes
string[] | null

Permitted order types. Empty means unrestricted.

Minimum string length: 1
allowedTimeInForce
string[] | null

Permitted time-in-force values. Empty means unrestricted.

Minimum string length: 1
maxLeverage
string | null

Maximum leverage (decimal string), if set

maxOrderNotional
string | null

Maximum order notional (decimal string), if set

maxOpenOrders
integer<int32> | null

Maximum concurrent open orders, if set