Algo Trading the Full CDE Universe
The Coinbase Derivatives Exchange offers 80+ contracts spanning crypto, DeFi tokens, and commodities. Learn how to write multi-asset algos, choose the right contracts, and build strategies across the full universe.
Algo Trading the Full CDE Universe
Most traders think about BTC and ETH when they hear "crypto futures." But the Coinbase Derivatives Exchange offers contracts on 30+ underlying assets — from Solana and Chainlink to Gold, Silver, Crude Oil, Copper, and Natural Gas. This creates a rich universe for multi-asset algorithmic strategies.
The Complete CDE Asset Universe
| Category | Assets | Monthly Tickers | Long-Dated | Contract Sizes |
|---|---|---|---|---|
| BTC & ETH | Bitcoin, Ether | BIT, ET | BIP, ETP | 0.01 BTC, 0.1 ETH |
| Major Crypto | SOL, XRP, ADA, DOGE, LTC, BCH, AVAX, LINK | SOL, XRP, ADA, DOG, LC, BCH, AVA, LNK | Multiple | Varies |
| DeFi & Altcoins | DOT, MATIC, XLM, SUI, HBAR, ZEC, NEAR, ENA, ONDO, SHIB, PEPE | DOT, MC, XLM, SUI, HED | Most have -P suffix | Varies |
| Precious Metals | Gold, Silver, Palladium | GOL, SLR | SLP, PAU | 1–50 oz |
| Energy | Crude Oil, Natural Gas | NOL, NGS | None | 10 bbl, 1000 MMBtu |
| Industrial Metals | Copper | CU | None | 2000 lbs |
Strategy 1: Multi-Asset RSI Momentum Rotation
Allocate your capital to the N strongest assets by RSI, rotating every evaluation cycle. This works well across the CDE universe because different assets trend at different times.
function initialize(context) {
// Rotate across BTC, ETH, SOL, LINK, GOLD, SILVER
// context.symbols = ['BTC', 'ETH', 'SOL', 'LINK', 'GOLD', 'SILVER']
context.rsiPeriod = 14;
context.topN = 2; // hold the 2 strongest assets
}
function handleData(context, data) {
// Score every asset by RSI momentum
const scores = context.symbols.map(sym => {
const closes = data.history(sym, 'close', context.rsiPeriod + 10);
return { sym, rsi: indicators.rsi(closes, context.rsiPeriod) };
});
// Sort strongest first, allocate equally to top N
scores.sort((a, b) => b.rsi - a.rsi);
const alloc = 1.0 / context.topN;
scores.forEach(({ sym }, i) => {
orderTargetPercent(sym + '-FUTURES', i < context.topN ? alloc : 0);
});
}Strategy 2: Crypto vs Commodity Spread
Gold and Bitcoin have historically shown periods of correlation and divergence. When crypto sells off, gold often rallies as a safe haven. A spread strategy exploits this:
function initialize(context) {
// Run this with symbols = ['BTC', 'GOLD'] and marketType = 'futures'
context.lookback = 30;
}
function handleData(context, data) {
const btcCloses = data.history('BTC', 'close', context.lookback + 2);
const goldCloses = data.history('GOLD', 'close', context.lookback + 2);
const btcMom = btcCloses[btcCloses.length - 1] / btcCloses[0]; // 30-day return
const goldMom = goldCloses[goldCloses.length - 1] / goldCloses[0];
// Overweight whichever asset has stronger recent momentum
if (btcMom > goldMom) {
orderTargetPercent('BTC-FUTURES', 0.7);
orderTargetPercent('GOLD-FUTURES', 0.3);
} else {
orderTargetPercent('BTC-FUTURES', 0.3);
orderTargetPercent('GOLD-FUTURES', 0.7);
}
}Liquidity Considerations
Not all CDE contracts are equally liquid. Wider bid-ask spreads on illiquid contracts eat into returns, especially for strategies that trade frequently.
| Liquidity Tier | Contracts | Recommended Strategy |
|---|---|---|
| High (market orders OK) | BIT, ET, BIP, ETP | Any frequency, market orders fine |
| Medium (limit orders best) | SOL, XRP, ADA, LINK, GOL, SLR | Use limit orders, avoid high-frequency |
| Lower (be careful) | SHIB, PEPE, ZEC, PAU, NGS, CU | Wider spreads — size down, use limits |
Use the Asset Reference panel while writing code
In the Crypto Algo page, open the Custom Code section and click "Asset Ref." This shows every available contract with its exact product ID, contract size, expiry date, and days remaining — fetched live from Coinbase. Select the correct symbol in your asset chips first (e.g. GOLD, SILVER, OIL) before launching a futures bot on commodities.
Commodity Seasonality Patterns
- Natural Gas (NGS): Strong seasonality. Demand peaks November–January (heating) and June–August (air conditioning). Historically, going long in early October and exiting in early January captures the winter demand spike.
- Gold (GOL): Often rallies in January (jewelry demand, post-holiday) and in Q3 (Indian wedding season). Also rallies during equity market stress.
- Crude Oil (NOL): Demand-driven by travel seasons. Often stronger April–August (driving season). OPEC+ decisions dominate over seasonal effects — harder to trade systematically.
- Copper (CU): Correlated with global manufacturing PMI. Strong indicator of economic expansion/contraction. Less seasonal than energy.
Building Your Asset Reference Into Strategy Code
// Multi-asset futures strategy spanning crypto AND commodities
// Select: BTC, ETH, GOLD, SILVER, SOL from the asset chips
function initialize(context) {
// Different strategies for crypto vs commodity assets
context.cryptoAssets = ['BTC', 'ETH', 'SOL'];
context.commodityAssets = ['GOLD', 'SILVER'];
context.fastPeriod = 20;
context.slowPeriod = 60;
}
function handleData(context, data) {
const cryptoAlloc = 0.6 / context.cryptoAssets.length; // 60% to crypto
const commodityAlloc = 0.4 / context.commodityAssets.length; // 40% to commodities
// Crypto: fast SMA cross
for (const sym of context.cryptoAssets) {
const closes = data.history(sym, 'close', context.slowPeriod + 2);
const fast = indicators.sma(closes, context.fastPeriod);
const slow = indicators.sma(closes, context.slowPeriod);
orderTargetPercent(sym + '-FUTURES', fast > slow ? cryptoAlloc : 0);
}
// Commodities: slower SMA cross (commodities trend more slowly)
for (const sym of context.commodityAssets) {
const closes = data.history(sym, 'close', context.slowPeriod + 2);
const fast = indicators.sma(closes, 30); // slower for commodities
const slow = indicators.sma(closes, 90);
orderTargetPercent(sym + '-FUTURES', fast > slow ? commodityAlloc : 0);
}
}- The CDE has 80+ contracts: crypto majors, DeFi altcoins, and commodities (Gold, Silver, Oil, Copper, Gas)
- Multi-asset rotation strategies — allocating to the strongest momentum assets — are powerful on the CDE
- Commodity contracts have seasonal patterns that crypto contracts lack
- Liquidity varies enormously: BIT/ET are liquid, smaller altcoin contracts may have wide spreads
- The platform's asset reference panel shows live product IDs, contract sizes, and expiry for every contract