Coinbase Advanced Setup Guide
Time: 5 minutes | Difficulty: Easy | Market: Crypto Mode: Full automation | API: Advanced Trade API (REST + WebSocket) | Docs: docs.cdp.coinbase.com
This guide wires a Coinbase trading bot to the Advanced Trade API using the botwir3 runtime. Configure API credentials, connect to BTC-USD or any supported pair, and run the bot locally — no data leaves the machine.
Before you start
Verify that automated operation is permitted under Coinbase's current terms of service before deploying. botwir3 provides tools for building structured automation. The user is responsible for compliance with the platform's terms and all applicable regulations.
Coinbase User Agreement | Last verified: May 2026
What you need
- A Coinbase Advanced account with identity verification complete
- The botwir3 runtime downloaded and unzipped
- A strategy config file from the builder
Step 1: Create API credentials
- Log in to Coinbase Advanced
- Navigate to Settings → API
- Click New API Key
- Set permissions:
wallet:accounts:read— read account balanceswallet:buys:create— place buy orderswallet:sells:create— place sell orders
Permissions required: accounts:read, buys:create, sells:create
Permissions to disable: wallet:withdrawals:create, wallet:payment-methods:delete. These scopes are not required for trading and can be left disabled.
🔒 Security. Withdrawal permissions are not required for trading. Disabling them limits API key scope to order placement and account reads.
Step 2: Configure the adapter
Create adapter.json in the bot directory:
{
"adapter": "coinbase",
"credentials": {
"api_key": "paste-api-key-here",
"api_secret": "paste-api-secret-here"
},
"trading_pair": "BTC-USD",
"environment": "live",
"rate_limit_ms": 100
}
Common trading pairs: BTC-USD, ETH-USD, SOL-USD, DOGE-USD.
API keys are stored in a local config file on the machine running the bot. They are not transmitted to botwir3 or any third party. botwir3 never sees, stores, or has access to platform credentials.
Step 3: Test the connection
botwir3 test --adapter coinbase
Expected output:
[botwir3] Adapter: coinbase
[botwir3] Connection: OK
[botwir3] Permissions: accounts:read, buys:create, sells:create
[botwir3] Rate limit: 10 requests/second
Step 4: Start the bot
botwir3 start --config my-strategy.json
The runtime loads the strategy, computes the spec hash, connects to Coinbase via the local API credentials, and begins evaluating signals. The gate function compares proposed actions against the configured spec. The user is responsible for monitoring the bot and verifying execution outcomes.
Rate limits and considerations
| Endpoint | Limit | Notes |
|---|---|---|
| REST API | 10 requests/second | Per API key. Exceeding triggers 429 response. |
| WebSocket | 8 subscriptions/connection | Per connection. Multiple connections permitted. |
| Order placement | 30 orders/second | Per trading pair. Applies to new, cancel, and modify. |
ℹ Rate limit. Coinbase allows 10 requests per second per API key. Set
rate_limit_msto 100 or higher in the adapter config.
Coinbase does not support withdrawal or transfer via the Advanced Trade API scopes listed above. The bot can only place and cancel orders within the account. All actions and decisions are recorded in the local ledger.
Common Coinbase bot configurations include DCA (dollar-cost averaging into BTC or ETH on a schedule), grid trading across a price range, and momentum strategies on high-volume pairs like BTC-USD and SOL-USD. The 10 req/sec limit supports polling intervals as low as 1 second for active strategies.
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
CONNECTION_REFUSED | API key invalid or expired | Regenerate API key in Coinbase Settings → API |
RATE_LIMITED | Too many requests per second | Increase rate_limit_ms in adapter config |
PERMISSION_DENIED | Missing required API scope | Add buys:create and sells:create to API key permissions |
MANDATE_INTEGRITY_VIOLATION | Config file modified while bot is running | Stop the bot, verify config, restart |
Related guides
- Binance Setup Guide — crypto, global exchange
- Kraken Setup Guide — crypto, US-friendly
- TradingView Webhooks Setup Guide — route TradingView alerts to any adapter
One bot. $129. No subscription. No $749/mo platform. → Build for Coinbase