POST /multisig/add-signer adds one co-signer, and POST /multisig/config replaces the whole configuration, which is how signers are removed and thresholds changed. Once a replacement is applied, the OMS cancels all of the user’s open orders.
A request is authorized when the combined weight of its valid signatures meets the threshold for that request’s permission level. Account multisig is checked at the OMS before submission and re-enforced at the clearing engine, so a compromised gateway cannot bypass it.
Signers and weights
A configuration has three parts:- Master key - the account’s Ed25519 key, counted at
master_weight. - Additional signers - zero or more co-signer keys, each with its own weight and optional time limits.
- Thresholds - three integers,
low/medium/high, one per permission level.
The master key is just the heaviest signer by default; it has no powers beyond its weight. A request can be authorized by co-signers alone, and with
master_weight set to 0 the master key contributes nothing toward any threshold.
Default. A new account has master_weight = 1, no additional signers, and all three thresholds 1 - so the master key alone clears every level.
Anti-lockout. A configuration is rejected unless every threshold is at least 1 and the total weight of the keys able to act at the high level - the master key plus every signer that is not capped below it - is at least the high threshold, so the configured keys can always satisfy the strictest tier. The master key cannot also be listed as an additional signer, and no key may appear twice. This guards against the obvious lockout; it cannot stop you assigning weight to a key you do not actually hold.
Permission levels
Every request type is fixed to one of three permission levels, except adding a signer, whose level is themax_multisig_permission_level it requests for the new signer (high when it requests none). A request passes when the summed weight of its valid signers is greater than or equal to that tier’s threshold.
You will normally set
low <= medium <= high so value-moving actions need more signatures than trading. The protocol does not enforce that ordering - only that every threshold is at least 1 and that the combined weight of your uncapped keys covers the high threshold.
Capped signers
A signer with amax_multisig_permission_level below high is capped. On a request above the cap, the capped signer’s signature counts for nothing: the other signatures must meet the threshold on their own. Requests at or below the cap are subject to the usual thresholds.
This is what makes a demo account safe to hand out: the funder keeps the master key and adds the user’s key capped at low, with enough weight to clear the low threshold alone. The user can place orders, clear positions and make transfers, but cannot withdraw, replace the account multisig configuration, or lift the cap.
A capped signer can add further signers, but only ones capped at or below its own level, and only keys not already on the account: re-adding an existing signer (which would change its weight, signing window or cap) always needs the high tier. Nothing a capped signer adds can therefore reach a tier it cannot reach itself. The master key cannot be capped. A cap never prevents a signer from authenticating.
Signer key types
Four schemes are supported. The master key is always Ed25519; co-signers may be any scheme.
Every signer - master and co-signers alike - signs the same payload: the request’s
inner object serialized to compact JSON, with whitespace stripped and fields in declaration order. The signature is over the raw payload bytes, not a hash.
ECDSA signatures (secp256k1 and P-256) are normalized to low-s form on verification, so signature malleability cannot be used to produce a distinct-but-valid signature.
WebAuthn co-signers submit a full assertion - authenticatorData, clientDataJSON, and a P-256 signature over authenticatorData || SHA256(clientDataJSON). Tplus checks the user-present flag, that the assertion type is webauthn.get, the relying-party ID and origin, and that the assertion’s challenge equals the request payload. That last check binds a passkey signature to exactly one request.
Signing a request
A signed request carries the master signature and any co-signatures separately:signature holds the master Ed25519 signature bytes, or is empty when co-signers authorize instead. Each additional_signers entry pairs a signer - tagged by scheme (Ed25519, Secp256k1, P256, or WebAuthn) - with its signature, and is matched to a registered signer by exact key. Verification:
- Each co-signer must be registered on the account and unexpired, and its signature must verify over the payload. An unknown, duplicate, or expired signer rejects the whole request.
- The master signature, if present, adds
master_weight; each valid co-signer adds its entry’s weight. - If the total is below the level’s threshold, the request is rejected with an insufficient-weight error.
additional_signers array and are validated when the order is finalized, with the signing window measured at orderbook receipt.
Configuring account multisig
Initial setup is onchain, at first deposit. A first-time depositor calls thedeposit overload that also registers a configuration: masterWeight, the three thresholds, and an array of SignerConfig entries (key, keyType, keyPrefix, weight, expiresAtNs, maxSigningWindowNs), plus a masterConfigSignature - the master key’s signature over the configuration. The clearing engine applies it once and ingests it into the ledger; the plain deposit leaves the default single-key config in place.
The OMS exposes these runtime endpoints. POST /multisig/add-signer and POST /multisig/config are the account multisig writes.
Successful
/multisig/add-signer and /multisig/config requests are replay-protected by config_nonce - a monotonic counter, read as ce_nonce from GET /nonce/{user_id}, sent as inner.ce_nonce (add-signer) or inner.nonce (config), and bumped on success.
Replacing the configuration
POST /multisig/config needs a bearer token for inner.user and signatures that clear the high threshold. Every signer signs the compact inner, with fields in this order:
nonceis the currentce_noncefromGET /nonce/{user_id}; any other value is rejected.signersis the complete new list. A signer left out is removed.created_at_nsis required but not kept: a signer already on the account keeps its original value, so its signing window does not restart, and a new signer gets the time the update applies.- Omit
max_multisig_permission_levelfor an uncapped signer; it is then also absent from the signed payload. The anti-lockout rules apply.
200:{"success": true, "result": "succeeded"}.400 CE_REJECTED: the clearing engine refused the update, for example a wrong nonce or a config that fails the anti-lockout rules.details.reasonsays why.401: the token is missing, invalid or expired, or belongs to a different user thaninner.user.500 ORDERS_NOT_CANCELLED: the update applied, but the OMS could not send the cancels for the markets indetails.failed_assets. Cancel those orders. Do not send the update again: its nonce is used.502 CE_COMMUNICATION_ERROR: the OMS could not send the update. It changed nothing and cancelled no order, so the same request can be sent again.504 TIMEOUT_UNKNOWN_STATE: the OMS sent the update but got no answer in time, so it may have applied or may still apply. The OMS cancels the user’s open orders, except in the markets indetails.failed_assetswhen that is present. Re-readGET /multisig/config/{user_id}before retrying.400 INVALID_REQUESTfor a body that does not parse,503 WARMING_UPorSERVER_BUSY,421(the user is served by another OMS instance), and429, as for other writes; see Errors.