bytx-trader 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. bytx_trader-0.1.0/.claude-plugin/marketplace.json +14 -0
  2. bytx_trader-0.1.0/.claude-plugin/plugin.json +21 -0
  3. bytx_trader-0.1.0/.gitignore +10 -0
  4. bytx_trader-0.1.0/LICENSE +33 -0
  5. bytx_trader-0.1.0/PKG-INFO +148 -0
  6. bytx_trader-0.1.0/README.md +130 -0
  7. bytx_trader-0.1.0/config.example.json +26 -0
  8. bytx_trader-0.1.0/crypto-broker/SKILL.md +43 -0
  9. bytx_trader-0.1.0/crypto-derivs/SKILL.md +30 -0
  10. bytx_trader-0.1.0/crypto-entry/SKILL.md +28 -0
  11. bytx_trader-0.1.0/crypto-exit/SKILL.md +28 -0
  12. bytx_trader-0.1.0/crypto-risk/SKILL.md +28 -0
  13. bytx_trader-0.1.0/crypto-scanner/SKILL.md +30 -0
  14. bytx_trader-0.1.0/crypto-size/SKILL.md +28 -0
  15. bytx_trader-0.1.0/crypto-timemachine/SKILL.md +29 -0
  16. bytx_trader-0.1.0/docs/README.ru.md +53 -0
  17. bytx_trader-0.1.0/mcp-configs/claude_code.md +15 -0
  18. bytx_trader-0.1.0/mcp-configs/claude_desktop.json +19 -0
  19. bytx_trader-0.1.0/mcp-configs/cursor.json +19 -0
  20. bytx_trader-0.1.0/mcp-configs/generic.json +19 -0
  21. bytx_trader-0.1.0/pyproject.toml +32 -0
  22. bytx_trader-0.1.0/src/bytx_trader/__init__.py +2 -0
  23. bytx_trader-0.1.0/src/bytx_trader/cli.py +75 -0
  24. bytx_trader-0.1.0/src/bytx_trader/core.py +138 -0
  25. bytx_trader-0.1.0/src/bytx_trader/market.py +350 -0
  26. bytx_trader-0.1.0/src/bytx_trader/mcp_server.py +130 -0
  27. bytx_trader-0.1.0/src/bytx_trader/trade.py +317 -0
  28. bytx_trader-0.1.0/src/bytx_trader/updates.py +66 -0
  29. bytx_trader-0.1.0/tests/conftest.py +89 -0
  30. bytx_trader-0.1.0/tests/fixtures/binance-BTCUSDT-5m-2026-10-19_2026-11-18.json.gz +0 -0
  31. bytx_trader-0.1.0/tests/test_steps.py +225 -0
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
3
+ "name": "bytx-skills",
4
+ "description": "Crypto trading skills for AI assistants on bytx",
5
+ "owner": {"name": "BYTtrade", "url": "https://byttrade.com"},
6
+ "plugins": [
7
+ {
8
+ "name": "bytx-trader",
9
+ "description": "Crypto trading skills on bytx: scan, funding and open interest, entry, exit, time machine, size, risk, broker (paper by default, never without your yes).",
10
+ "source": "./",
11
+ "category": "productivity"
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "bytx-trader",
3
+ "description": "Crypto trading skills on the bytx library: scanner, funding/open interest, entry timer, exit planner, a time machine that replays 10,000 sessions, risk-based sizing, a risk gate and an order executor (paper by default, never without your yes).",
4
+ "version": "0.1.0",
5
+ "author": {
6
+ "name": "BYTtrade",
7
+ "url": "https://byttrade.com"
8
+ },
9
+ "license": "MIT",
10
+ "keywords": [
11
+ "claude-skills",
12
+ "crypto",
13
+ "trading",
14
+ "paper-trading",
15
+ "mcp",
16
+ "bytx"
17
+ ],
18
+ "skills": "./",
19
+ "homepage": "https://github.com/byttrade/bytx-skills",
20
+ "repository": "https://github.com/byttrade/bytx-skills"
21
+ }
@@ -0,0 +1,10 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.egg-info/
4
+ build/
5
+ dist/
6
+ .idea/
7
+ uv.lock
8
+ .env*
9
+ /crypto/
10
+ .pytest_cache/
@@ -0,0 +1,33 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 BYTtrade
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ ---
24
+
25
+ RISK NOTICE. The Software is a tool for working with cryptocurrency exchanges.
26
+ It is not financial, investment or trading advice. Trading cryptocurrency,
27
+ especially with leverage, carries a high risk of loss. All risk of using the
28
+ Software is borne solely by the user, including losses caused by errors in the
29
+ Software, in market data, at an exchange or in an AI assistant. Each user must
30
+ test the Software on their own (paper trading, then an exchange demo account)
31
+ and use it with real funds only after satisfying themselves that it works as
32
+ they need, and only with amounts they can afford to lose. The authors and
33
+ BYTtrade accept no liability for any trading results.
@@ -0,0 +1,148 @@
1
+ Metadata-Version: 2.5
2
+ Name: bytx-trader
3
+ Version: 0.1.0
4
+ Summary: Crypto trading steps for AI assistants on bytx: scanner, funding/OI, entry, exit, time machine, risk-based size, risk gate, paper/demo broker. MCP server + CLI.
5
+ Project-URL: Homepage, https://github.com/byttrade/bytx-skills
6
+ Project-URL: Repository, https://github.com/byttrade/bytx-skills
7
+ Project-URL: Issues, https://github.com/byttrade/bytx-skills/issues
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Keywords: bytx,claude,crypto,mcp,paper-trading,trading
11
+ Requires-Python: >=3.10
12
+ Requires-Dist: bytx<0.3,>=0.2.1
13
+ Requires-Dist: mcp>=1.2
14
+ Provides-Extra: test
15
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'test'
16
+ Requires-Dist: pytest>=8; extra == 'test'
17
+ Description-Content-Type: text/markdown
18
+
19
+ # bytx-skills — crypto trading skills for AI assistants
20
+
21
+ **English** | [Русский](docs/README.ru.md)
22
+
23
+ Eight steps for one crypto trade, from "what's moving" to the order: scan the perps, read funding and open interest,
24
+ time the entry, plan the exit, replay the rest of the session 10,000 times, size the position from the money you
25
+ are ready to lose, check it against your limits, and send it — paper by default, never without your yes.
26
+
27
+ Works with **any AI assistant that supports MCP — for example, Claude**. The logic is a Python package with an MCP
28
+ server and a CLI on the [bytx](https://pypi.org/project/bytx/) exchange library; for Claude there are also skills
29
+ (`/crypto-scanner` …) on top.
30
+
31
+ Paper trading runs on the exchange's live order book with virtual money: no keys, no signup.
32
+
33
+ ## Install
34
+
35
+ You need [uv](https://docs.astral.sh/uv/) (`brew install uv` or `curl -LsSf https://astral.sh/uv/install.sh | sh`).
36
+
37
+ **Any MCP client** (Claude Desktop, Claude Code, Cursor, …): add the server to the client's MCP config —
38
+ templates in [`mcp-configs/`](mcp-configs/):
39
+
40
+ ```json
41
+ { "mcpServers": { "bytx-trader": {
42
+ "command": "uvx",
43
+ "args": ["--refresh-package", "bytx", "--refresh-package", "bytx-trader",
44
+ "--from", "bytx-trader@latest", "bytx-trader-mcp"],
45
+ "env": { "BYTX_TRADER_HOME": "/absolute/path/to/your/project/crypto" } } } }
46
+ ```
47
+
48
+ Then ask "scan the crypto market" or start from the server's `trade_pipeline` prompt. Set the `confirm` tool to ask
49
+ you every time. Without uv: `pip install bytx-trader` and `"command": "bytx-trader-mcp"`.
50
+
51
+ **Claude only, on top of that:**
52
+
53
+ ```
54
+ /plugin marketplace add byttrade/bytx-skills
55
+ /plugin install bytx-trader@bytx-skills
56
+ ```
57
+
58
+ or copy the folders: `cp -r bytx-skills/crypto-* ~/.claude/skills/` (or your project's `.claude/skills/`).
59
+
60
+ | | any MCP client | Claude only |
61
+ |---|---|---|
62
+ | all eight steps, paper and demo | MCP tools | |
63
+ | risk gate and one-time confirm token | in the server | |
64
+ | the trade as a script | `trade_pipeline` prompt | skills |
65
+ | `/crypto-*` commands, triggers by phrase, plugin install | | ✓ |
66
+
67
+ ## The steps
68
+
69
+ | step | MCP tool / CLI | what it does |
70
+ |---|---|---|
71
+ | `crypto-scanner` | `scan` | Top perps by 24h volume: breakout of the session's opening range, RSI extremes. |
72
+ | `crypto-derivs` | `derivs` | Funding now and 7-day average, open interest change, perp/spot basis, crowded-side flags. |
73
+ | `crypto-entry` | `entry_check` | Waiting / triggered / expired, on closed bars only. |
74
+ | `crypto-exit` | `exit_plan` | Stop (range-mid, range, ATR, price), target in R, flat-by time. |
75
+ | `crypto-timemachine` | `timemachine` | 10,000 replays of the rest of the session from the coin's own bars + the same rule on every past session. |
76
+ | `crypto-size` | `size` | Size from risk with fees, margin, liquidation estimate, funding cost. Places nothing. |
77
+ | `crypto-risk` | `risk_check` | PASS / BLOCK against your limits. |
78
+ | `crypto-broker` | `execute`, `confirm`, `flatten`, `positions`, `reconcile` | The only step that sends anything. |
79
+
80
+ Crypto trades 24/7, so the "session" is yours: `crypto/config.json` → `session.start` (00:00 UTC by default),
81
+ `range_minutes`, `entry_until`, `flat_by`. Everything lands in `crypto/` and each step reads what the last one wrote.
82
+
83
+ ## An example: BTC on Binance, November 18 2026, real candles
84
+
85
+ 1. **scan** at 01:05 UTC: BTC broke its first-hour range (64,673.5–64,976.3) to the downside; the 01:00 bar closed at
86
+ 64,588.5, 0.131 % below.
87
+ 2. **entry_check**: triggered, short.
88
+ 3. **exit_plan** `--stop range-mid --target-r 2`: stop 64,824.9 (0.366 % away), target 64,115.7, flat by 23:55 UTC.
89
+ 4. **timemachine**: 10,000 replays from the last 30 sessions (seed 19): target first 37.6 %, stop first 62.4 %. The same
90
+ rule on those 30 sessions: fired 30 times, 9 targets, 21 stops. Expectancy before fees +0.13R simulated, −0.10R
91
+ historical. Verdict: close to a coin flip — that is the point of looking before you risk a dollar.
92
+ 5. **size** with 10 USDT at risk, 5x: ≈0.033 BTC, ≈2,131 USDT notional, margin ≈426, loss at the stop ≈9.94 USDT with fees.
93
+ 6. **risk_check**: PASS.
94
+ 7. **execute** shows the ticket and returns a one-time token; you answer yes; **confirm** sends it to the paper account.
95
+
96
+ `tests/` reproduce these numbers offline from the candles in `tests/fixtures/`.
97
+
98
+ ## Modes and the gates
99
+
100
+ | mode | how | keys |
101
+ |---|---|---|
102
+ | **paper** (default) | live order book, virtual balance `account_usdt`, real taker fees | none |
103
+ | **demo** | `"mode": "demo"`: the exchange's demo/testnet | `BYTX_API_KEY`, `BYTX_SECRET` (`BYTX_PASSWORD` for OKX, KuCoin, Bitget) in the server's environment |
104
+ | **real** | not sent by this package: real orders go through the hosted [BYTtrade](https://byttrade.com) MCP | kept by BYTtrade |
105
+
106
+ Every order, in every mode, passes three gates, enforced in the code:
107
+
108
+ 1. the risk check passed **this exact ticket** today (fingerprint);
109
+ 2. `execute` sends nothing — it returns the ticket and a one-time token (5 min); `confirm` takes the token and **your
110
+ reply word for word**, and anything but a plain yes cancels; the risk check runs again;
111
+ 3. your client's own approval prompt for `confirm`.
112
+
113
+ The client order id comes from the ticket, so if the exchange times out the order is found by that id with
114
+ `reconcile` — it is never sent twice. Getting out (`flatten`) is never blocked by daily limits.
115
+
116
+ ## Updates
117
+
118
+ Started with `uvx` as above, the server picks up the newest `bytx-trader` and the newest compatible `bytx` every time
119
+ your assistant starts it: fixes and new exchange features arrive with no action on your side. `bytx-trader` accepts
120
+ `bytx` within one series (`>=0.2.1,<0.3`), so a breaking `bytx` release never arrives on its own: it comes with a
121
+ `bytx-trader` release that was tested against it. Installed with `pip`, the server checks PyPI once a day and tells you
122
+ in its first answer when an update is out (`BYTX_TRADER_NO_UPDATE_CHECK=1` turns that off). Claude skills installed as
123
+ a plugin update with the marketplace (`/plugin`).
124
+
125
+ ## Development
126
+
127
+ ```bash
128
+ pip install -e ".[test]" && pytest
129
+ ```
130
+
131
+ Tests are offline: real candles in `tests/fixtures/`, orders on `bytx.testing` paper accounts.
132
+
133
+ ## Fine print
134
+
135
+ **Not financial advice.** Most people who trade actively lose money; leverage makes it faster. A stop is a plan, not
136
+ a guarantee: gaps, slippage and auto-deleveraging can fill it far away, and liquidation can come first if leverage is
137
+ high. Funding is charged every period while a position is open. The time machine is a simulation from the last few
138
+ weeks, not a prediction. Paper trading simplifies margin and liquidation and does not watch your stop between runs.
139
+ Keys live in environment variables, never in the chat.
140
+
141
+ MIT. Built on [bytx](https://pypi.org/project/bytx/) (BYTtrade Source-Available License, installed from PyPI, not
142
+ copied here). No-code bots, backtests and trade confirmations in Telegram — at [byttrade.com](https://byttrade.com).
143
+
144
+ <sub>**All risk is yours.** bytx-skills is a tool, provided as is, without any warranty. You alone decide whether and
145
+ how to use it, and you alone bear every loss, missed profit or other consequence, including those caused by errors in
146
+ the software, the data, an exchange or an AI assistant. Test it yourself — on paper, then on an exchange demo account —
147
+ and only once you are satisfied that it works for you, use it with real money, in amounts you can afford to lose.
148
+ The authors and BYTtrade are not liable for any trading results.</sub>
@@ -0,0 +1,130 @@
1
+ # bytx-skills — crypto trading skills for AI assistants
2
+
3
+ **English** | [Русский](docs/README.ru.md)
4
+
5
+ Eight steps for one crypto trade, from "what's moving" to the order: scan the perps, read funding and open interest,
6
+ time the entry, plan the exit, replay the rest of the session 10,000 times, size the position from the money you
7
+ are ready to lose, check it against your limits, and send it — paper by default, never without your yes.
8
+
9
+ Works with **any AI assistant that supports MCP — for example, Claude**. The logic is a Python package with an MCP
10
+ server and a CLI on the [bytx](https://pypi.org/project/bytx/) exchange library; for Claude there are also skills
11
+ (`/crypto-scanner` …) on top.
12
+
13
+ Paper trading runs on the exchange's live order book with virtual money: no keys, no signup.
14
+
15
+ ## Install
16
+
17
+ You need [uv](https://docs.astral.sh/uv/) (`brew install uv` or `curl -LsSf https://astral.sh/uv/install.sh | sh`).
18
+
19
+ **Any MCP client** (Claude Desktop, Claude Code, Cursor, …): add the server to the client's MCP config —
20
+ templates in [`mcp-configs/`](mcp-configs/):
21
+
22
+ ```json
23
+ { "mcpServers": { "bytx-trader": {
24
+ "command": "uvx",
25
+ "args": ["--refresh-package", "bytx", "--refresh-package", "bytx-trader",
26
+ "--from", "bytx-trader@latest", "bytx-trader-mcp"],
27
+ "env": { "BYTX_TRADER_HOME": "/absolute/path/to/your/project/crypto" } } } }
28
+ ```
29
+
30
+ Then ask "scan the crypto market" or start from the server's `trade_pipeline` prompt. Set the `confirm` tool to ask
31
+ you every time. Without uv: `pip install bytx-trader` and `"command": "bytx-trader-mcp"`.
32
+
33
+ **Claude only, on top of that:**
34
+
35
+ ```
36
+ /plugin marketplace add byttrade/bytx-skills
37
+ /plugin install bytx-trader@bytx-skills
38
+ ```
39
+
40
+ or copy the folders: `cp -r bytx-skills/crypto-* ~/.claude/skills/` (or your project's `.claude/skills/`).
41
+
42
+ | | any MCP client | Claude only |
43
+ |---|---|---|
44
+ | all eight steps, paper and demo | MCP tools | |
45
+ | risk gate and one-time confirm token | in the server | |
46
+ | the trade as a script | `trade_pipeline` prompt | skills |
47
+ | `/crypto-*` commands, triggers by phrase, plugin install | | ✓ |
48
+
49
+ ## The steps
50
+
51
+ | step | MCP tool / CLI | what it does |
52
+ |---|---|---|
53
+ | `crypto-scanner` | `scan` | Top perps by 24h volume: breakout of the session's opening range, RSI extremes. |
54
+ | `crypto-derivs` | `derivs` | Funding now and 7-day average, open interest change, perp/spot basis, crowded-side flags. |
55
+ | `crypto-entry` | `entry_check` | Waiting / triggered / expired, on closed bars only. |
56
+ | `crypto-exit` | `exit_plan` | Stop (range-mid, range, ATR, price), target in R, flat-by time. |
57
+ | `crypto-timemachine` | `timemachine` | 10,000 replays of the rest of the session from the coin's own bars + the same rule on every past session. |
58
+ | `crypto-size` | `size` | Size from risk with fees, margin, liquidation estimate, funding cost. Places nothing. |
59
+ | `crypto-risk` | `risk_check` | PASS / BLOCK against your limits. |
60
+ | `crypto-broker` | `execute`, `confirm`, `flatten`, `positions`, `reconcile` | The only step that sends anything. |
61
+
62
+ Crypto trades 24/7, so the "session" is yours: `crypto/config.json` → `session.start` (00:00 UTC by default),
63
+ `range_minutes`, `entry_until`, `flat_by`. Everything lands in `crypto/` and each step reads what the last one wrote.
64
+
65
+ ## An example: BTC on Binance, November 18 2026, real candles
66
+
67
+ 1. **scan** at 01:05 UTC: BTC broke its first-hour range (64,673.5–64,976.3) to the downside; the 01:00 bar closed at
68
+ 64,588.5, 0.131 % below.
69
+ 2. **entry_check**: triggered, short.
70
+ 3. **exit_plan** `--stop range-mid --target-r 2`: stop 64,824.9 (0.366 % away), target 64,115.7, flat by 23:55 UTC.
71
+ 4. **timemachine**: 10,000 replays from the last 30 sessions (seed 19): target first 37.6 %, stop first 62.4 %. The same
72
+ rule on those 30 sessions: fired 30 times, 9 targets, 21 stops. Expectancy before fees +0.13R simulated, −0.10R
73
+ historical. Verdict: close to a coin flip — that is the point of looking before you risk a dollar.
74
+ 5. **size** with 10 USDT at risk, 5x: ≈0.033 BTC, ≈2,131 USDT notional, margin ≈426, loss at the stop ≈9.94 USDT with fees.
75
+ 6. **risk_check**: PASS.
76
+ 7. **execute** shows the ticket and returns a one-time token; you answer yes; **confirm** sends it to the paper account.
77
+
78
+ `tests/` reproduce these numbers offline from the candles in `tests/fixtures/`.
79
+
80
+ ## Modes and the gates
81
+
82
+ | mode | how | keys |
83
+ |---|---|---|
84
+ | **paper** (default) | live order book, virtual balance `account_usdt`, real taker fees | none |
85
+ | **demo** | `"mode": "demo"`: the exchange's demo/testnet | `BYTX_API_KEY`, `BYTX_SECRET` (`BYTX_PASSWORD` for OKX, KuCoin, Bitget) in the server's environment |
86
+ | **real** | not sent by this package: real orders go through the hosted [BYTtrade](https://byttrade.com) MCP | kept by BYTtrade |
87
+
88
+ Every order, in every mode, passes three gates, enforced in the code:
89
+
90
+ 1. the risk check passed **this exact ticket** today (fingerprint);
91
+ 2. `execute` sends nothing — it returns the ticket and a one-time token (5 min); `confirm` takes the token and **your
92
+ reply word for word**, and anything but a plain yes cancels; the risk check runs again;
93
+ 3. your client's own approval prompt for `confirm`.
94
+
95
+ The client order id comes from the ticket, so if the exchange times out the order is found by that id with
96
+ `reconcile` — it is never sent twice. Getting out (`flatten`) is never blocked by daily limits.
97
+
98
+ ## Updates
99
+
100
+ Started with `uvx` as above, the server picks up the newest `bytx-trader` and the newest compatible `bytx` every time
101
+ your assistant starts it: fixes and new exchange features arrive with no action on your side. `bytx-trader` accepts
102
+ `bytx` within one series (`>=0.2.1,<0.3`), so a breaking `bytx` release never arrives on its own: it comes with a
103
+ `bytx-trader` release that was tested against it. Installed with `pip`, the server checks PyPI once a day and tells you
104
+ in its first answer when an update is out (`BYTX_TRADER_NO_UPDATE_CHECK=1` turns that off). Claude skills installed as
105
+ a plugin update with the marketplace (`/plugin`).
106
+
107
+ ## Development
108
+
109
+ ```bash
110
+ pip install -e ".[test]" && pytest
111
+ ```
112
+
113
+ Tests are offline: real candles in `tests/fixtures/`, orders on `bytx.testing` paper accounts.
114
+
115
+ ## Fine print
116
+
117
+ **Not financial advice.** Most people who trade actively lose money; leverage makes it faster. A stop is a plan, not
118
+ a guarantee: gaps, slippage and auto-deleveraging can fill it far away, and liquidation can come first if leverage is
119
+ high. Funding is charged every period while a position is open. The time machine is a simulation from the last few
120
+ weeks, not a prediction. Paper trading simplifies margin and liquidation and does not watch your stop between runs.
121
+ Keys live in environment variables, never in the chat.
122
+
123
+ MIT. Built on [bytx](https://pypi.org/project/bytx/) (BYTtrade Source-Available License, installed from PyPI, not
124
+ copied here). No-code bots, backtests and trade confirmations in Telegram — at [byttrade.com](https://byttrade.com).
125
+
126
+ <sub>**All risk is yours.** bytx-skills is a tool, provided as is, without any warranty. You alone decide whether and
127
+ how to use it, and you alone bear every loss, missed profit or other consequence, including those caused by errors in
128
+ the software, the data, an exchange or an AI assistant. Test it yourself — on paper, then on an exchange demo account —
129
+ and only once you are satisfied that it works for you, use it with real money, in amounts you can afford to lose.
130
+ The authors and BYTtrade are not liable for any trading results.</sub>
@@ -0,0 +1,26 @@
1
+ {
2
+ "mode": "paper",
3
+ "allow_real": false,
4
+ "exchange": "binance",
5
+ "account_usdt": 1000,
6
+ "default_leverage": 5,
7
+ "session": {
8
+ "start": "00:00",
9
+ "range_minutes": 60,
10
+ "timeframe": "5m",
11
+ "entry_until": null,
12
+ "flat_by": "23:55"
13
+ },
14
+ "risk": {
15
+ "max_loss_per_trade": 10,
16
+ "daily_loss_limit": 30,
17
+ "max_trades_per_day": 3,
18
+ "min_rr": 1.5,
19
+ "max_leverage": 5,
20
+ "max_notional": 5000,
21
+ "blocked_symbols": []
22
+ },
23
+ "scanner": {
24
+ "top": 30
25
+ }
26
+ }
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: crypto-broker
3
+ description: >-
4
+ Order Executor: the only step that can lead to an order, paper by default, demo with exchange keys from the
5
+ environment, never without the user's yes. Shows the ticket in plain words, gets a one-time token, sends only
6
+ after the user's own yes, records fills, closes positions (flatten), reconciles an order of unknown outcome by
7
+ client_id without resending. Use when the user says "place it", "buy", "execute", "close my position",
8
+ "flatten", "get me out", "what's open", or after a PASS.
9
+ argument-hint: "[ticket number]"
10
+ ---
11
+
12
+ # crypto-broker
13
+
14
+ Three gates, every order, enforced by the code, not by this text:
15
+
16
+ 1. the ticket passed `crypto-risk` today (matched by fingerprint);
17
+ 2. `execute` returns the ticket and a token; show the ticket and ask the user yes or no for exactly this order;
18
+ pass their reply **word for word** to `confirm`. Never write a yes for them, never reuse a yes from an earlier order;
19
+ 3. the client's own approval card: tell the user to keep the `confirm` tool on "Needs approval", never "Always allow".
20
+
21
+ Demo needs `BYTX_API_KEY`, `BYTX_SECRET` (and `BYTX_PASSWORD` for OKX/KuCoin/Bitget) in the environment: never ask for
22
+ keys in the chat. Real orders are not sent by this pack: they go through the hosted BYTtrade MCP. If an outcome is
23
+ `unknown`, it is not resent: run `reconcile` with the client_id first. Paper positions are tracked in
24
+ `crypto/state/broker.json`; stop and target are not watched between runs, so check `positions` and flatten.
25
+
26
+ ## How to run it
27
+
28
+ If the `bytx-trader` MCP server is connected, call its tools `tickets_show`, `execute`, `confirm`, `positions`, `flatten`, `reconcile`. Otherwise run the CLI
29
+ (`pip install -U bytx-trader`, or prefix each command with `uvx --from bytx-trader@latest` to always run the newest):
30
+
31
+ ```bash
32
+ bytx-trader show # tickets, READY or not
33
+ bytx-trader execute 1 # ticket + one-time token, sends nothing
34
+ bytx-trader confirm <token> "<the user's reply, word for word>"
35
+ bytx-trader positions
36
+ bytx-trader flatten [symbol] # close tickets, then execute + confirm again
37
+ bytx-trader reconcile <client_id>
38
+ ```
39
+
40
+ State lives in `crypto/` in the project (override with `BYTX_TRADER_HOME`); settings in `crypto/config.json`
41
+ (see `config.example.json` in the pack). The mode is `paper` unless the user changed it: say so.
42
+
43
+ Not financial advice. Most people who trade actively lose money.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: crypto-derivs
3
+ description: >-
4
+ Derivatives Monitor: funding rate (now and 7-day average), open interest and its change since the last run,
5
+ perp/spot basis, with flags crowded_long, crowded_short, oi_up_price_down, oi_up_price_up. The crypto stand-in
6
+ for a news monitor: positioning is what moves perps. Use when the user says "check funding", "is it crowded",
7
+ "open interest", "basis", "who is paying", or before taking a trade.
8
+ argument-hint: "[symbols...]"
9
+ ---
10
+
11
+ # crypto-derivs
12
+
13
+ Explain in plain words: positive funding means longs pay shorts every funding period; 0.05 % or more per period
14
+ is hot (flag crowded_long), and holding a long through it costs money. Open interest change needs a previous run to
15
+ compare with (first run says so). Basis is perp vs spot price. Symbols default to `crypto/watchlist.json`
16
+ (a JSON list), then to the scanner's hits.
17
+
18
+ ## How to run it
19
+
20
+ If the `bytx-trader` MCP server is connected, call its tool `derivs`. Otherwise run the CLI
21
+ (`pip install -U bytx-trader`, or prefix each command with `uvx --from bytx-trader@latest` to always run the newest):
22
+
23
+ ```bash
24
+ bytx-trader derivs BTC/USDT ETH/USDT
25
+ ```
26
+
27
+ State lives in `crypto/` in the project (override with `BYTX_TRADER_HOME`); settings in `crypto/config.json`
28
+ (see `config.example.json` in the pack). The mode is `paper` unless the user changed it: say so.
29
+
30
+ Not financial advice. Most people who trade actively lose money.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: crypto-entry
3
+ description: >-
4
+ Entry Timer: checks one symbol's opening-range breakout bar by bar and says waiting, triggered (the first
5
+ closed bar beyond the range, with side and close), expired (past the entry deadline) or forming (range not
6
+ done). Use when the user says "is it time", "did it break out", "should I enter now", "watch BTC for an
7
+ entry".
8
+ argument-hint: "<symbol>"
9
+ ---
10
+
11
+ # crypto-entry
12
+
13
+ Only closed bars count: a bar still forming never triggers. To watch, call it again after the next bar closes
14
+ (every 5 minutes on the default timeframe) rather than looping. Writes `crypto/entry.json`, used by `crypto-exit`.
15
+
16
+ ## How to run it
17
+
18
+ If the `bytx-trader` MCP server is connected, call its tool `entry_check`. Otherwise run the CLI
19
+ (`pip install -U bytx-trader`, or prefix each command with `uvx --from bytx-trader@latest` to always run the newest):
20
+
21
+ ```bash
22
+ bytx-trader entry BTC/USDT
23
+ ```
24
+
25
+ State lives in `crypto/` in the project (override with `BYTX_TRADER_HOME`); settings in `crypto/config.json`
26
+ (see `config.example.json` in the pack). The mode is `paper` unless the user changed it: say so.
27
+
28
+ Not financial advice. Most people who trade actively lose money.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: crypto-exit
3
+ description: >-
4
+ Exit Planner: sets the stop, the target (in R multiples of the risk) and the flat-by time before the entry, so
5
+ the user knows when to get out. Stops: range-mid, range (far edge), atr:K, or a price. Use when the user says
6
+ "where's my stop", "set a target", "plan the exit", "how much am I risking", or right after an entry triggers.
7
+ argument-hint: "<symbol> [--stop range-mid|range|atr:K|price] [--target-r 2] [--side long|short]"
8
+ ---
9
+
10
+ # crypto-exit
11
+
12
+ Side and entry come from the triggered entry; pass them to plan anything else. Writes `crypto/plan.json`, which the
13
+ time machine and the sizer read. A stop is a plan, not a guarantee: in a fast market it can fill past its price.
14
+
15
+ ## How to run it
16
+
17
+ If the `bytx-trader` MCP server is connected, call its tool `exit_plan`. Otherwise run the CLI
18
+ (`pip install -U bytx-trader`, or prefix each command with `uvx --from bytx-trader@latest` to always run the newest):
19
+
20
+ ```bash
21
+ bytx-trader exit BTC/USDT --stop range-mid --target-r 2
22
+ bytx-trader exit ETH/USDT --side short --stop atr:2
23
+ ```
24
+
25
+ State lives in `crypto/` in the project (override with `BYTX_TRADER_HOME`); settings in `crypto/config.json`
26
+ (see `config.example.json` in the pack). The mode is `paper` unless the user changed it: say so.
27
+
28
+ Not financial advice. Most people who trade actively lose money.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: crypto-risk
3
+ description: >-
4
+ Risk Manager: PASS or BLOCK for every ticket against the user's limits, before anything can be sent: stop
5
+ required, loss per trade, daily loss limit, trades per day, reward:risk, max leverage, max notional, stop
6
+ beyond the liquidation estimate, margin vs account, entry window, blocked symbols, duplicates, real mode off.
7
+ Getting out is never blocked by a day limit. Use when the user says "check my order", "is this safe", "risk
8
+ check", "can I take this trade", and always before the broker.
9
+ ---
10
+
11
+ # crypto-risk
12
+
13
+ A BLOCK is final for that ticket: do not argue it away or offer to send it anyway; change the plan or the size
14
+ and check again. Limits live in `crypto/config.json` under `risk`; only the user changes them.
15
+
16
+ ## How to run it
17
+
18
+ If the `bytx-trader` MCP server is connected, call its tool `risk_check`. Otherwise run the CLI
19
+ (`pip install -U bytx-trader`, or prefix each command with `uvx --from bytx-trader@latest` to always run the newest):
20
+
21
+ ```bash
22
+ bytx-trader risk
23
+ ```
24
+
25
+ State lives in `crypto/` in the project (override with `BYTX_TRADER_HOME`); settings in `crypto/config.json`
26
+ (see `config.example.json` in the pack). The mode is `paper` unless the user changed it: say so.
27
+
28
+ Not financial advice. Most people who trade actively lose money.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: crypto-scanner
3
+ description: >-
4
+ Chart Scanner for crypto perpetuals. Scans the top perps of an exchange by 24h volume (or given symbols) for
5
+ setups: a breakout of the session's opening range (crypto trades 24/7, so the session start is the user's,
6
+ 00:00 UTC by default), RSI oversold/overbought. Use when the user says "scan the market", "what's moving",
7
+ "find setups", "any breakouts", "what should I look at today".
8
+ argument-hint: "[--top N] [symbols...]"
9
+ ---
10
+
11
+ # crypto-scanner
12
+
13
+ Finds candidates, nothing more. A hit means a pattern fired, not that the trade is good: the next steps
14
+ (derivs, entry, exit, timemachine) decide. Freshest triggers are listed first; mention the trigger time, a breakout from
15
+ hours ago is stale. Writes `crypto/scan.json`, which `crypto-derivs` uses when no symbols are given.
16
+
17
+ ## How to run it
18
+
19
+ If the `bytx-trader` MCP server is connected, call its tool `scan`. Otherwise run the CLI
20
+ (`pip install -U bytx-trader`, or prefix each command with `uvx --from bytx-trader@latest` to always run the newest):
21
+
22
+ ```bash
23
+ bytx-trader scan --top 30
24
+ bytx-trader scan BTC/USDT ETH/USDT
25
+ ```
26
+
27
+ State lives in `crypto/` in the project (override with `BYTX_TRADER_HOME`); settings in `crypto/config.json`
28
+ (see `config.example.json` in the pack). The mode is `paper` unless the user changed it: say so.
29
+
30
+ Not financial advice. Most people who trade actively lose money.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: crypto-size
3
+ description: >-
4
+ Position Sizer: sizes the position from the money the user is ready to lose at the stop (fees included), with
5
+ leverage, margin, a liquidation estimate and the funding cost per period. Places nothing; writes one ticket to
6
+ crypto/orders.json. Use when the user says "how big", "size it", "I want to risk 20 USDT", "what leverage", or
7
+ after the exit plan.
8
+ argument-hint: "[--risk-usdt N] [--leverage N]"
9
+ ---
10
+
11
+ # crypto-size
12
+
13
+ Defaults: risk = `risk.max_loss_per_trade`, leverage = `default_leverage` from the config. Leverage does not change the
14
+ loss at the stop, only the margin and how close liquidation is: say that. Perpetuals only in v0.1.
15
+
16
+ ## How to run it
17
+
18
+ If the `bytx-trader` MCP server is connected, call its tool `size`. Otherwise run the CLI
19
+ (`pip install -U bytx-trader`, or prefix each command with `uvx --from bytx-trader@latest` to always run the newest):
20
+
21
+ ```bash
22
+ bytx-trader size --risk-usdt 10 --leverage 5
23
+ ```
24
+
25
+ State lives in `crypto/` in the project (override with `BYTX_TRADER_HOME`); settings in `crypto/config.json`
26
+ (see `config.example.json` in the pack). The mode is `paper` unless the user changed it: say so.
27
+
28
+ Not financial advice. Most people who trade actively lose money.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: crypto-timemachine
3
+ description: >-
4
+ Time Machine: before risking a dollar, replays the rest of the session 10,000 times from the symbol's own past
5
+ bars at the same time of day (seeded, repeatable) and re-runs the same rule on every past session. Gives the
6
+ odds of target first, stop first, or neither. Use when the user says "what are the odds", "is this worth it",
7
+ "backtest this", "simulate", or after an exit plan.
8
+ argument-hint: "[--days 30] [--runs 10000] [--seed 19]"
9
+ ---
10
+
11
+ # crypto-timemachine
12
+
13
+ Report the three percentages and the history count plainly, then the verdict. Close to a coin flip is a normal and
14
+ useful answer. It is a simulation, not a prediction: the past 30 days never contained tomorrow's headline, liquidation
15
+ cascade or exchange outage. Candles are cached on disk by bytx, so re-runs are fast.
16
+
17
+ ## How to run it
18
+
19
+ If the `bytx-trader` MCP server is connected, call its tool `timemachine`. Otherwise run the CLI
20
+ (`pip install -U bytx-trader`, or prefix each command with `uvx --from bytx-trader@latest` to always run the newest):
21
+
22
+ ```bash
23
+ bytx-trader timemachine --days 30
24
+ ```
25
+
26
+ State lives in `crypto/` in the project (override with `BYTX_TRADER_HOME`); settings in `crypto/config.json`
27
+ (see `config.example.json` in the pack). The mode is `paper` unless the user changed it: say so.
28
+
29
+ Not financial advice. Most people who trade actively lose money.