A fully typed, validated async client for the Coinbase API.
- Documentation: https://tribulnation.com/typed/coinbase
- Source Code: https://github.com/tribulnation/typed/tree/main/packages/coinbase
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
- Fetch Market Data
- Manage Account Data
- Deposits & Withdrawals
- Place & Manage Orders
- Listen To Streams
- Paginate Through Results
- Fetch Exchange Market Data
Reference
Design Philosophy
Typed Coinbase follows the principles outlined in this blog post.
Details matter. Developer experience matters.
License
MIT — see LICENSE.
Release files for typed-coinbase 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| typed_coinbase-0.5.0.tar.gz | 164.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| typed_coinbase-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 493.4 kB
Release files / typed_coinbase-0.5.0.tar.gz
| Download URL | typed_coinbase-0.5.0.tar.gz |
|---|---|
| Size | 164.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
51d506baf06be1b284a7cc5f59f0bc0a49686ef20da6f2c41bb00adc1720f938
|
|
BLAKE2b-256 checksum How to use checksums |
328b2e9de8d4f507036ec2a3508c12cfdbc440e2c827233d2edb954c2b0dba60
|
| 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 Sep 20, 2026.
Transparency logRelease files / typed_coinbase-0.5.0-py3-none-any.whl
| Download URL | typed_coinbase-0.5.0-py3-none-any.whl |
|---|---|
| Size | 329.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f3f5d21554e68002799e99beda8c0d25a616f366fb105d4633e230c5b2dc821c
|
|
BLAKE2b-256 checksum How to use checksums |
0d938d6e85a10507214060e6262c52de2148e3eb47ff0edbbe3f2e2005547096
|
| 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 Sep 20, 2026.
Transparency log