Skip to main content

Typed Coinbase

A fully typed, validated async client for the Coinbase API.

PyPI version Python versions Docs License



from typed_coinbase import Coinbase

async with Coinbase.new(public=True) as client:
  product = await client.app.advanced_trade.http.products.public.get('BTC-USD')
  print(product['price'])

Typed Coinbase covers two independent Coinbase product families under one client: Coinbase App (client.app, above — Consumer/Business v2 and Advanced Trade v3) and Coinbase Exchange (client.exchange, the institutional API formerly known as Pro/GDAX):

from typed_coinbase import Coinbase

async with Coinbase.new() as client:
  products = await client.exchange.http.products.list()
  print(products[0]['id'])

Each family has its own credentials, host, and setup guide — see API Keys Setup for App and Exchange API Keys Setup for Exchange.

The separate client.international namespace provides credential-free INTX instrument details, current quotes and funding history. It does not grant private INTX access. Native INTX symbols such as BTC-PERP differ from Advanced Trade's BTC-PERP-INTX product IDs.

from typed_coinbase import Coinbase

async with Coinbase.new(public=True) as client:
  instrument = await client.international.instruments.get('BTC-PERP')
  print(instrument['quote']['mark_price'], instrument['open_interest'])
  page = await client.international.instruments.funding('BTC-PERP', result_limit=100)
  print(page['results'][0]['event_time'])

funding_paged walks retained history using retryable offset pages. New funding events can move offsets during a walk; the API does not provide an atomic snapshot. Instrument prices and quantities are Decimal; native JSON-number margin ratios remain float. funding_interval is an integer duration in nanoseconds, not a timestamp, and the nested quote's timestamp is an aware datetime.

Why Typed Coinbase?

  • 🎯 Precise Types: every endpoint's inputs and responses are typed, from Coinbase App's v2 wallets and Advanced Trade's v3 order configurations to Exchange's order book and order-lifecycle shapes, not dict/Any.
  • ✅ Runtime Validation: every response is validated against its declared schema by default, across App and Exchange alike.
  • ⚡ Async First: async HTTP and WebSocket streaming, built for concurrent workflows across app's two WebSocket connections and Exchange's single WebSocket Feed.
  • 📚 Full Surface: every documented Coinbase App, Advanced Trade, and Coinbase Exchange endpoint, not just the popular ones.

Installation

pip install typed-coinbase

How To

Reference

Design Philosophy

Typed Coinbase follows the principles outlined in this blog post.

Details matter. Developer experience matters.

License

MIT — see LICENSE.

Metadata

Release files for typed-coinbase 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for typed-coinbase 0.6.0
File Size Uploaded
typed_coinbase-0.6.0.tar.gz 165.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for typed-coinbase 0.6.0
File Interpreter ABI Platform
typed_coinbase-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 494.7 kB

Release files / typed_coinbase-0.6.0.tar.gz

Download URL typed_coinbase-0.6.0.tar.gz
Size 165.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c78c7d2419655a7a9aad757a7c1c5cdece7d24c951086b3993ff6f1cf89b4aeb
BLAKE2b-256 checksum
How to use checksums
60fce88c4072b36f2ee96122c6bb383d920705256ad0479756b1ef297286002f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / typed_coinbase-0.6.0-py3-none-any.whl

Download URL typed_coinbase-0.6.0-py3-none-any.whl
Size 329.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9040e0dc9788c0c0f0967b904c2537c7390085728e4f8d57de057942131d94b
BLAKE2b-256 checksum
How to use checksums
7f355b95d00ebdbe0a555d6c3fe15d542bd2dc9030b84d884f5e4dfe6081243b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page