Skip to main content
POST
Register a deposit address for monitoring

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
depositTarget
enum<string> | null

Which ledger swept deposits are requested to be credited to. SPOT (the default when omitted) credits the spot wallet; MARGIN asks for the parent margin account's collateral, skipping the separate collateral transfer; CROSS_RISK_BUCKET credits the parent margin account the same way and then allocates the amount to its cross risk bucket. The target is part of the address derivation, so each target yields a different deposit address for the same pair, and each address carries its own request. MARGIN and CROSS_RISK_BUCKET are routing requests rather than guarantees: a deposit the matching engine cannot route to collateral — an unsupported collateral asset, or a margin account that fails validation — is credited to the spot wallet instead, so funds are never stranded, and a CROSS_RISK_BUCKET deposit whose allocation is refused (a cross risk bucket in bad debt) stays unallocated on the margin account. A SPOT address is never credited to margin.

Available options:
SPOT,
MARGIN,
CROSS_RISK_BUCKET
Example:

"MARGIN"

Response

OK

status
enum<string> | null

registered when the triple was added, already_registered when it was known before this call

Available options:
registered,
already_registered
Example:

"registered"

sweeperAddress
string | null

The deposit address for this (application, user, deposit target) triple. Stable, and valid to publish and fund before any contract exists there.

Example:

"0xcf1eF339798914EF7Ee4984Ed45BD141D63a65C9"

initialSweepCheck
boolean | null

Whether the one-time registration balance check has completed. false right after a fresh registration; it runs in the background and flips once every pre-existing balance has been swept.

Example:

false