curl --request POST \
--url https://mpc.hex-api.app/relay/withdraw \
--header 'Content-Type: application/json' \
--data '
{
"chain_id": 137,
"receiver": "0xe4df1d74122c2a7b14481cbdde704fbd0a4f11a2"
}
'{
"id": "3.b55dd9d2-a1bd-48fb-b8d6-6e91aa21433b",
"origin": "api",
"chain_id": 137,
"receiver": "4BwLMDn4SNyrgHHgU9x5tAudyGZ7",
"status": "queued",
"steps": [],
"created_at": 1792944180000,
"updated_at": 1792944180000
}Pay out a receiver's pending withdrawals
Queues paying out every pending withdrawal of receiver on chain_id and answers the job. Poll it with GET /relay/jobs/{chain}/{id}.
One job per receiver drains omni’s get_withdrawals_by_receiver oldest first, one withdrawal at a time: an unpaid one is signed and sent to the chain’s bridge (withdraw) from the relay’s account, which pays the fees; a paid one is cleared on omni (clear_completed_withdrawal). It is done when omni lists none. A signing refusal fails the job with its detail; RPC and node failures are retried with backoff. A withdrawal to the token contract itself or to the zero address is never paid out, nor a Stellar one older than the bridge’s 60-day nonce lifetime (it can only be refunded).
Chains the relay pays out on: EVM chains except Ethereum (1), Base (8453), Linea (59144), Mantle (5000) and Abstract (2741); Gonka (4444119), Stellar (1100) and TON (1117). A chain is also refused (400) while omni’s removal key for it is neither the MPC key nor the one this service holds, since a payout it could not clear would block the receiver’s next withdrawals.
Only a receiver omni holds a withdrawal for is queued: otherwise 404, and nothing is queued. A receiver with a queued or running job answers that job (reused: "active") instead of a new one; within 2 minutes of a job of the receiver that failed, or that already went past the withdrawal asked for (or found nothing), that job is answered too (reused: "cooldown"). A chain’s payout queue holds at most 500 jobs per shard: past it, 429 with Retry-After.
curl --request POST \
--url https://mpc.hex-api.app/relay/withdraw \
--header 'Content-Type: application/json' \
--data '
{
"chain_id": 137,
"receiver": "0xe4df1d74122c2a7b14481cbdde704fbd0a4f11a2"
}
'{
"id": "3.b55dd9d2-a1bd-48fb-b8d6-6e91aa21433b",
"origin": "api",
"chain_id": 137,
"receiver": "4BwLMDn4SNyrgHHgU9x5tAudyGZ7",
"status": "queued",
"steps": [],
"created_at": 1792944180000,
"updated_at": 1792944180000
}Body
The target chain. Chains the relay pays out on: EVM chains except Ethereum (1), Base (8453), Linea (59144), Mantle (5000) and Abstract (2741); Gonka (4444119), Stellar (1100) and TON (1117). A chain is also refused (400) while omni's removal key for it is neither the MPC key nor the one this service holds, since a payout it could not clear would block the receiver's next withdrawals.
x >= 11100
1117
137
4444119
Response
The receiver's job: new, or the active one.
Chain ids are omni's (v2_1.omni.hot.tg), not always the chain's own: EVM chains use their EIP-155 id (Ethereum 1, Optimism 10, BNB 56, Polygon 137, Monad 143, X Layer 196, Base 8453, Arbitrum 42161, Avalanche 43114, ...); the others have omni's numbers: Solana 1001, NEAR 1010, Stellar 1100, TON 1117 (TON v1, 1111, is dead), Juno 4444118, Gonka 4444119.
x >= 11100
1117
137
4444119