Guides
Getting started

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

WhereRuleResult
FIAT depositamount ending in ,05 cents (e.g. 10.05)Never paid. Stays PENDING_DEPOSIT and goes EXPIRED at expireAt
FIAT withdrawalamount 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-accountname contains KYCGoes AwaitingKyc until you upload documents; then Active
Sub-accountname contains REJEITARGoes Rejected
CounterpartylegalName contains REJEITARRelation Rejected and a Compliance webhook
WhitelistwalletAddress contains deadNever 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:

StepTimeToggle
Sub-account review (Pending → decision)~3 sautoApproveSubaccounts
Counterparty compliance (PendingApproval → decision)~2 sautoApproveCounterparties
Whitelist wallet approval~2 sautoApproveWallets
PIX payment or on-chain confirmation of a deposit~4 sautoPayDeposits
Withdrawal: SENT_TO_CONNECTOR → PENDING_IN_BANK → COMPLETED~1 s + ~3 sautoSettleOrders
Refund: PROCESSING_REFUND → RETURNED~3 sautoSettleOrders
Trade: PROCESSING → WaitingTreasury → COMPLETED~1 s + ~2 sautoSettleOrders
FX payment compliance approval~3 sautoApproveFxPayments
Quote validity30 salways
Deposit instruction validityexpiration (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:

bash
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:

bash
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: true generates the PIX (PENDING_DEPOSIT); with false, the deposit stays CREATED until the deposit.pay action.
  • An account with autoExecuteWithdrawal: false leaves the withdrawal in PENDING_TREASURY until the withdrawal.approve action.

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.