agent.coinbase, agent.okx, agent.binance and agent.bybit share one shape and trade spot only, from the exchange account the session was started with. They exclude margin, derivatives, trigger orders and withdrawals. Orders and order reads require a hosted target or a paper session; local circuit run rejects them.
markets.list({ base?, quote? }) returns the exchange’s spot pairs with tradable and order rules (minimumSize, minimumNotional, sizeStep, priceTick); markets.list({ base: "BTC", quote: "USDT" }) finds one pair. A pair’s asset is <VENUE>:<base>/<quote> in the exchange’s own asset codes, such as BINANCE:BTC/USDT or COINBASE:ETH/USD; pass it unchanged.
orders.create(order, options?) takes the order shape every venue shares: { kind: "spotBuy" | "spotSell", asset, amount, execution? }, with amount { size } in the base asset or { value } in the quote asset, rounded down to the pair’s sizeStep. Circuit refuses an order below the pair’s minimumSize or minimumNotional with BELOW_MINIMUM before anything is sent. Omit execution for a market order within 1% of the mid; { kind: "limit", price, timeInForce } rests per timeInForce (“gtc” rests, “ioc” fills what crosses now, “alo” is post-only). Its result is the venue order every venue returns. orders.listOpen() returns the session’s resting orders, and orders.cancel({ orderId, asset }, options?) cancels one the session placed. options take a once name.
Circuit signs each order once and submits it once. An order the exchange never reports by the end of its signed request’s validity window settles as not executed. Size from the allocation balance; fills record net amounts and fee currencies.
Connect a credential
circuit exchange connect --venue coinbase|okx|binance|bybit --credentials-prompt connects an account (OKX also asks for its passphrase). Circuit reads the key’s permissions from the exchange: a key that can trade spot gets trade access, any other key read access.
Declare the venue under
exchangeCredentials, then pass the account ID from circuit exchange list as --exchange-credential <id> with a hosted target.