greedy AGENTS.md

A set of instructions for Greedy, a local trading engine that runs trading bots and exposes their state and controls to AI agents through MCP, a standard tool-connection protocol.

In plain words
What is it for?
Use it when developing, operating, or connecting AI agents to Greedy's exchange-trading bots and MCP tools.
Why use it?
It documents how prices, orders, rate limits, duplicate-order protection, and saved bot state work, making the system's operating rules easier to follow.

Instructions file for CodexOpenCode

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.

agentmods
npx agentmods add instructions/antonygiomarxdev/greedy/agents-md
Clone the repo
git clone --depth 1 https://github.com/antonygiomarxdev/greedy

Made for: Codex, OpenCode.

Per session 1,066 This file is loaded in full into every session.
When invoked 1,066 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.01066 $0.01066
Opus 5 $0.00533 $0.00533
Sonnet 5 $0.00213 $0.00213
Haiku 4.5 $0.00107 $0.00107

Measured 2d ago against content hash 0cd68637b41b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

greedy AGENTS.md 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 2d 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.

AGENTS.md · 116 lines

How it starts

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

Agent Context for Greedy

Sovereign, local-first algorithmic trading engine. Single static binary. AI-native via MCP.

Architecture

CLI (greedy serve) → daemon with exchange registry + supervisor + MCP server
MCP Server (stdio)  → AI agents control bots via 14 tools, 4 resources, 3 prompts
  • One process: greedy serve. Daemon + MCP share registry and supervisor.
  • Bots run autonomously in goroutines. AI controls them via MCP tools.
  • All state persists to SQLite (~/.greedy/greedy.db).

Stream Layer

When greedy serve runs:

  • PriceStreamer: One fetch goroutine per symbol, shared across all bots. Lock-free atomic cache. 100ms interval.
  • MarketTracker: Ring buffer per symbol with Δ% tracking. Circuit breaker activates if price moves >5% in 30s (cooldown 60s).
  • Debouncer: Per-bot rate limiting. Default 5s cooldown, max 10 orders/30s. Configurable per strategy.
  • Idempotency: ClientOrderID write-ahead reservation prevents duplicate orders on retry. Format: {botID}-{unixMilli}-{seq}.

MCP Tools (14 total)

Tool Exchange param Description
get_ticker Current price
get_order_book Order book depth
get_candles OHLCV history
place_order Market/limit orders
cancel_order Cancel by order ID
get_positions Positions + P&L
get_balances Account balances
get_order_history Query filled orders
start_bot Launch bot (YAML or inline)
stop_bot Stop running bot
list_bots Active bots + P&L
set_credential Store API keys
list_credentials List stored keys
delete_credential Remove stored keys

Default exchange is paper when exchange is omitted.

MCP Resources

URI Description
portfolio://summary Full portfolio snapshot: balances, positions, total P&L
bot://{id}/status Bot status, strategy config, P&L, open orders
bot://{id}/history Complete order history for a bot
market://prices/{symbol} Real-time price for any symbol

Read the full file on GitHub · 116 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. 2d ago First seen · 116 lines · 1,066 tokens per session scan A 0cd68637b41b

Subscribe to this mod's changes

greedy AGENTS.md is an instructions file published in the GitHub repository antonygiomarxdev/greedy (2 stars, last pushed 11d ago), licensed MIT. It adds 1,066 tokens to every session, about $0.0053 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-31.

Related

Other instructions, from other repositories

binance-trading-bot AGENTS.md

AGENTS.md instructions for chrisleekr/binance-trading-bot, covering engineering charter, project, architecture principles, core invariants and stack.

chrisleekr/binance-trading-bot · 4,323 tokens

binance-net

Use Binance.Net when generating C#/.NET code that interacts with the Binance cryptocurrency exchange — including Spot, Margin, USD-M Futures, COIN-M Futures, Options, sub-accounts, brokerage, REST endpoints, WebSocket subscriptions, account management, market data, or order placement. Triggers on any request…

JKorf/Binance.Net · 2,351 tokens

Binance.Net copilot-instructions.md

Instructions for JKorf/Binance.Net, covering copilot instructions for binance.net, use binance.net, not raw http, client setup, result handling and api structure.

JKorf/Binance.Net · 640 tokens

binance-mcp-server copilot-instructions.md

Instructions for AnalyticAce/binance-mcp-server, covering copilot instructions - best development practices, general instructions, python development, code style & structure and python best practices.

AnalyticAce/binance-mcp-server · 1,190 tokens

CryptoExchanges.Net CLAUDE.md

Instructions for OrodruinLabs/CryptoExchanges.Net, covering cryptoexchanges.net — project instructions, git convention and code conventions.

OrodruinLabs/CryptoExchanges.Net · 489 tokens

binance-trading-bot CLAUDE.md

Claude Code instructions for chrisleekr/binance-trading-bot, a project described as: Automated Binance trading bot with pluggable strategies, historical backtesting, and a live dashboard.

chrisleekr/binance-trading-bot · 3 tokens