Skip to main content
Complete onboarding, obtain Spire approval for your master wallet, and fund its available inventory. Spire confirms the base URL serving the order adapter. The examples below send real resting orders once your account is enabled.

Install

Supply your signing key through a secret manager or private environment file as MM_PRIVATE_KEY. Set MM_BASE_URL to the endpoint from Spire and MM_MASTER_ADDRESS to the master that owns your inventory.
This is the ordinary SDK constructor. It reads the adapter’s metadata and discovers spot markets without a custom signer or request wrapper.

Approve an API wallet

Direct signing with your master needs no delegation. To create a hot API wallet, construct Exchange with your master key, then call:
Store agent_private_key in your secret manager without logging it. Reconstruct Exchange with that key and the same account_address. Approving another key under quoting retires the previous key. Approval delegates signing; it does not grant maker access. See API wallets and signing.

Place an order

Choose a current, non-marketable price and size on the market grid. Prices are USDC per WETH; sizes are WETH. The SDK uses spot symbol WETH/USDC:
The price is illustrative. Alo rejects an order that would cross the current book. Every subsequent order() adds another order; it does not remove this one. The scheduled deadline applies to all orders owned by the master and bounds newly published curves. An already published curve keeps its previous expiry.

Modify and cancel

After a timeout, query order status by client ID before retrying. An error in a bulk request does not undo its successful entries.

Protect and reconcile

The deadline must be at least five seconds ahead; at most ten deadlines can trigger per UTC day. A disconnect leaves orders open. Persist fills, deduplicate by master and tid, and reconcile after reconnect. See fill reporting. A runnable command-line version is available as examples-maker.py. It manages individual orders using the same SDK calls.