Bot sequence
- 01Load a Base wallet client from your own signer infrastructure.
- 02Call deposits(walletAddress) before creating a new deposit; reuse active inventory when it fits the order.
- 03Call offramp(walletClient, params) with integratorId and referralId so automation can be identified.
- 04Use otcTaker when the buyer is already known; otherwise the deposit is public fillable.
- 05Persist depositId, txHash, platform, currency, amount, and intended buyer context.
- 06Poll deposits(address) or Peerlytics deposit/intent reads so fills and closes survive process restarts.
Retry discipline
- The SDK resumes undelegated deposits by delegating instead of creating a duplicate.
- Browser idempotencyKey caching does not protect Node workers. Your worker should check deposits(address) before creating new liquidity.
- If delegation fails after creation, retry the same wallet route; the resume path is designed for that state.
- Do not retry USER_CANCELLED automatically. That indicates a signer rejected a prompt.
Useful bot patterns
Payroll or payout queue
Create one private OTC deposit per known buyer wallet, then send the returned link.
Treasury liquidity bot
Maintain a small delegated deposit on a preferred route and refill after reconciled fills.
Support reconciliation
Use depositId and txHash as the support handles, then reconcile with deposits(address).