Crypto

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

  1. Log in to Coinbase Advanced
  2. Navigate to Settings → API
  3. Click New API Key
  4. Set permissions:
    • wallet:accounts:read — read account balances
    • wallet:buys:create — place buy orders
    • wallet: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

EndpointLimitNotes
REST API10 requests/secondPer API key. Exceeding triggers 429 response.
WebSocket8 subscriptions/connectionPer connection. Multiple connections permitted.
Order placement30 orders/secondPer trading pair. Applies to new, cancel, and modify.

Rate limit. Coinbase allows 10 requests per second per API key. Set rate_limit_ms to 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

ErrorCauseFix
CONNECTION_REFUSEDAPI key invalid or expiredRegenerate API key in Coinbase Settings → API
RATE_LIMITEDToo many requests per secondIncrease rate_limit_ms in adapter config
PERMISSION_DENIEDMissing required API scopeAdd buys:create and sells:create to API key permissions
MANDATE_INTEGRITY_VIOLATIONConfig file modified while bot is runningStop the bot, verify config, restart

Related guides


One bot. $129. No subscription. No $749/mo platform. → Build for Coinbase


Build your Coinbase Advanced bot

botwir3 compiler

1 Platform

2 Objective