For the complete documentation index, see llms.txt. This page is also available as Markdown.

Self-Submit On-Chain

For integrators who sign and broadcast transactions with their own wallet or custodian.

Workflow

Steps

  1. Call /calldata for the operation:

    • Orders: POST /api/v1/orders/calldata

    • Deposits: POST /api/v1/cash/deposits/calldata

    • Withdrawals: POST /api/v1/cash/withdrawals/calldata

  2. Submit toAddress, value, and callData on-chain.

  3. Call the matching /tx endpoint with txHash.

  4. Indexer backfills orderId or operationId.

  5. Poll status endpoints until settled.

Use a reliable RPC node. estimateGas, eth_call, and waitForTransactionReceipt hit your RPC provider, not the MondayTrade API. Free/public endpoints (including viem's default http() transport and free-tier providers) may rate-limit or reject eth_call and gas estimation, failing before the API is involved. Pass your own node URL to http("<url>").

Add a gas buffer. Default estimateGas can under-estimate router calls on some chains (e.g. Monad) and the tx reverts out-of-gas. Multiply the estimate (e.g. × 1.5–2) before submitting.

Record tx endpoints

Operation
Endpoint

Place order

POST /api/v1/orders/tx

Deposit

POST /api/v1/cash/deposits/tx

Withdraw

POST /api/v1/cash/withdrawals/tx

Status queries

Operation
Endpoints

Order

GET /api/v1/orders/tx/{txHash}, GET /api/v1/orders/{orderId}

Deposit

GET /api/v1/cash/deposits/{operationId}

Withdraw

GET /api/v1/cash/withdrawals/{operationId}

Same txHash from the same API key is idempotent. A txHash already recorded by another API key returns an error.

Deposit prerequisite

Complete ERC-20 approve before deposit calldata execution. See cash/deposits.md and demo-code.md.

Last updated