Skip to main content
POST
Create a withdrawal
Withdraws from a subaccount held by Matching — the kind every account created through the Numo app is. You sign one Action for the WithdrawalModule; the venue verifies it and submits it through Matching.verifyAndMatch, which lends the account to the module for the call. The module pays the action’s owner, and the account stays in Matching, so trading from it is not interrupted.
Signing costs no gas: the venue’s executor submits the transaction. It is simulated first, so a withdrawal that would revert is refused before anything is sent.

Signing the action

Sign an Action against the same Matching domain as an order, with: asset is the wrapped asset your balance is held in, not the token it pays out: amount is in the token’s native decimals — 6 for both, so 1 USDC is 1000000. Send the action’s seven fields as strings (numbers in base 10, data as hex) with the signature:

What is checked

In order, and every check fails closed — a signature or owner that cannot be read is refused, not waved through:
  1. The request: module, subaccount (not 0), signer equals owner, expiry, data exactly two words, asset, amount above 0, signature shape. Refused with 400.
  2. At most one withdrawal in progress per owner, and five a minute. Refused with 429.
  3. The signature authorizes the action. Refused with 401.
  4. Matching holds the subaccount (400) and records owner as its owner (403).
  5. The executor’s simulation. A withdrawal that would revert is refused with 422, and revert names the revert — for example WERC_CannotBeNegative for more than the account holds.

The outcome

A 200 carries the transaction: accepted, tx_hash, receipt_status and block_number. receipt_status: "timeout" means it was broadcast and had not confirmed when the venue answered — watch the hash rather than treating it as failed. A 502 means the venue could not confirm whether the withdrawal was submitted. Check your balance before signing another: a second signed withdrawal is a second withdrawal. Resubmitting the same signed request is safe — its nonce can only be spent once.

Body

application/json
action
object
required

A Matching Action for the WithdrawalModule, signed with EIP-712 against the Matching domain.

signature
string
required

EIP-712 signature by signer: 65 bytes, or longer for an ERC-1271 wallet.

Response

Submitted. receipt_status timeout means broadcast but not yet confirmed.

accepted
boolean
required

True once mined successfully.

tx_hash
string
required
receipt_status
enum<string>

timeout: broadcast, not yet confirmed.

Available options:
success,
reverted,
timeout
block_number
string