fetch-quotes

fetch-quotes is a skill for Claude Code from mahmoud20138/Tradecraft. It costs 96 tokens per session (1,942 once invoked), scanned A, original, MIT.

A market-data fetcher that retrieves price bars and the latest quote for assets such as currencies, stocks, commodities, indices, and cryptocurrencies. It uses free Yahoo Finance data first and can use a logged-in local MetaTrader 5 terminal when available.

In plain words
What is it for?
Use it to fetch OHLCV bars—open, high, low, close, and volume—for a chosen time period, retrieve a current quote, or create a PNG price chart.
Why use it?
It provides current or historical price data without requiring an account or API key on the free route, while supporting broker-specific prices when MetaTrader 5 is available.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the tradecraft plugin — 58 skills shipped together

Good fit Use it to fetch OHLCV bars—open, high, low, close, and volume—for a chosen time period, retrieve a current quote, or create a PNG price chart.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add mahmoud20138/Tradecraft
Claude Code
/plugin install tradecraft

Made for: Claude Code.

Or install tradecraft, the plugin that ships this one along with the rest of its 58 skills.

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 fetch-quotes

README.md
[![agentmods](https://agentmods.dev/badge/skills/mahmoud20138/tradecraft/fetch-quotes/github.svg)](https://agentmods.dev/skills/mahmoud20138/tradecraft/fetch-quotes)
Your own site
<a href="https://agentmods.dev/skills/mahmoud20138/tradecraft/fetch-quotes"><img src="https://agentmods.dev/badge/skills/mahmoud20138/tradecraft/fetch-quotes/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 fetch-quotes

Your own site · 80×15
<a href="https://agentmods.dev/skills/mahmoud20138/tradecraft/fetch-quotes"><img src="https://agentmods.dev/badge/skills/mahmoud20138/tradecraft/fetch-quotes.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,942 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.
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.00096 $0.01942
Opus 5 $0.00048 $0.00971
Sonnet 5 $0.00019 $0.00388
Haiku 4.5 $0.00010 $0.00194

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

Security

Grade A, and why

fetch-quotes 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 10d 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.

plugins/tradecraft/skills/fetch-quotes/SKILL.md · 166 lines

How it starts

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

Fetch Quotes — Free-First Data Source

Primary data source: yfinance (free, no account, no API key). Automatic upgrade to local MT5 terminal when it is running and logged in. Pick this when you need OHLCV bars or a current quote for any symbol and don't want to maintain credentials.

Invocation

/tradecraft:fetch-quotes <SYMBOL> [TIMEFRAME] [BARS] [SOURCE] [CHART]

# Examples
/tradecraft:fetch-quotes XAUUSD                  # defaults: H1, 200 bars, auto
/tradecraft:fetch-quotes US30 H4
/tradecraft:fetch-quotes EURUSD M15 100 free
/tradecraft:fetch-quotes BTCUSD D1 300 auto chart
  • <SYMBOL> — e.g. XAUUSD, US30, EURUSD, BTCUSD. Broker suffixes (XAUUSDm, US30.cash) are normalized automatically.
  • [TIMEFRAME]M1 M5 M15 M30 H1 H4 D1 W1. Default H1. (H4 via --source free is resampled from yfinance 1-hour bars.)
  • [BARS] — number of bars to return. Default 200.
  • [SOURCE]auto (default), free (yfinance only), mt5 (MT5 only, fails if unavailable).
  • [CHART] — pass chart or a PNG path to render a line chart.

What Claude Should Execute

First-time setup (free path only):

pip install -r "${CLAUDE_PLUGIN_ROOT}/scripts/requirements.txt"

Optional, Windows only, for broker-exact pricing:

pip install MetaTrader5

Then, per invocation, shell out to the fetcher:

python "${CLAUDE_PLUGIN_ROOT}/scripts/fetch_quotes.py" \
  --symbol <SYMBOL> \
  --timeframe <TIMEFRAME> \
  --bars <BARS> \
  --source <SOURCE> \
  [--chart <path.png>]

The script writes JSON to stdout. Parse it; if source == "yfinance", remind the user that prices may be ~15 min delayed for indices and futures.

Output Contract

{
  "source": "yfinance | mt5",
  "symbol": "XAUUSD",
  "broker_symbol": "XAUUSDm | GC=F",
  "timeframe": "H1",
  "bars": [
    {"time": "2026-04-23T10:00:00+00:00",
     "open": 2340.1, "high": 2343.5, "low": 2339.8, "close": 2342.7,
     "volume": 1234}
  ],
  "latest": {
    "bid": 2342.70, "ask": 2342.85, "spread": 0.15,
    "time": "2026-04-23T10:58:12+00:00"
  },
  "point_value": 0.01,
  "note": "Only present on yfinance path - explains delay and missing L1 depth.",
  "chart_path": "out.png"
}

Read the full file on GitHub · 166 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. 10d ago First seen · 166 lines · 96 tokens per session scan A 688a59406199

Subscribe to this mod's changes

fetch-quotes is a skill published in the GitHub repository mahmoud20138/Tradecraft (15 stars, last pushed 4mo ago), licensed MIT. It adds 96 tokens to every session and 1,942 once invoked, about $0.0005 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

trade-memory

Compliance-grade decision audit trail for AI trading agents. Records every trading decision with full context (conditions, filters, indicators, risk state), SHA-256 tamper detection, and structured export for MiFID II / EU AI Act readiness. Works alongside Binance Spot, Futures, and Web3 skills — they execute trades…

mnemox-ai/tradememory-protocol · 68 tokens

tradememory-bridge

Bridge between Binance trading events and TradeMemory Protocol. Automatically journals trades, recalls similar past setups, detects behavioral biases, and provides outcome-weighted recall for AI trading agents. Use this skill after executing Binance spot trades to build persistent memory.

mnemox-ai/tradememory-protocol · 53 tokens

evolution-engine

Domain knowledge for the Evolution Engine — LLM-powered autonomous strategy discovery from raw OHLCV data. Covers the generate-backtest-select-evolve loop, vectorized backtesting, out-of-sample validation, and strategy graduation. Use when discovering trading patterns, running backtests, evolving strategies, or…

mnemox-ai/tradememory-protocol · 94 tokens

risk-management

Risk management domain knowledge for trading agents — affective state monitoring, position sizing, drawdown management, tilt detection, and behavioral guardrails. Use when checking risk before trades, managing drawdowns, detecting behavioral drift, or enforcing discipline. Triggers on "risk", "drawdown", "tilt"…

mnemox-ai/tradememory-protocol · 89 tokens

trading-memory

Domain knowledge for AI trading memory — Outcome-Weighted Memory (OWM) architecture, 5 memory types, recall scoring, and behavioral analysis. Use when recording trades, recalling similar contexts, analyzing performance, or checking behavioral drift. Triggers on "record trade", "remember trade", "recall", "similar…

mnemox-ai/tradememory-protocol · 88 tokens

ct-alpha

Crypto Twitter intelligence and alpha research. Search X/Twitter for real-time crypto narratives, trending tokens, yield strategies, smart money signals, and protocol research. Features TweetRank (PageRank-inspired credibility scoring), multi-signal token detection, coordinated raid detection, and dynamic tool…

sendaifun/skills · 71 tokens