CLI Issues
circuit: command not found
The CLI is not installed globally. Install with:
circuit run fails with “No wallet found”
Import a wallet first:
--wallet / -w specifying the wallet address.
circuit run fails immediately
Ensure dependencies are installed before running:
- TypeScript:
bun install - Python:
uv syncorpip install -e .
circuit publish --dry-run succeeds but circuit publish fails
Check that you are signed in (circuit whoami) and that your circuit.toml has all required fields (name, tagline, walletType, allowedExecutionModes, runtimeIntervalMinutes, version, startingAsset).
SDK Issues
result.data is undefined
Always check success before accessing data:
agent.currentPositions is a snapshot taken at the start of execution. After transactions, call getCurrentPositions() for updated balances. Note that indexing may lag by chain — use hasPendingTxs to detect this.
errorMessage / error_message is undefined
These fields are deprecated. Use the error field instead:
Swap and Bridge Issues
Quote returnsNO_COMPATIBLE_ENGINES
The token pair or route is not supported by any routing engine. Verify:
- Token addresses are correct for the specified network
- Network identifiers are valid (e.g.,
"ethereum:137"not"polygon") - The route exists (some token pairs have no liquidity)
PRICE_IMPACT_TOO_HIGH
The swap amount is too large relative to available liquidity. Reduce the amount or increase slippage tolerance. Circuit automatically filters quotes with >100% price impact.
Swap amounts seem wrong
Amounts are in smallest units (wei, lamports, etc.), not formatted values. For example, 1 USDC (6 decimals) = "1000000", not "1".
Omit fromToken/toToken for native tokens — don’t pass the zero address.
Hyperliquid Issues
Unknown perp asset error
Perp symbols are just the base asset: "BTC", "ETH". Do NOT use "BTC/USDC" for perps — that format is for spot only.
Unknown spot pair error
Spot symbols must include the quote: "BTC/USDC", "ETH/USDC". Do NOT use just "BTC" for spot.
Rate limiting
Hyperliquid rate-limits aggressively. Avoid calling balances() or positions() in loops. Call them once at the start of your run function and reuse the results.
stop or take_profit order fails
Stop and take-profit orders require a triggerPrice parameter. This is separate from the price parameter (which acts as a slippage limit).
Polymarket Issues
market_order returns “Something went wrong”
This usually means the order book has insufficient liquidity for your order size. The CLOB’s calculateBuyMarketPrice throws a generic error when there aren’t enough asks (for buys) or bids (for sells), which surfaces as a 500 error.
Fix: Always check order book liquidity before placing orders:
No orderbook exists for the requested token id
The tokenId is invalid or the market doesn’t exist. Verify the token ID from Polymarket’s API.
Dust positions after selling
Polymarket has different decimal precision for buys and sells, which can leave small residual positions. Clean these up with redeemPositions() after market expiry.
Python-Specific Issues
from keyword conflict in swidge.quote()
Python’s from is a reserved keyword. When passing a dict, use the string key "from" — it works because dict keys are strings. When using Pydantic models directly, use from_ (with underscore):
General Tips
- Test locally first with
circuit runbefore publishing - Use
debug: true/debug=Truefor verbose logging that won’t appear in the user-facing UI - Check
executionModeif your agent behaves differently in auto vs manual mode - Pin dependency versions in
pyproject.toml/package.jsonto avoid breaking changes on deploy - Keep
runtimeIntervalMinutesreasonable — too frequent runs may hit rate limits on external APIs