{"id":"8e63206f-be77-4916-9de5-37328c3c4329","slug":"easy-binance","kind":"skill","name":"easy-binance","summary":"Access the Binance API via CLI to expose functionality as reusable Agent Skills.","owner":"ystemsrx","repoUrl":"https://github.com/ystemsrx/easy-binance","license":"Apache-2.0","licenseTier":"permissive","trust":"community","stars":3,"match":null,"fewStars":true,"format":"skill","createdAt":"2026-03-09T07:25:44.000Z","addedAt":"2026-10-21T22:44:58.607Z","logoUrl":"https://avatars.githubusercontent.com/u/140463276?u=2d101ac31e550e1f1f5bc2aed98457b23a35628a&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["writing"],"tags":[],"runtime":"python","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-26T04:27:16.191Z","sample":false,"url":"https://conduits.dev/tools/easy-binance","language":"Python","transports":["stdio"],"install":{"pypi":"easy-binance"},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"<div align=\"center\">\n\n# easy-binance\n\n[![PyPI version](https://img.shields.io/pypi/v/easy-binance?color=blue&logo=pypi&logoColor=white)](https://pypi.org/project/easy-binance/)\n[![Python](https://img.shields.io/pypi/pyversions/easy-binance?logo=python&logoColor=white)](https://pypi.org/project/easy-binance/)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Build](https://img.shields.io/github/actions/workflow/status/ystemsrx/easy-binance/ci.yml?logo=github)](https://github.com/ystemsrx/easy-binance/actions)\n[![Agent Skill](https://img.shields.io/badge/Agent_Skill-Claude_Code-blueviolet?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0id2hpdGUiPjxwYXRoIGQ9Ik0xMiAyQzYuNDggMiAyIDYuNDggMiAxMnM0LjQ4IDEwIDEwIDEwIDEwLTQuNDggMTAtMTBTMTcuNTIgMiAxMiAyem0wIDE4Yy00LjQyIDAtOC0zLjU4LTgtOHMzLjU4LTggOC04IDggMy41OCA4IDgtMy41OCA4LTggOHoiLz48L3N2Zz4=)](skills/easy-binance/SKILL.md)\n\n**An Agent Skill for Binance Derivatives Trading**\n\n_Let your AI agent trade, query, and stream Binance futures & options — via CLI or Python_\n\n---\n\n</div>\n\n> [!IMPORTANT]\n> **`easy-binance` is designed as a _skill_ for AI coding agents** (e.g. Claude Code, Cursor, codex).\n> It ships a `SKILL.md` manifest so agents can autonomously discover products, pick the right API, and execute trades — no manual lookup required.\n> Of course, it works perfectly fine as a standalone CLI / Python library too.\n\n## Features\n\n| Feature               | Description                                                                     |\n| --------------------- | ------------------------------------------------------------------------------- |\n| **Multi-product**     | USDⓈ-M Futures, COIN-M Futures, Options, Portfolio Margin, Portfolio Margin Pro |\n| **CLI**               | Installable entrypoint — `easy-binance --help`                                  |\n| **REST**              | Typed REST API calls via official SDKs                                          |\n| **WebSocket API**     | Request/response over WebSocket connections                                     |\n| **WebSocket Streams** | Real-time market data subscriptions                                             |\n| **Python Library**    | Use directly in your own scripts and projects                                   |\n| **Dynamic Discovery** | Auto-discover all available methods per product                                 |\n| **`.env` Support**    | Credentials from `.env` (CWD) → env vars, with smart precedence                 |\n\n## Install\n\n```bash\npip install easy-binance\n```\n\n<details>\n<summary><b>Local development setup</b></summary>\n\n```bash\nuv venv .venv\nuv pip install -e .[dev]\n```\n\n</details>\n\n## Credentials\n\n> [!NOTE]\n> `easy-binance` resolves credentials in the following priority order:\n>\n> 1. Explicit CLI options or library arguments\n> 2. `.env` file in the current working directory\n> 3. Process environment variables\n\nExpected variable names:\n\n```bash\nBINANCE_API_KEY=...\nBINANCE_API_SECRET=...\n```\n\n> [!CAUTION]\n> Never commit your `.env` file or share your API credentials. Always add `.env` to your `.gitignore`.\n\n## CLI Examples\n\n### List products\n\n```bash\neasy-binance products\n```\n\n### List REST methods for USDⓈ-M Futures\n\n```bash\neasy-binance methods usds-futures rest\n```\n\n### Describe a method\n\n```bash\neasy-binance describe usds-futures rest exchange_information\n```\n\n### Call a public REST endpoint\n\n```bash\neasy-binance call usds-futures rest exchange_information\n```\n\n### Call a WebSocket API endpoint\n\n```bash\neasy-binance call usds-futures websocket-api order_book --param symbol=BTCUSDT\n```\n\n### Listen to a WebSocket stream\n\n```bash\neasy-binance listen usds-futures aggregate_trade_streams --param symbol=btcusdt --duration 5\n```\n\n> [!TIP]\n> If your network is slow, increase the WebSocket timeout:\n>\n> ```bash\n> easy-binance --ws-timeout 10000 call usds-futures websocket-api order_book --param symbol=BTCUSDT\n> ```\n\n### Raw REST request via official SDK\n\n```bash\neasy-binance call usds-futures rest send_request \\\n  --param endpoint=/fapi/v1/exchangeInfo \\\n  --param method=GET\n```\n\n## Python Examples\n\n### REST call\n\n```python\nfrom easy_binance import EasyBinance\n\nclient = EasyBinance()\n\ninfo = client.call(\"usds-futures\", \"rest\", \"exchange_information\")\nprint(info[\"data\"][\"timezone\"])\n```\n\n### WebSocket API call\n\n```python\nbook = client.call(\n    \"usds-futures\",\n    \"websocket-api\",\n    \"order_book\",\n    params={\"symbol\": \"BTCUSDT\"},\n)\nprint(book[\"data\"])\n```\n\n### Stream subscription\n\n```python\nfrom easy_binance import EasyBinance\n\nclient = EasyBinance()\nmessages = client.listen(\n    \"usds-futures\",\n    \"aggregate_trade_streams\",\n    params={\"symbol\": \"btcusdt\"},\n    duration=3,\n    max_messages=2,\n)\nprint(messages)\n```\n\n## Use as Agent Skill\n\nThe `skills/easy-binance/SKILL.md` file is a skill manifest that teaches AI agents how to use this tool autonomously. It covers:\n\n- Install & verification steps\n- Credential resolution\n- Product / API / method discovery workflow\n- CLI and Python calling conventions\n- Parameter encoding rules\n- Safe operating defaults (bounded streams, describe-before-call)\n- Failure handling & recovery\n\n### Supported agent platforms\n\n| Platform         | How to register                                                                               |\n| ---------------- | --------------------------------------------------------------------------------------------- |\n| **Claude Code**  | Place `skills/easy-binance/` under your project root — Claude Code discovers it automatically |\n| **Other agents** | Point the agent at `SKILL.md` as a system prompt or tool description                          |\n\n## Project Structure\n\n```\neasy-binance/\n├── skills/easy-binance/\n│   └── SKILL.md        # Agent skill manifest\n├── src/easy_binance/\n│   ├── cli.py          # Typer CLI entrypoint\n│   ├── core.py         # Unified facade logic\n│   ├── config.py       # Credential resolution & .env loading\n│   ├── products.py     # Product registry\n│   ├── formatting.py   # Rich output formatting\n│   ├── utils.py        # Shared helpers\n│   └── errors.py       # Custom exceptions\n├── tests/\n├── pyproject.toml\n└── README.md\n```\n\n## License\n\nThis project is licensed under the [Apache License 2.0](LICENCE).\n"}