Skip to main content

tradingplan-cli

Read-only trading journal CLI for agents. Cursor, Claude Code, and other tools with a shell can query your Trading Plan account: pre-market plans, node analysis, trade journals, daily reviews, fills, discipline records, and strategies.

Trading Plan separates execution from judgment. The daily loop is plan before the open, log what you did, then review after the close. This CLI reads that record. It does not create, edit, or delete anything.

Install

Python 3.10 or newer.

pipx install tradingplan-cli

Or, inside a virtualenv:

pip install tradingplan-cli

The console command is tradingplan.

Configure

Create an API key on the website under API Keys (membership), then:

tradingplan init

Or set the environment, which is the better fit for an agent:

export TRADINGPLAN_API_KEY=sk_...
export TRADINGPLAN_API_URL=https://longtou.online/api/v1    # china
# export TRADINGPLAN_API_URL=https://tradingplan.day/api/v1  # overseas

Flags --api-key, --api-url, and --site china|overseas override the environment. --site china uses https://longtou.online/api/v1. --site overseas uses https://tradingplan.day/api/v1.

Agent setup

tradingplan skill

Paste the printed instructions into the agent. The usual question — what did I plan, trade, and review on one day — is one command:

tradingplan day 2026-09-10

That returns the day's plans, node analysis, journal, daily review, transactions (with per-trade review notes), and discipline records as JSON.

Commands

Command What it reads
tradingplan whoami Confirm the API key and site
tradingplan day YYYY-MM-DD One-day snapshot
tradingplan plans list|get Pre-market and action plans
tradingplan node-analysis YYYY-MM-DD Node analysis for one day
tradingplan journals list|get Trade journal
tradingplan reviews daily list|get Daily review
tradingplan reviews notes list|get Per-trade review notes
tradingplan txs list|get Transactions (buy, sell, add, reduce)
tradingplan strategies list|get Strategies
tradingplan disciplines list|get Discipline rules
tradingplan disciplines records Followed or violated discipline records

--from and --to are YYYY-MM-DD. List commands accept --limit and --offset. Success is JSON on stdout. Errors are JSON on stderr with code: unauthorized, not_found, invalid_args, rate_limited, or network.

中文

给 Cursor、Claude Code 用的只读命令行,读取你在交易计划(原龙头在线)里的盘前计划、节点分析、交易日记、每日复盘、成交、纪律和策略。对应网站上的计划 → 执行 → 复盘闭环。只查询,不写入。

pipx install tradingplan-cli
export TRADINGPLAN_API_KEY=sk_...
export TRADINGPLAN_API_URL=https://longtou.online/api/v1
tradingplan day 2026-09-10

密钥在网站「API 密钥」页创建。tradingplan skill 会打印给 Agent 的使用说明。

手机端安装:

Develop from a checkout

pip install -e ./packages/tradingplan-cli

Metadata

Release files for tradingplan-cli 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tradingplan-cli 0.1.0
File Size Uploaded Provenance Actions
tradingplan_cli-0.1.0.tar.gz 11.3 kB Without provenance Details for tradingplan_cli-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tradingplan-cli 0.1.0
File Interpreter ABI Platform Actions
tradingplan_cli-0.1.0-py3-none-any.whl Python 3 none any Details for tradingplan_cli-0.1.0-py3-none-any.whl

Total release size: 21.1 kB

Release files / tradingplan_cli-0.1.0.tar.gz

Download URL tradingplan_cli-0.1.0.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
81879a510956adf5f277a78ec12b9e5352b424e8740dc26dd918687a7fc382df
BLAKE2b-256 checksum
How to use checksums
8cd749e1875ac404b6869c70c40b6710fc5971dade7a10c37b2cec3ea659991a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / tradingplan_cli-0.1.0-py3-none-any.whl

Download URL tradingplan_cli-0.1.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a3d4c107e581e6b271da3f82864b85cc98fea482bb888f6c6e24f1c815d03ec8
BLAKE2b-256 checksum
How to use checksums
aabde110e625f1282af0ac8b58f9407f9ed44ca9659f2e3c28384191a79184c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for tradingplan-cli 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page