Barfinex
All exchanges
Coinbase

Coinbase

BetaCrypto — Major Exchanges
connectorType: "coinbase"

Coinbase is the largest US-based cryptocurrency exchange and the first major crypto company to go public (NASDAQ: COIN). Barfinex integrates with Coinbase Advanced Trade API for spot trading and market data.

Connection Architecture

Coinbase
WebSocket / REST
Connector
libs/exchange-coinbase
Provider
:8081/api
Detector
Advisor
Studio

The connector receives data from the exchange and feeds it to Provider (port 8081). From there — to Detector, Advisor, and Studio.

Technologies

Transport
WebSocketREST
Authentication
API Key + Secret
Data Format
JSON
Features
Advanced Trade API

Best for

  • Coinbase is the preferred connector for USD-base strategies targeting institutional-grade spot liquidity and strict regulatory compliance.
  • It suits algorithmic traders operating from the US or serving US clients who must document exchange interactions for audit purposes.
  • Barfinex users building BTC/USD or ETH/USD mean-reversion or breakout strategies will benefit from Coinbase's tight spreads on major pairs and its high market depth during US trading hours.

Connect via code

1Environment variables (.env)

COINBASE_API_KEY=your_key_here
COINBASE_API_SECRET=your_secret_here

2Connector configuration

// config/config.provider.json
{
  "provider": {
    "connectors": [
      {
        "connectorType": "coinbase",
        "enabled": true,
        "key": "${COINBASE_API_KEY}",
        "secret": "${COINBASE_API_SECRET}",
        "markets": [
          { "marketType": "spot", "symbols": [{ "name": "BTCUSDT" }] }
        ],
        "subscriptions": [
          { "type": "PROVIDER_MARKETDATA_CANDLE", "symbols": ["BTCUSDT"], "intervals": ["min1", "h1"], "active": true },
          { "type": "PROVIDER_MARKETDATA_TRADE", "symbols": ["BTCUSDT"], "active": true },
          { "type": "PROVIDER_MARKETDATA_ORDERBOOK", "symbols": ["BTCUSDT"], "active": true }
        ]
      }
    ]
  }
}

3Verify and query data

# Verify connection
curl -H "Authorization: Bearer $PROVIDER_API_TOKEN" \
  https://localhost:8081/api/exchanges/runtime-proof

# Candles (last 7 days)
curl -H "Authorization: Bearer $PROVIDER_API_TOKEN" \
  "https://localhost:8081/api/candles/coinbase/spot/BTCUSDT/h1?days=7"

Available via Barfinex API

/api/candles/coinbase/...
/api/trades/coinbase/...
/api/orderbook/coinbase/...
/api/account/coinbase/...
/api/symbols/coinbase/...
/api/assets/coinbase/...

Studio graphical setup — in development, coming in the next release.

Important

Permissions required: View + Trade (Advanced Trade API).
Rate limit: 10 requests/sec on private endpoints.
Use the Advanced Trade API (api.coinbase.com), not the legacy Pro API — they are incompatible and the legacy API is being deprecated.
API keys are scoped to a portfolio; ensure your Barfinex key is associated with the correct portfolio.
Coinbase uses HMAC-SHA256 request signatures with a timestamp header — clock skew over 30 seconds will cause authentication failures.
Supported Markets
Spot
Founded2012
HeadquartersSan Francisco, USA

Let’s Get in Touch

Have questions or want to explore Barfinex? Send us a message.