kraken-basis-trading

kraken-basis-trading is a skill for Claude Code from krakenfx/kraken-cli. It costs 20 tokens per session (806 once invoked), scanned A, original, MIT.

A trading method that seeks to earn from the price difference between an asset bought directly and its futures contract, an agreement to trade later. It uses a market-neutral position: long spot and short futures.

In plain words
What is it for?
Use it to find a positive futures premium, calculate matched position sizes, open both sides, monitor the gap and funding, and close the positions when the gap narrows or the contract expires.
Why use it?
It aims to reduce exposure to the asset’s overall price movement so the result depends mainly on the gap between spot and futures prices.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: built for openclaw.

Part of the kraken-cli plugin — 59 skills, 1 MCP server shipped together

Good fit Use it to find a positive futures premium, calculate matched position sizes, open both sides, monitor the gap and funding, and close the positions when the gap narrows or the contract expires.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/krakenfx/kraken-cli/kraken-basis-trading
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add krakenfx/kraken-cli --skill kraken-basis-trading
Clone the repo
git clone --depth 1 https://github.com/krakenfx/kraken-cli

Made for: Claude Code.

Or install kraken-cli, the plugin that ships this one along with the rest of its 59 skills, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for kraken-basis-trading

README.md
[![agentmods](https://agentmods.dev/badge/skills/krakenfx/kraken-cli/kraken-basis-trading/github.svg)](https://agentmods.dev/skills/krakenfx/kraken-cli/kraken-basis-trading)
Your own site
<a href="https://agentmods.dev/skills/krakenfx/kraken-cli/kraken-basis-trading"><img src="https://agentmods.dev/badge/skills/krakenfx/kraken-cli/kraken-basis-trading/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for kraken-basis-trading

Your own site · 80×15
<a href="https://agentmods.dev/skills/krakenfx/kraken-cli/kraken-basis-trading"><img src="https://agentmods.dev/badge/skills/krakenfx/kraken-cli/kraken-basis-trading.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 806 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00020 $0.00806
Opus 5 $0.00010 $0.00403
Sonnet 5 $0.00004 $0.00161
Haiku 4.5 $0.00002 $0.00081

Measured 11d ago against content hash f19ec7ff6d2d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

kraken-basis-trading scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/kraken-basis-trading/SKILL.md · 94 lines

How it starts

The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.

kraken-basis-trading

Use this skill for:

  • identifying positive basis (futures premium over spot)
  • entering delta-neutral positions (long spot, short futures)
  • monitoring basis convergence
  • closing both legs when basis narrows or contracts expire

Core Concept

When futures trade at a premium to spot (positive basis), you can buy spot and sell futures for the same notional amount. The profit comes from basis convergence as the contract approaches expiry, or from collecting funding on perpetuals. The position is market-neutral: price movement does not affect P&L, only the spread does.

Basis Calculation

SPOT=$(kraken ticker BTCUSD -o json 2>/dev/null | jq -r '.[].last_price')
FUTURES=$(kraken futures ticker PF_XBTUSD -o json 2>/dev/null | jq -r '.ticker.last')
BASIS=$(echo "scale=4; ($FUTURES - $SPOT) / $SPOT * 100" | bc)
echo "Basis: ${BASIS}%"

A positive basis means futures are more expensive than spot (contango). A negative basis means futures are cheaper (backwardation).

Entry (Long Spot + Short Futures)

  1. Check spot price and futures price.
  2. Ensure the basis is attractive (e.g., > 0.5% annualized).
  3. Calculate matched position sizes.
  4. Execute both legs (requires human approval):
# Long spot
kraken order buy BTCUSD 0.01 --type limit --price $SPOT -o json 2>/dev/null

# Short futures (matched notional)
kraken futures order sell PF_XBTUSD 1 --type limit --price $FUTURES -o json 2>/dev/null

Monitoring

Watch basis convergence:

# Periodic check
kraken ticker BTCUSD -o json 2>/dev/null
kraken futures ticker PF_XBTUSD -o json 2>/dev/null

Check positions:

kraken balance -o json 2>/dev/null
kraken futures positions -o json 2>/dev/null

Exit

Close both legs when basis narrows to target:

# Sell spot
kraken order sell BTCUSD 0.01 --type market -o json 2>/dev/null

# Close futures short
kraken futures order buy PF_XBTUSD 1 --reduce-only -o json 2>/dev/null

Risk Considerations

Read the full file on GitHub · 94 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 94 lines · 20 tokens per session scan A f19ec7ff6d2d

Subscribe to this mod's changes

kraken-basis-trading is a skill published in the GitHub repository krakenfx/kraken-cli (714 stars, last pushed 1mo ago), licensed MIT. It adds 20 tokens to every session and 806 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

sector-rotation

An analysis framework for comparing industries in the Chinese A-share stock market, using business conditions, price momentum, valuation, and money flows. It produces rankings and higher- or lower-allocation suggestions.

HKUDS/Vibe-Trading · 39 tokens

strategy-pivot-designer

Detect backtest iteration stagnation and generate structurally different strategy pivot proposals when parameter tuning reaches a local optimum.

tradermonty/claude-trading-skills · 28 tokens

twitter-reader

Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my…

himself65/finance-skills · 161 tokens

chenhao-limit-up

A framework for judging Chinese A-share stocks that have reached the daily price-rise limit, using market mood, sector leadership, and trading momentum.

questflowai/investorskills · 44 tokens

trading-risk-gate

Unified pre-trade safety gate: Ruin check (Law #1), ergodicity audit, and win-rate dominance validation. Absorbs: ergodicity-check, law-of-ruin, win-rate-dominance.

winstonkoh87/Athena-Public · 53 tokens

furusato

A Japanese hometown-tax donation manager for furusato nozei, a system where donations to municipalities can qualify for an income-tax or local-tax deduction. It reads donation receipts, stores donation records, and calculates deduction limits.

kazukinagata/shinkoku · 102 tokens