filtrix-cli 0.3.0__tar.gz → 0.5.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.
- filtrix_cli-0.5.0/CHANGELOG.md +16 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/PKG-INFO +5 -3
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/README.md +4 -2
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/pyproject.toml +1 -1
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/AGENTS.md +27 -1
- filtrix_cli-0.5.0/src/filtrix_cli/__init__.py +1 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/__main__.py +3 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/client.py +276 -199
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/commands/_helpers.py +55 -44
- filtrix_cli-0.5.0/src/filtrix_cli/commands/live.py +388 -0
- filtrix_cli-0.5.0/tests/test_cmd_live.py +314 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/tests/test_smoke.py +9 -1
- filtrix_cli-0.3.0/src/filtrix_cli/__init__.py +0 -1
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/.gitignore +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/LICENSE +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/auth.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/commands/__init__.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/commands/account.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/commands/authcmd.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/commands/backtest.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/commands/configcmd.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/commands/filters.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/commands/keys.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/commands/llms.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/commands/market.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/commands/research.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/commands/screen.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/commands/ticker.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/config.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/filters.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/output.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/render.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/src/filtrix_cli/state.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/tests/__init__.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/tests/test_auth.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/tests/test_client.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/tests/test_client_register.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/tests/test_cmd_auth.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/tests/test_cmd_backtest_screen.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/tests/test_cmd_config.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/tests/test_cmd_keys.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/tests/test_cmd_llms.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/tests/test_cmd_market.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/tests/test_cmd_profile.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/tests/test_cmd_read.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/tests/test_cmd_register.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/tests/test_cmd_research.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/tests/test_config.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/tests/test_filters.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/tests/test_helpers.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/tests/test_output.py +0 -0
- {filtrix_cli-0.3.0 → filtrix_cli-0.5.0}/tests/test_render.py +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.5.0 (2026-11-11)
|
|
4
|
+
|
|
5
|
+
- A paper write the account worker has not answered within the server's 10 s wait comes back
|
|
6
|
+
`{"status": "pending", "event_id"}`. The CLI now reads its outcome for about 12 s more, with the same
|
|
7
|
+
Idempotency-Key, and prints the result.
|
|
8
|
+
- Still no answer: it prints `{"status": "pending", "event_id", "idempotency_key"}` and exits 6. The command
|
|
9
|
+
may still apply. Read it later with the new `filtrix paper command EVENT_ID`, and resend only with the same
|
|
10
|
+
`--idempotency-key`.
|
|
11
|
+
- A command refused while pending (for example 409 `version_conflict`) exits as a direct refusal would.
|
|
12
|
+
- A 500 `internal_error` on a paper write is retried once with the same key and body.
|
|
13
|
+
|
|
14
|
+
## 0.4.0 (2026-11-08)
|
|
15
|
+
|
|
16
|
+
- `filtrix scanner` and `filtrix paper` commands (Pro), available once FILTRIX enables the live API.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: filtrix-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Agent-first command-line interface for the FILTRIX backtest engine.
|
|
5
5
|
Project-URL: Homepage, https://filtrix.net
|
|
6
6
|
Project-URL: Documentation, https://pypi.org/project/filtrix-cli/
|
|
@@ -75,6 +75,8 @@ filtrix runs list
|
|
|
75
75
|
filtrix simulate --run-id 42 --entry open_at_0930 --exit stop_loss_take_profit --sl 0.03 --tp 0.06 --wait
|
|
76
76
|
filtrix runs context 42 ABCD 2025-03-14 # daily + minute bars of one event
|
|
77
77
|
filtrix jobs get JOB_ID
|
|
78
|
+
filtrix scanner query -f "gap_gup>=10" --order-by gap_gup --desc # live market now (Pro, once enabled)
|
|
79
|
+
filtrix paper account # paper trading account (Pro, once enabled)
|
|
78
80
|
filtrix keys create --name laptop
|
|
79
81
|
filtrix llms # machine-readable usage guide for AI agents
|
|
80
82
|
```
|
|
@@ -83,8 +85,8 @@ filtrix llms # machine-readable usage guide for AI agents
|
|
|
83
85
|
|
|
84
86
|
Output is human-readable in a terminal and JSON when piped or with the global `--json` flag.
|
|
85
87
|
Global flags (`--json`, `--quiet`, `--profile`, `--api-key`, `--base-url`) go BEFORE the subcommand.
|
|
86
|
-
Exit codes: 0 ok, 2 usage, 3 not-found, 4 auth, 5 rate-limited, 6 network
|
|
87
|
-
or failed job.
|
|
88
|
+
Exit codes: 0 ok, 2 usage, 3 not-found, 4 auth, 5 rate-limited, 6 network, `--wait` timeout or a paper
|
|
89
|
+
command still pending (`filtrix paper command EVENT_ID` reads it later), 1 server or failed job.
|
|
88
90
|
|
|
89
91
|
`runs save` and `simulate` start background jobs; `--wait` polls until they finish. `runs delete` needs
|
|
90
92
|
`--yes` when not interactive.
|
|
@@ -43,6 +43,8 @@ filtrix runs list
|
|
|
43
43
|
filtrix simulate --run-id 42 --entry open_at_0930 --exit stop_loss_take_profit --sl 0.03 --tp 0.06 --wait
|
|
44
44
|
filtrix runs context 42 ABCD 2025-03-14 # daily + minute bars of one event
|
|
45
45
|
filtrix jobs get JOB_ID
|
|
46
|
+
filtrix scanner query -f "gap_gup>=10" --order-by gap_gup --desc # live market now (Pro, once enabled)
|
|
47
|
+
filtrix paper account # paper trading account (Pro, once enabled)
|
|
46
48
|
filtrix keys create --name laptop
|
|
47
49
|
filtrix llms # machine-readable usage guide for AI agents
|
|
48
50
|
```
|
|
@@ -51,8 +53,8 @@ filtrix llms # machine-readable usage guide for AI agents
|
|
|
51
53
|
|
|
52
54
|
Output is human-readable in a terminal and JSON when piped or with the global `--json` flag.
|
|
53
55
|
Global flags (`--json`, `--quiet`, `--profile`, `--api-key`, `--base-url`) go BEFORE the subcommand.
|
|
54
|
-
Exit codes: 0 ok, 2 usage, 3 not-found, 4 auth, 5 rate-limited, 6 network
|
|
55
|
-
or failed job.
|
|
56
|
+
Exit codes: 0 ok, 2 usage, 3 not-found, 4 auth, 5 rate-limited, 6 network, `--wait` timeout or a paper
|
|
57
|
+
command still pending (`filtrix paper command EVENT_ID` reads it later), 1 server or failed job.
|
|
56
58
|
|
|
57
59
|
`runs save` and `simulate` start background jobs; `--wait` polls until they finish. `runs delete` needs
|
|
58
60
|
`--yes` when not interactive.
|
|
@@ -14,7 +14,8 @@ Structured command-line access to the FILTRIX historical backtest engine.
|
|
|
14
14
|
- 3 not found
|
|
15
15
|
- 4 authentication required/failed
|
|
16
16
|
- 5 rate limited (retryable)
|
|
17
|
-
- 6 network/timeout, incl. `--wait` giving up on a job that is still running (retryable)
|
|
17
|
+
- 6 network/timeout, incl. `--wait` giving up on a job that is still running (retryable), or a paper command
|
|
18
|
+
still pending (see Live Scanner and Paper Trading)
|
|
18
19
|
|
|
19
20
|
## Auth
|
|
20
21
|
- Reads/backtests: set env FILTRIX_API_KEY=flt_... (or `filtrix config set api_key ...`).
|
|
@@ -59,6 +60,31 @@ Structured command-line access to the FILTRIX historical backtest engine.
|
|
|
59
60
|
|
|
60
61
|
Note: global flags like `--json` go BEFORE the subcommand (e.g. `filtrix --json backtest ...`).
|
|
61
62
|
|
|
63
|
+
## Live Scanner and Paper Trading (Pro)
|
|
64
|
+
Available once FILTRIX enables the live API (until then: exit 3, "not available through the API yet").
|
|
65
|
+
- filtrix scanner status (free) session, freshness, allowed + reason
|
|
66
|
+
- filtrix scanner columns [--search Q] live columns (not the historical `filtrix filters`)
|
|
67
|
+
- filtrix scanner query --filter ... [--field COL ...] [--order-by COL --desc] [--limit 25 (max 100)] [--monitor-id N]
|
|
68
|
+
- filtrix scanner matches [--field COL ...] [--rows 25] what your running windows match now
|
|
69
|
+
- filtrix scanner chart SYMBOL
|
|
70
|
+
- filtrix scanner monitors list | save [--id N] [--name X] [--filter ...] [--telegram/--no-telegram] [--run/--stop]
|
|
71
|
+
| delete ID --yes
|
|
72
|
+
- filtrix paper status (free) | catalog | validate --spec-json JSON|- | account | list KIND [--after C] [--limit N]
|
|
73
|
+
(KIND: strategies, orders, positions, trades, events, epochs)
|
|
74
|
+
- filtrix paper create-account --limits-json JSON [--capital 100000] | limits --limits-json JSON
|
|
75
|
+
| reset --capital X --limits-json JSON --yes | close-all --yes
|
|
76
|
+
- filtrix paper strategy save --spec-json JSON [--id N] [--monitor-id N] | strategy archive ID --yes
|
|
77
|
+
- filtrix paper start STRATEGY_ID | pause RUN_ID | resume RUN_ID | close RUN_ID --yes
|
|
78
|
+
- filtrix paper command EVENT_ID outcome of a write that exited 6 "pending": its result, or still pending
|
|
79
|
+
Paper money is simulated. Every paper write sends an Idempotency-Key (--idempotency-key, else a new one);
|
|
80
|
+
versions (--version, --account-version, --draft-version) are fetched from `filtrix paper account` when omitted.
|
|
81
|
+
A 409 version_conflict carries current_version. Run ids are UUIDs.
|
|
82
|
+
A write waits for the account worker (up to ~10 s on the server, then ~12 s of status reads). Still no
|
|
83
|
+
answer: stdout {"status":"pending","event_id","idempotency_key"}, exit 6; it may still apply, so read it with
|
|
84
|
+
`filtrix paper command EVENT_ID` and resend only with the same --idempotency-key. A refusal read there exits as
|
|
85
|
+
a direct one would (e.g. 409 version_conflict, exit 2). A 500 internal_error is
|
|
86
|
+
retried once with the same key and body.
|
|
87
|
+
|
|
62
88
|
## Background jobs
|
|
63
89
|
`runs save` and `simulate` print {"job_id","status":"queued","poll"}. Add `--wait` to poll until the job ends
|
|
64
90
|
(prints the finished job; a failed job exits 1, `--timeout` seconds without an end exits 6), or poll with
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.5.0"
|
|
@@ -13,6 +13,7 @@ from filtrix_cli.commands import configcmd
|
|
|
13
13
|
from filtrix_cli.commands import llms as llms_cmd
|
|
14
14
|
from filtrix_cli.commands import market as market_cmd
|
|
15
15
|
from filtrix_cli.commands import research as research_cmd
|
|
16
|
+
from filtrix_cli.commands import live as live_cmd
|
|
16
17
|
|
|
17
18
|
app = typer.Typer(
|
|
18
19
|
add_completion=False,
|
|
@@ -61,6 +62,8 @@ app.command("premarket")(market_cmd.premarket)
|
|
|
61
62
|
app.add_typer(research_cmd.runs_app, name="runs")
|
|
62
63
|
app.command("simulate")(research_cmd.simulate)
|
|
63
64
|
app.add_typer(research_cmd.jobs_app, name="jobs")
|
|
65
|
+
app.add_typer(live_cmd.scanner_app, name="scanner")
|
|
66
|
+
app.add_typer(live_cmd.paper_app, name="paper")
|
|
64
67
|
|
|
65
68
|
|
|
66
69
|
def main() -> None:
|