Guides
Sandbox rules
Scenario triggers, timing of the automatic steps and the homologation toggles.
Bloquo publishes no sandbox triggers. So that you can test rejection, failure and expiry without touching the console, Mimicr defines the rules below. They exist only in Mimicr: don't expect the same behaviour on Bloquo's staging.
Triggers
| Where | Rule | Result |
|---|---|---|
| FIAT deposit | amount ending in ,05 cents (e.g. 10.05) | Never paid. Stays PENDING_DEPOSIT and goes EXPIRED at expireAt |
| FIAT withdrawal | amount ending in ,07 cents (e.g. 100.07) | Ends FAILED with failureReason Recipient bank rejected the transfer.; the hold goes back to the balance |
| Sub-account | name contains KYC | Goes AwaitingKyc until you upload documents; then Active |
| Sub-account | name contains REJEITAR | Goes Rejected |
| Counterparty | legalName contains REJEITAR | Relation Rejected and a Compliance webhook |
| Whitelist | walletAddress contains dead | Never approved (complianceApproved: false) |
Text comparisons are case-insensitive. The cents rules apply to BRL, USD, EUR and GBP.
Automatic timings
With the homologation toggles on (the default), the other side acts on its own:
| Step | Time | Toggle |
|---|---|---|
Sub-account review (Pending → decision) | ~3 s | autoApproveSubaccounts |
Counterparty compliance (PendingApproval → decision) | ~2 s | autoApproveCounterparties |
| Whitelist wallet approval | ~2 s | autoApproveWallets |
| PIX payment or on-chain confirmation of a deposit | ~4 s | autoPayDeposits |
Withdrawal: SENT_TO_CONNECTOR → PENDING_IN_BANK → COMPLETED | ~1 s + ~3 s | autoSettleOrders |
Refund: PROCESSING_REFUND → RETURNED | ~3 s | autoSettleOrders |
Trade: PROCESSING → WaitingTreasury → COMPLETED | ~1 s + ~2 s | autoSettleOrders |
| FX payment compliance approval | ~3 s | autoApproveFxPayments |
| Quote validity | 30 s | always |
| Deposit instruction validity | expiration (default 300 s, minimum 30 s) | always |
Steps run right after every call that changes something, every minute and on any later API call. If a test stalls halfway, POST https://api.mimicr.dev/v1/bloquo/sweep processes everything that is due right away.
Turn automation off
Turn a toggle off so the order waits for you to act through the control API. For example, to control the payment of each deposit:
curl -X PUT https://api.mimicr.dev/v1/bloquo/homolog \
-H "Authorization: Bearer mk_..." \
-H "Content-Type: application/json" \
-d '{"autoPayDeposits": false}'Then pay a specific deposit:
npx mimicr action bloquo deposit.pay depositId=1043
The accepted keys are autoApproveSubaccounts, autoApproveCounterparties, autoApproveWallets, autoPayDeposits, autoSettleOrders and autoApproveFxPayments, all booleans. The same settings exist in the console.
Account flags
Regardless of the toggles, the account settings decide the order's path, as in Bloquo:
- A FIAT account with
autoExecuteDeposit: truegenerates the PIX (PENDING_DEPOSIT); withfalse, the deposit staysCREATEDuntil thedeposit.payaction. - An account with
autoExecuteWithdrawal: falseleaves the withdrawal inPENDING_TREASURYuntil thewithdrawal.approveaction.
Chaos
To test your integration's resilience, turn chaos on per area (customers, orders or trade): latency, HTTP 500, 503 or 429 errors, failing operations (sub-account and counterparty Rejected, deposit EXPIRED, withdrawal or trade FAILED), first-attempt webhook failures and duplicate webhooks. See Sandbox control.