binance-trading-bot is a self-hosted program that connects to a Binance account and automatically decides when to buy or sell cryptocurrency using selectable trading strategies. It is for operators who want to run grid, momentum, or rebalancing strategies, test them against historical data, and monitor live activity through a dashboard.
Borrowing it
Nothing to install: this file belongs to chrisleekr/binance-trading-bot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/chrisleekr/binance-trading-bot/main/AGENTS.mdgit clone --depth 1 https://github.com/chrisleekr/binance-trading-botWrote 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.
[](https://agentmods.dev/instructions/chrisleekr/binance-trading-bot/agents-md)<a href="https://agentmods.dev/instructions/chrisleekr/binance-trading-bot/agents-md"><img src="https://agentmods.dev/badge/instructions/chrisleekr/binance-trading-bot/agents-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.04344 | $0.04344 |
| Opus 5 | $0.02172 | $0.02172 |
| Sonnet 5 | $0.00869 | $0.00869 |
| Haiku 4.5 | $0.00434 | $0.00434 |
Grade A, and why
binance-trading-bot 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 today.
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.
How it starts
The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Engineering charter
Charter for any coding agent in this repo (Claude Code, Cursor, Codex, …). Keep it short — architecture, config, and ops live in
docs/(built bymkdocs). Generic engineering principles (think-first, simplicity, goal-driven):.claude/rules/principles.md.
Project
binance-trading-bot: single-operator, multi-account, multi-profile, reliability-first, mobile-first trading platform on Binance. One operator owns N first-class Binance accounts (each = one API key pair + one environment + one user-data stream); each account runs N strategy profiles against its shared wallet. Strategy is a plugin — trailing-trade is the first; source of truth is packages/strategy/trailing-trade/, contract in packages/strategy/core/ + docs/architecture/extensibility.md.
Architecture principles
Correctness first. Before coding, confirm the design is sound: surface tradeoffs, pick the simplest option that holds the invariants below, cite authoritative sources for any version/API claim, and push back rather than guess. Greenfield, not yet deployed — no back-compat debt, so prefer the correct extensible design over the minimal diff and restructure freely; the invariants still bind, and you name a large refactor before starting it.
Core invariants
- Extensibility. Strategies are plugins behind
packages/strategy-core; notifier providers behind@app/notify's./providers/*subpath exports.apps/api/apps/workerMUST NOT import a specificstrategy-*package or an@app/notify/providers/*provider outside their registry bootstrap;apps/webMAY import strategy packages for typed event payloads. Adding a strategy = new package + registry entry; adding a notifier = new provider module +buildNotifyRegistryentry — never an edit toapps/api/apps/worker. - Reliability. Crash-only. Idempotent jobs. Per-account Binance-rate isolation. No silent failures.
- Approachable & responsive. Solo operator, not a finance pro: plain language, gloss a trading term the first time it appears, never assume off-screen knowledge. Mobile-first — every view usable at 375×667 — then scale up.
- Account-scoped by row, not convention.
- Model: one operator (
users) → manyaccounts→ manyprofiles.accounts.owner_id → users.id; each account holds one Binance key pair, onebinance_mode, one user-data stream.profiles.account_idbinds each profile to its account, sharing that account's key/wallet/stream. - Branded two-tier scope:
AccountScope{db,operatorId,accountId}fromscopeAccount,ProfileScope{db,operatorId,accountId,profileId}fromscopeProfile— proves the ownership chain in one query.UserIdandAccountIdare distinct branded types (misplacing one won't compile). - Access rule: app code reaches account-scoped data ONLY through
profileRepo(...)/profileRepoFromScope(scope)— oraccountRepo(...)/accountRepoFromScopefor account-level surfaces like api-keys — from@app/db. No manual(db, operatorId, …)threading; every account-scoped repo fn takes anAccountScope/ProfileScopefirst, minted only byscopeAccount/scopeProfile— ownership proven exactly once at compile time. Flatrepo.<x>stays only for operator/global fns (repo.users.*,repo.accounts.create/listForOwner, retention sweeps). - Routes: API under
/api/accounts/:accountId/..., web under/accounts/$accountId/.... - Enforcement:
packages/db/__tests__/repo/ast-check.test.ts+ cross-account integration tests. No DB-side RLS. Seedocs/architecture/{account-isolation,database}.md. - Strategy state is per-(profile, symbol) in storage and in
tick()— one slice per symbol per call. Cross-symbol state goes through the per-profile KV store: emitset-kv/delete-kvunder a strategy-owned namespaced key and read the merged snapshot back viaTickInput.profileKv(opt in withcapabilities.needsProfileKv). A KV write lands for sibling symbols on later ticks, never the same tick.
- Model: one operator (
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.
- today Changed · +21 tokens per session 3758b3d93727
- 8d ago First seen · 109 lines · 4,323 tokens per session scan A eac5cccfbafa
binance-trading-bot AGENTS.md is an instructions file published in the GitHub repository chrisleekr/binance-trading-bot (5,557 stars, last pushed today), licensed Apache-2.0. It adds 4,344 tokens to every session, about $0.0217 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.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.