skillfed

coinbase-advanced-py

Coinbase Advanced API Python SDK

coinbase-advanced-py v1.8.4 242.8K downloads/30d#8,835 on PyPI355
Permissive license Apache 2.0 Active released

What it is and what it does

This is the official Coinbase Python SDK for the Advanced API, providing both REST and WebSocket interfaces to trade cryptocurrencies, manage orders, and stream real-time market data. It wraps the Coinbase Advanced Trade API with typed response objects, automatic JWT signing (supporting both Ed25519 and ECDSA key types), and convenience methods for common operations like placing market orders and fetching account balances.

The SDK handles authentication via Coinbase Developer Platform (CDP) API keys, supports environment variable configuration for secrets, and includes built-in rate-limit header tracking. It depends on requests for HTTP, cryptography and PyJWT for signing, websockets for live data streams, and backoff for retry logic. The package targets Python 3.8 and later and is actively maintained by Coinbase.

Use it for:

  • Build automated trading bots that place orders and monitor positions via the REST API.
  • Stream real-time order book and trade data using the WebSocket client for live market analysis.
  • Retrieve account balances, portfolio information, and transaction history programmatically.
  • Integrate Coinbase trading into a larger financial application or dashboard.
  • Backtest trading strategies by fetching historical market data through API endpoints.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Official Python SDK for the Coinbase Advanced API, providing REST and WebSocket clients to access real-time market data, manage orders, and execute trades programmatically.

Yes. This is the official Coinbase SDK with active maintenance, no known vulnerabilities, low install friction, and permissive licensing. Install it if you need to programmatically trade on Coinbase or consume their Advanced API—it is the canonical choice for Python developers. Ensure you secure your API credentials properly (use a secrets manager, not hardcoded values).

Install

coinbase-advanced-py on PyPI

pip

pip install coinbase-advanced-py

uv

uv add coinbase-advanced-py

poetry

poetry add coinbase-advanced-py

Installing coinbase-advanced-py

Before you install

Low friction install with five stable runtime dependencies (requests, cryptography, PyJWT, websockets, backoff). Actively maintained with a recent release and no known vulnerabilities.

License in practice

Licensed under Apache 2.0 (permissive), allowing use in commercial and private projects with minimal restrictions.

Quickstart

pip install coinbase-advanced-py

from coinbase.rest import RESTClient

client = RESTClient()  # Uses COINBASE_API_KEY and COINBASE_API_SECRET env vars
accounts = client.get_accounts()
print(accounts.to_dict())

Requires Coinbase Developer Platform (CDP) API credentials (Ed25519 or ECDSA key pair); set COINBASE_API_KEY and COINBASE_API_SECRET environment variables or pass them explicitly to RESTClient.

Verify before relying

  • Exact scope and completeness of Advanced Trade API endpoint coverage in this SDK version
  • WebSocket reconnection and error-handling behavior under network interruptions
  • Rate limiting and backoff strategy details beyond what the description states

Package facts

License Apache 2.0 (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 5 — requests, cryptography, PyJWT, websockets, backoff
Maintenance actively maintained — 56 days since the last release
Last repo commit
First released
Downloads 242,844/month — #8,835 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: coinbase_advanced_py-1.8.4-py3-none-any.whl

Keywords: Coinbase, Advanced Trade, API, Advanced API

Intended Audience :: DevelopersIntended Audience :: Financial and Insurance IndustryLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

coinbase api python sdkcryptocurrency trading api clientcoinbase rest websocket clientorder management trading sdkreal-time market data apicoinbase advanced trade python
cryptocurrency-tradingrest-websocket-clientexchange-api

More Internet packages