Bot × exchange
Does bbgo work with Coinbase?
The bbgo README names Coinbase as a supported exchange (README scanned 2026-09-17). We did not run the bot against Coinbase: this page reports what the public code says and what the exchange itself publishes.
Coinbase facts
- CoinGecko trust score
- 10 / 10 · rank 2
- Country
- United States
- Established
- 2012
- 24h volume (BTC, normalized)
- 0
- Puerto Rico residents
- Not verified: the eligibility page returned an access error (HTTP 403) on the check date (source, 2026-09-17)
- Derivatives
- Regulated futures through Coinbase Financial Markets; global perpetuals since June 2026 (source, 2026-09-17)
- Official API
- Yes (Advanced Trade API); futures access for U.S. territories not confirmed (source, 2026-09-17)
Exchange data: CoinGecko public API and the exchange's own endpoints, 2026-09-17. More on the Coinbase page.
What the audit says about running it live
From the bbgo audit (2026-09-17), the controls that matter most once a live API key is connected:
| Control | Verdict | Evidence |
|---|---|---|
| API key permissions | Not verified | doc/README.md index has no dedicated API-key-permissions/security guide; pkg/cmd/withdraw.go does not exist (HTTP 404) |
| Orphaned stop-loss | Partial | pkg/types/order.go (OrderTypeStopMarket, OrderTypeStopLimit, OrderTypeTakeProfitMarket, OrderTypeTrailingStopMarket); pkg/risk/riskcontrol/circuit_break.go and position.go (in-memory halt/reduce logic) |
| Websocket and data reconnection | Present | pkg/exchange/binance/stream.go (OnListenKeyExpired -> stream.Reconnect(), OnServerShutdownEvent -> stream.Reconnect(), handleDisconnect resets depth buffers) |
| Order rejection handling | Partial | pkg/types/order.go (OrderStatusRejected); pkg/exchange/binance/stream.go (handleExecutionReportEvent) |
| Position reconciliation with the exchange | Partial | pkg/bbgo/environment.go (BindSync -> tradeWriterCreator/orderWriterCreator persist trades/orders to DB; futuresPositionWriterCreator calls SyncService.FuturesService.QueryPositionsAndInsert after each futures trade) |
Before you connect a key
- Create the API key with trading enabled and withdrawals disabled, and restrict it to your server's IP if Coinbase allows it.
- Start in paper or dry-run mode if the bot has one (the README mentions it).
- Decide the maximum loss per day before the first order and check the bot can enforce it: see the circuit breaker control. If it cannot, the watchdog enforces it from outside with a read-only key.