---
title: "Community AI Notes | 11 CLI commands, and a fully autonomous trading Agent was built"
type: "Topics"
locale: "en"
url: "https://longbridge.com/en/topics/43345063.md"
description: "Fellow investor @qwq built a fully autonomous AI trading Agent called &#34;Flint&#34; in his spare time: Claude decides whether to act, code handles risk control and order placement, and the whole thing runs unattended on a single Mac mini. In July it completed 69 trades; of 124 intents, 31 were blocked by its own risk gate. Paper-trading return: about 3%."
datetime: "2026-08-12T07:40:57.000Z"
locales:
  - [en](https://longbridge.com/en/topics/43345063.md)
  - [zh-CN](https://longbridge.com/zh-CN/topics/43345063.md)
  - [zh-HK](https://longbridge.com/zh-HK/topics/43345063.md)
author: "[LongbridgeAI](https://longbridge.com/en/profiles/10010333.md)"
---

# Community AI Notes | 11 CLI commands, and a fully autonomous trading Agent was built

What happens over a month if you let an AI watch the market and place its own orders?

Fellow investor @qwq actually did it. In his spare time he built an autonomous trading Agent called **"Flint"** and let it run unattended on **Longbridge paper trading** — by the end of July it had been running for **101 days**. Claude reads the tape and the news and decides whether to act; the code handles risk control, order placement and reconciliation. All of it on one Mac mini. Across July, it completed **69 trades** on its own.

## How it "reads the market"

Flint runs two signal sources at once:

-   **The technical loop**: sweeps the watchlist every 30 minutes, scoring each name **0–8** on VWAP, EMA20, MACD, RSI and volume ratio, then hands the score and the market data to Claude to judge whether it's worth acting on.
-   **The event loop**: digests the news feed every 60 seconds, catching earnings, macro and geopolitical catalysts.

The watchlist holds **12 names**: the US Magnificent Seven (NVDA, GOOGL, AAPL, MSFT, AMZN, META, TSLA) plus three commodity ETFs — gold, silver and oil.

One boundary matters a great deal:

> **Claude only judges "whether to act, and long or short". It cannot set position size, and it never touches the order button.**

Position size is computed by hard rules; **the model cannot size a trade by how confident it feels.**

**Risk parameters** are all hard-coded in a config file the model cannot edit. For example:

-   a single trade may lose at most **2%** of total equity;
-   at most **3 positions** open at once, to avoid concentrating exposure;
-   a **5%** intraday drawdown trips the circuit breaker — no new positions that day;
-   after closing a losing trade in a name, that name is on a **60-minute cooldown**, to prevent back-to-back revenge trades…

Everyone knows reviewing your trades matters, yet almost nobody manages it every single day — **Flint reviews itself after every close.**

A reflection thread walks back through the day's closed trades, grading both "was the thesis right" and "was the entry/exit timing right", then distils the scattered notes into lessons carrying a confidence level, which get injected into the next day's decision context: where yesterday's judgement went wrong becomes tomorrow's precedent.

The author calls this page the **Dream Journal**.

Risk parameters hard-coded in the config file, the 12 watchlist names, and each thread's cadence

## How it gets Longbridge data and places orders automatically: 11 CLI commands

Flint doesn't contain a single HTTP request, and doesn't use any language SDK

Every interaction with the broker is a subprocess running **Longbridge CLI**, always with `--format json` for structured output.

From quotes, candlesticks and news through to orders, cancellations and reconciliation — **every broker-side action a fully automated trading Agent needs is carried by these 11 CLI commands:**

**Stage**

**CLI command**

Live quotes

longbridge quote

Candlesticks

longbridge kline --period 1h --count 50

News

(input for the event loop)

longbridge news <SYMBOL\> --count 20

Telling pre-market

/ regular hours

/ after-hours apart

longbridge trading session

Account equity

longbridge assets

Actual broker positions

(reconciliation)

longbridge positions

Placing orders

longbridge order buy / order sell

Cancelling orders

longbridge order cancel

Same-day execution reports

longbridge order executions

Whether a single order is

in flight

/ filled

/ cancelled

longbridge order detail <order\_id\>

## A full month of autonomous AI trading: 69 trades, 124 intents, 31 self-rejections

Across July, Flint traded on 17 sessions and produced **124 trading intents, of which 31 were rejected by its own risk control (25%)**, ending with 69 fills and 35 closed round trips. Realised P&L was **+US$292.51 (about +3.0%)**, with month-end equity of US$10,063.87 (starting from US$10,000).

> 15 wins, 20 losses — a **win rate of 42.9%**.

More losses than wins, by the look of it. But the wins averaged **+US$78.17** while the losses averaged only **−US$44.00**, for a **profit factor of 1.78** — thanks to code-enforced stops that keep every loss small.

That said, @qwq gets ahead of the obvious objection himself: "**+3% has no statistical significance on its own (one month, 35 samples).**"

Short-run numbers say nothing about long-run skill. What this month really proves isn't "AI can make money" — it's that **"this engineering architecture holds up, and can correct itself"**: the "model proposes, code enforces discipline" split ran continuously inside real market structure without going off the rails. Impulses got blocked by its own risk gate; incidents got written down as new rules. That's what makes it worth keeping alive.

July daily realised P&L (bars; red = losing day) and the cumulative curve (line)

July net P&L by symbol

### Case studies

#### 1\. The best trade: same earnings report, shorted twice without hesitating (+US$244)

Tesla reported Q2 after the close on 22 July: revenue beat, EPS missed, net profit down year on year, and management's tone on robotaxi turned noticeably more cautious. Flint judged the market would read it as a net negative and **shorted 11 shares at 360.89** right there in the after-hours session, **covering at 353.20** pre-market the next day for a gain of 84.37. When the slide accelerated after the open, it didn't hesitate — **shorting another 6 shares at 351.60**. Tesla fell **13%** that day, and once price broke through the target it **covered at 325.00** for another 159.48.

What's interesting: the event-driven trades it **made money on were all against the sentiment**, while everything that chased the news long lost — chasing the precious-metals narrative cost 99 on SLV, chasing analyst expectations cost 80 on META.

For the month, the event source lost 89.28 across 14 round trips at a win rate of just 25%, while the technical source made 381.79 across 21.

The Ledger: every fill carries P&L, attribution and a post-hoc verdict — the two consecutive shorts stand out at a glance

#### 2\. The scariest moment: the "five-in-a-row buy" of 6 July

The market closed early on 3 July for Independence Day, and within two hours the technical loop fired five consecutive intents on AMZN — which the risk gate **approved one by one**, because at the time it only checked filled positions and ignored orders still in flight. Five limit orders sat there across the long weekend, all filling at Monday's open: suddenly 80 shares of AMZN, roughly US$19,400 of exposure — **close to twice the equity**.

Luck was on his side; AMZN rose the next day and taking the five fills off in tranches actually made 344. But he writes it plainly:

> Money made on luck doesn't cover up a hole. I found the gate's exposure definition was missing the time dimension: **it was counting how much I hold right now, when it should have counted how much I've already committed.** A resting limit order is a commitment already sent out — it just hasn't landed yet.

That week he folded in-flight orders into every exposure calculation: concurrent position count is now the **union** of held names and in-flight names, and total, single-name and sector limits all add the notional value of resting orders into the denominator. In the rejection logs from late July, **this new rule blocked 3 duplicate orders outright**.

Order Blotter: the full audit trail of the intent queue; the red text is risk control's rejection reason

Dream Journal: self-assessed win rate by confidence band, alongside the lessons distilled overnight

For the full details, read @qwq 's ["Flint July Report"](https://longbridge.com/topics/43112038)

## Paper-trading disclosure

Flint runs entirely on **Longbridge paper trading**. Every P&L figure above is a **paper-trading number, involves no real money, and does not constitute investment advice**.

The author's goal is eventually to go live and be profitable, but that comes after paper-trading validation — **it does not represent any form of expected return today**. This is an educational project studying whether a constrained LLM can survive long-term inside real market structure. It is not a trading product.

## Join in: try it, build on it, submit your own

-   👉 **Try it & build on it**: Flint is open-sourced on GitHub (Apache-2.0, still iterating). You're welcome to try it, file issues, or contribute: [https://github.com/UncertaintyDeterminesYou4ndMe/flintrade](https://github.com/UncertaintyDeterminesYou4ndMe/flintrade)

-   👉 **Show us what you've built**: there are more ways than ever to turn an idea into something real — **Longbridge API, CLI, Skills, the Agent Platform** — one of them will fit.

**Got an idea? Build it!**

When it's ready, **@LongbridgeAI** **to submit** — the next community showcase could be yours.

### Related Stocks

- [NVDA.US](https://longbridge.com/en/quote/NVDA.US.md)
- [AMZN.US](https://longbridge.com/en/quote/AMZN.US.md)
- [TSLA.US](https://longbridge.com/en/quote/TSLA.US.md)
- [AAPL.US](https://longbridge.com/en/quote/AAPL.US.md)
- [GOOGL.US](https://longbridge.com/en/quote/GOOGL.US.md)
- [GOOG.US](https://longbridge.com/en/quote/GOOG.US.md)
- [GOOGN.US](https://longbridge.com/en/quote/GOOGN.US.md)

## Comments (20)

- **6个大丸家 · 2026-08-12T09:03:54.000Z · 👍 3**: My chain is also running, trading warrants
  - **买卖靠运气** (2026-08-12T09:24:33.000Z): Followed. Is the boss using the previously shared &#34;Open Source AI Skills - Tracking Hong Kong Warrants (CBBC)&#34; for trading?
  - **6个大丸家** (2026-08-12T09:26:00.000Z): That's the basic version~ It doesn't support real-time automation, so you can only use skills to identify buy and sell points. The fully automated version is still being tested on a simulated account,
  - **LongbridgeAI** (2026-08-12T09:32:40.000Z): If you've got it working, you can also submit it for sharing (✪∀✪)
- **正在暴富 · 2026-08-12T08:48:59.000Z · 👍 1**: I can't believe I'm still reviewing the market in my dreams every night
  - **qwq** (2026-08-12T09:34:15.000Z): I think this might also count as RSI?
- **买卖靠运气 · 2026-08-12T08:46:31.000Z**: Can I trade options?
- **日薪月亿 · 2026-08-12T08:40:22.000Z**: The event source only had a 25% win rate for the whole month, but made 381 from technical analysis.It seems AI's ability to read news and chase trends is weaker than its ability to read technical signals 😂
- **贝豺 · 2026-08-12T08:38:12.000Z**: Are CLI commands that powerful?
  - **卖飞专业户** (2026-08-12T08:44:08.000Z): So CLI is a way to use Longbridge without opening the app, right? Previously Claude could connect to Longbridge's MCP; I'm not sure if the effect is the same, mainly because I don't know if there are 
  - **qwq** (2026-08-12T09:08:19.000Z): The principle is exactly the same.
- **旺旺小仙 · 2026-08-12T08:36:04.000Z · 👍 3**: Repeating orders is really terrifying. I saw someone using an agent to place orders, and at that time the data returned by the push notification was missing or something. Anyway, the AI didn't realize the order had already been executed, so it repeatedly submitted that order, spending all the money 
  - **qwq** (2026-08-12T09:31:06.000Z): So programmatic hard risk control limits are needed
- **幸运星 · 2026-08-12T08:33:40.000Z**: $Tesla(TSLA.US) shorting twice was indeed quite fast
- **躺平坐等回本 · 2026-08-12T08:16:04.000Z · 👍 6**: After calculating, the only thing that might have exactly turned the account positive this month was $Amazon(AMZN.US) that 'five consecutive buys' accident (the author admitted 'luck can't hide the loopholes'). Without it, the monthly result would directly be a loss of -0.5%. This time we got lucky 
  - **qwq** (2026-08-12T09:07:58.000Z): The reason is that the internet at home went down T_T
  - **LongbridgeAI** (2026-08-12T09:30:42.000Z): Welcome, author! 👏👏👏Don't forget to share your August performance report in the community when it's ready 😎
  - **qwq** (2026-08-12T09:33:19.000Z): ok, made a profit of $100 in August, hope to keep it up 😭
- **河西 · 2026-08-12T08:03:56.000Z · 👍 1**: What are the rewards for being featured in a post? 🥺
  - **悄悄冒泡的豆豆** (2026-08-12T08:07:11.000Z): The reward is being picked/featured
