vike-futures-basis
What a dated future pays over spot - every live quarterly, monthly, weekly and daily future on Binance (USDT-M and COIN-M), Bybit, OKX, Deribit, Gate and Kraken, priced against the index, the venue's spot or its perpetual, with the basis and the annualised cash-and-carry yield to expiry, volume and open interest, sorted by yield or by expiry. Use when the user asks "what is the BTC basis" / "annualized yield of the March BTC future" / "cash and carry on ETH" / "which exchange's quarterly pays the most" / "is the futures curve in contango" / "how far above spot is the December future".
Latest: v1.0.0
First version.
vike-futures-basis
The newest quote (taken about once a minute) of every live dated future, against the underlying. 1 request per call. Pass the base asset (BTC, not BTCUSDT); venues are lower case. It is a snapshot: there is no basis history.
Call it
Use the first of these that is available:
- MCP: the
futures_basistool with the optionalsymbol,exchange,ref,sort,limit. - CLI:
bash vike-data md basis BTC --json # every live BTC future, highest apr first, against the index vike-data md basis ETH --sort expiry --json # the ETH curve, soonest expiry first vike-data md basis BTC --exchange binance --ref spot --json # Binance's BTC futures against Binance spot vike-data md basis --exchange okx --json # every coin OKX lists dated futures for - curl: the credential is
VIKE_API_KEY, elseapi_keyoranon_tokenfrom~/.vike/config.json(Windows%USERPROFILE%\.vike\config.json); with none, get a free anonymous token asvike-coresays.bash curl -s "https://data.vike.io/v1/marketdata/futures/basis?symbol=BTC&sort=expiry" -H "X-API-KEY: $TOKEN"
| Flag | Default | Values |
|---|---|---|
[symbol] | every coin | base asset: BTC, ETH, SOL, XRP, BNB, DOGE ... |
--exchange | every venue | binance, bybit, okx, deribit, gate, kraken |
--ref | index | index (the index the contract settles on), spot (the same venue's spot pair), perp (the same venue's perpetual) |
--sort | apr | apr (highest first, null last) or expiry (soonest first) |
--limit | 500 | 1-5000 rows |
Reading the answer
The envelope is {symbol, exchange, ref, sort, notes, futures}; notes defines every field in words. Each row in futures:
exchange,symbol,instrument(the venue's name:BTCUSDT_270326,BTC-25DEC26,BTC_USDC-4DEC26),expiry(unix seconds),days_to_expiry;type:linear(worthcontract_sizecoins) orinverse(coin-margined, worthcontract_sizeUSD), andsettle(USDT,USDC,USD,BTC);priceandprice_src: the book mid when bid and ask are within 1 % (mid), else the venue's mark (mark), else the last trade (last);last,mark,bid,askare there too;index_price,spot_price,perp_price(null where the venue lists none) andref_price(the one--refpicked);basis= (price - ref_price) / ref_price, a fraction: 0.0054 is 0.54 %;apr= basis x 365 / days_to_expiry, a fraction: what buying the underlying and selling the future earns a year if held to expiry, before fees.nullunder 2 days to expiry;vol_24h_usd,oi_usd(0 where the venue gives none),tsandage_sof the quote.
How to read it:
- Quote
basisnext toapr. A 0.1 % basis 2.3 days out reads as 16 % a year; it is 0.1 % earned once. - Check liquidity before citing a top row. Sorted by
apr, the top is often a thin Gate or Kraken contract (about $15,000-24,000 of daily volume on 2026-12-02; Gate's priced at itsmark, its bid-ask several percent wide). Prefer rows withprice_src: mid, realvol_24h_usdandoi_usd. - The curve:
--sort expirylists one venue's expiries in order. Risingbasiswith expiry and positiveapris contango (futures above spot); a negativebasisis backwardation. - Unlike perp funding, this yield is fixed at entry if held to expiry. A sold future's basis can widen before expiry: a mark-to-market loss on the way.
- To compare with what a perpetual pays instead, run
vike-perp-carry(md carry, cross-venue perp pairs) orvike-perp-funding(md funding-now <SYM>, each venue's funding asapr).
Limits
--ref spothas no spot on Deribit or Kraken: those rows come back withref_price,basisandaprnull. Use the defaultindexthere.- Deribit lists daily expiries: they fall under 2 days and keep
aprnull, which is by design. - Only live contracts quoted in the last 10 minutes are listed; a coin with no dated future returns an empty
futureslist. spot_priceandperp_priceare USDT-quoted, so against a USD-quoted inverse future they carry the small USDT/USD difference.
Errors
- A 400 names the fix, e.g.
ref must be one of ['index', 'spot', 'perp'],sort must be one of ['apr', 'expiry']. The CLI exits 1 with that message. unknown query parameter(curl): the route takes onlysymbol,exchange,ref,sort,limit.- Exit code 3 or HTTP 429: the day's requests are used up; show the server's message and stop.
Anti-patterns
- Don't read
apr0.047 as 0.047 %: it is 4.7 % a year. - Don't present the highest
aprrow as the trade without its volume, open interest andprice_src. - Don't call it risk-free: the two legs need margin, an inverse contract's hedge is held in coins, and fees are not taken off.
- Don't promise a basis history or a chart: this answers now only.
Pairs well with
vike-perp-carryfor cross-venue perp and spot-perp carry after feesvike-perp-fundingfor each venue's perpetual funding of the same coinvike-options-flowfor what Deribit option traders are buying on the same expiries
