Troubleshooting
Use this guide when an API request fails, a transaction reverts, or an order/cash operation appears stuck.
First Triage
Start with the layer where the failure appears:
If API
codeis not200, fix request auth, scope, or parameters first.If API succeeds but no transaction is submitted, inspect the calldata response and wallet client.
If the transaction is submitted but reverts, debug allowance, balance, deadline, chain, and router target.
If the transaction succeeds but the API cannot find it, record
txHashor wait for indexer backfill.If mapping exists but state is not final, poll order or cash detail endpoints.
API Auth Fails
Symptoms:
HTTP
400withcode: 401UnauthorizedSignature, nonce, timestamp, IP, or permission errors
All of these return the same 401 Unauthorized — the response body does not say which one failed. Rule them out one by one; for a new integration, check the IP whitelist and timestamp first.
API key invalid, inactive, or expired
Confirm the key exists, is active, and expires_at is unset or future
Empty or mismatched IP whitelist
Add your egress IP (headers-and-permissions.md); an empty whitelist rejects everything
x-api-ts outside 45-second window
Use current UTC milliseconds
Reused x-api-nonce
Use a unique UUID per request
Wrong HMAC URI
Authenticate /api/v1/..., not the full URL
Literal \n in signed payload
Join the 5 lines with real newlines, not the two-character \n (a common shell bug — see signature.md)
Query order mismatch
Sort query params by name before HMAC authentication
Body mismatch
Sign the exact JSON string sent
Missing scope
Confirm chainId + productType + access permission
Calldata Builds But Chain Transaction Reverts
Common causes:
Deposit tx reverts
Insufficient ERC-20 allowance
Check walletAllowance; approve spender
Deposit tx reverts
Wallet token balance too low
Check walletBalance
Order tx reverts
Plain buy has insufficient mUsdBalance
Deposit first, use /orders/with-deposit/* when eligible, or reduce notional
Sell tx reverts
Plain sell has insufficient exchangeBalance, or order-with-deposit sell lacks stock allowance/balance
Approve stock, use /orders/with-deposit/*, or reduce quantity
Cancel tx reverts
Order not open or already canceling
Query /orders/{orderId} first
Tx reverts out-of-gas (gasUsed == gasLimit)
Default estimateGas is too low on some chains (e.g. Monad) for router calls
Self-submit: add a gas buffer (estimateGas × 1.5–2). One Click: pass a sufficient gasLimit
Deadline error
deadline expired
Use a future Unix seconds value
Wrong chain
Wallet on different chain than x-api-chain-id
Switch wallet network
Deposit Not Credited Yet
A mined deposit transaction still needs API mapping and, for queued deposits, final cash settlement before mUsdBalance updates.
If the transaction succeeded:
Confirm
POST /api/v1/cash/deposits/txwas called with the correcttxHash.Poll
GET /api/v1/cash/deposits/{operationId}.Check
operationStatus.Refresh
GET /api/v1/users/{userId}/balance.
Queued deposits can remain processing while final cash settlement is still pending.
Withdrawal Not Paid Out Yet
Withdrawals can be instant or queued. If queued:
mUSDis deducted first.Final cash settlement completes later.
Cashier transfers tokens to the user when settlement completes.
Poll:
Do not treat processing as failed unless the operation has an explicit failure status or support confirms an issue.
Order Tx Mined But No Order ID
This usually means the indexer has not backfilled the mapping yet.
Check:
If missing:
Confirm the tx was sent to the returned
toAddress.Confirm the tx succeeded on the same chain as
x-api-chain-id.Confirm
POST /api/v1/orders/txwas called by the same API key.Wait for indexer backfill and retry.
Order Open Too Long
For limit orders, open state can be normal. Practical lifecycle rules depend on timeInForce and backend execution.
Production limit orders currently only accept
DAY; othertimeInForcevalues will make the order transaction revert.
For market orders, long open time usually means one of:
Execution result not yet received.
Final order result has not settled on-chain.
Indexer/API has not refreshed status.
Use:
Then inspect openOrder.status and history fields.
One Click Send Fails
Check:
/1ct/status is not enable
Run prepare/sign/enable flow
API key has no bound userAddress
Configure API key user binding
Signer mismatch
EIP-712 signer must equal signPayload.message.user
Expired deadline
Prepare and sign a fresh payload
Deposit send fails
Bound user must approve cash token spender
Escalation Data
When escalating to backend/support, include:
Environment base URL
x-api-chain-idx-api-pAPI response
code,errMsg,uuid,ttxHashorderIdoroperationIdWallet address /
userIdRequest path and body (without API secret)
Last updated