coinbase-advanced
A Rust async client library for the Coinbase Advanced Trade API.
- Complete REST API coverage for Coinbase Advanced Trade
- WebSocket support for real-time market data
- JWT (ES256) authentication
- Optional client-side rate limiting
- Async/await with Tokio/Reqwest
Library
Authentication:
Obtain API credentials from the Coinbase Developer Platform.
use ;
async
Get account balances:
use ;
async
Place an order:
use ;
async
WebSocket streaming:
use ;
use StreamExt;
async
Configuration:
let client = builder
.credentials
.sandbox
.rate_limiting
.build?;
API coverage
REST endpoints:
| Endpoint type | Implementation |
|---|---|
| Accounts | ✓ |
| Products | ✓ |
| Orders | ✓ |
| Fees | ✓ |
| Portfolios | ✓ |
| Convert | ✓ |
| Data | ✓ |
| Payment methods | ✓ |
| Perpetuals | ✓ |
| Futures | ✓ |
| Public | ✓ |
WebSocket endpoints:
| Endpoint type | Implementation |
|---|---|
| Heartbeats | ✓ |
| Status | ✓ |
| Ticker | ✓ |
| Ticker batch | ✓ |
| Level2 | ✓ |
| Candles | ✓ |
| Market trades | ✓ |
| User | ✓ |
| Futures balance summary | ✓ |
Project structure
.
├── src/ # Core library implementation
│ ├── rest/ # REST API client modules (accounts, orders, products, etc.)
│ ├── models/ # Request/response types and shared data models
│ ├── ws/ # WebSocket client, channels, and message parsing
├── examples/ # Runnable usage examples for common API workflows
└── tests/ # Integration tests for end-to-end API behavior