Trade API
Trade 250+ assets programmatically
Place market and limit orders, manage portfolios and stream fills over a clean REST and WebSocket API.
# Buy €100 of ETH at market
from Coinbase import Client
client = Client(api_key, api_secret)
order = client.orders.create(
product_id="ETH-EUR",
side="buy",
quote_size="100"
)
print(order.status) # "filled"
What you get
All order types
Market, limit, stop-limit and bracket.
Real-time
WebSocket feeds for fills and prices.
Portfolios
Separate sub-accounts per strategy.
Scoped keys
Least-privilege API permissions.
Quickstart
- Step 1
Create an account
Sign up for a free developer account.
- Step 2
Generate API keys
Create keys with the scopes you need.
- Step 3
Install the SDK
npm, pip or go get, whichever you prefer.
- Step 4
Ship it
Test on testnet, then switch to mainnet.
Start building in minutes
Create a free developer account and get API keys instantly.