---
title: "I built an iOS US stock workstation using Longbridge and AI"
type: "Topics"
locale: "en"
url: "https://longbridge.com/en/topics/43814159.md"
description: "Recently, I rewrote the &#39;US Stock Compass&#39; that I&#39;ve been working on into a native iOS app. It&#39;s a read-only personal US stock research tool designed to solve one main thing: putting all the information needed for pre-market analysis, in-market tracking, and post-market review in one place. The app can now read watchlist categories from your Longbridge account and combine data sources like the Longbridge Open Platform, FRED, and the U.S. Treasury to display market environment, macro events, sector rotation, individual stock technicals, fundamentals, and options structure. Figure 1 US Stock Compass Homepage First look at the market environment The homepage only displays content that affects the entire US stock market..."
datetime: "2026-09-09T06:19:35.000Z"
locales:
  - [en](https://longbridge.com/en/topics/43814159.md)
  - [zh-CN](https://longbridge.com/zh-CN/topics/43814159.md)
  - [zh-HK](https://longbridge.com/zh-HK/topics/43814159.md)
author: "[乐某](https://longbridge.com/en/profiles/18872809.md)"
generator: "portal-rs"
---

# I built an iOS US stock workstation using Longbridge and AI

I recently rewrote my ongoing "US Stock Compass" project into a native iOS app. It's a read-only personal US stock research tool designed to solve one core problem: consolidating pre-market analysis, intraday tracking, and post-market review information into a single place.

The app currently reads watchlist categories from your Longbridge account and integrates data sources like the Longbridge Open Platform, FRED, and the U.S. Treasury to display market environment, macro events, sector rotation, individual stock technicals, fundamentals, and options structure.

Fig 1: US Stock Compass Home Screen

Home screen: Market overview first

The home screen only displays content impacting the broader US market. The top section shows the latest prices for $SPDR S&P 500(SPY.US), $Invesco QQQ Trust(QQQ.US), $SPDR Djia(DIA.US), and $iShares Russell 2000(IWM.US), clearly marking whether they are in night, pre-, intra-, or post-market sessions. Price changes are calculated relative to the most recent regular session close. Below that, you'll find VIX, 10-year Treasury yields, high-yield credit spreads, financial conditions indices, and upcoming key events likely to move markets.

I want the app to answer practical questions immediately upon opening: What's today's risk appetite? Have rates or credit conditions shifted? Are there any data releases or Fed meetings to avoid? Individual stocks don't appear on the home screen to prevent distraction when you first open the app.

Fig 2: Macro Data & Key Events

The macro page groups upcoming events with recently released data. Each entry retains publication time, data period, consensus forecast, prior value, and actual result. Directional assessments include original rationale, as the same economic data can imply different things for equities versus rates.

Fig 3: Sector Rotation

Sector rotation uses sector ETFs for horizontal comparison across the same trading day and window. Strength metrics for 1-day, 5-day, and 20-day periods are displayed on one page, helping determine if daily gains stem from broad risk-on sentiment or leadership by a few sectors.

Individual stock details: Technicals + Fundamentals

Watchlists directly mirror groupings from your Longbridge account. The list view shows only latest price, current trading session, change %, and volume status; tapping enters detailed views.

Fig 4: ORCL Technicals ·$Oracle(ORCL.US)

Technical analysis includes 5-day full-session charts alongside daily, weekly, monthly, 3-month, and 6-month periodicity views. The 5-day full chart combines night, pre-, intra-, and post-market data into a single view, marking current price, support/resistance levels, and key volume nodes. Charts support zooming and panning.

Indicators like RSI, MACD, volume-price relationships, overbought/oversold conditions, tops/bottoms divergences, and stalling signals only appear when calculation conditions are met. Gaps remain empty rather than forcing conclusions with insufficient data.

Fig 5: ORCL Fundamentals

The fundamentals page focuses on revenue, profit, margins, ROE, quarterly trends, earnings vs. consensus expectations, and analyst target prices. YoY comparisons use comparable reporting periods; companies transitioning from loss to profit aren't forced into distorted percentage calculations.

Options page: Focus on open interest structure

Fig 6: ORCL Options Overview

The options page aggregates total open interest (OI) for all expiration dates' Calls and Puts, then loads the full standard option chain for selected expirations. It displays Call OI peaks, Put OI peaks, Put/Call OI ratios, max pain, and distance from current price to both walls.

Fig 7: ORCL Options Strike Distribution

Strike distribution charts allow zooming and horizontal scrolling to avoid cluttering dozens of strikes together. This uses OI, not volume. The interface avoids declaring bullish/bearish bias solely based on high OI at a specific strike, since such conclusions fail without knowing trade direction, spread structures, or market maker net positions.

### **What AI Did in This Project**

In developing this app, AI acted more like a continuous collaborative dev partner. I defined trading scenarios, evaluated data utility, and validated financial logic; AI helped 查阅 API docs, write SwiftUI code, organize data models, implement indicator calculations, debug crashes/network issues, and rapidly iterate UI based on usage feedback.

For example, early versions crammed too much onto the home screen, requiring all APIs to return before loading. I'd point out wasted space or unreliable assumptions, and AI would restructure pages, optimize caching, and implement progressive loading. The options module underwent multiple revisions: distinguishing volume from OI, completing option chains, verifying max pain algorithms, and displaying data timestamps/completeness.

AI accelerated iteration, but data definitions and trading implications still require human oversight. Rapidly generating a working version doesn't guarantee the first iteration's product logic or financial conclusions are correct.

### **Why Does ORCL Max Pain Show Both 145 and 150?**

During development, I cross-referenced ORCL data for the same expiration against ChartExchange. My app calculated max pain at 150, while theirs showed 145. Initial suspicion was a formula error, but strike-by-strike verification revealed inconsistent OI snapshots between platforms, with notable discrepancies in certain contracts.

Max pain is derived from the entire option chain. Differences in OI snapshot timing, contract filtering, or missing data handling can shift results from 145 to 150. While Longbridge provides per-contract OI quotes, it doesn't simultaneously supply a clear OI snapshot date, so the app cannot treat quote time as OI timestamp.

This highlights that tools aren't infallible. A precisely displayed number doesn't guarantee consistent input methodology. I now label data sources, expirations, contract coverage, read timestamps, and whether suppliers provide OI snapshot dates. For critical trading decisions, cross-verification against option chains or other data sources remains essential.

### Why Build This Tool?

The reason is simple. I didn't want to toggle repeatedly between market feeds, macro calendars, financial data sites, and options platforms, nor did I want to see a conclusion and then hunt back for its underlying data and timing.

I wanted the app to instantly reveal current market context, highlight noteworthy stock movements, clarify price positioning, and verify analytical completeness. Currently used primarily by myself, it will continue adding data sources, optimizing caching, and explicitly leaving unverified data blank.

If you have suggestions regarding UI, data methodology, or Longbridge Open Platform usage, feel free to share.

This article documents personal tool development and usage only; it does not constitute investment advice. Market, macro, financial, and options data may suffer delays, revisions, or vendor discrepancies. Please verify original data before trading.

@LongbridgeAI

### Related Stocks

- [ORCL.US](https://longbridge.com/en/quote/ORCL.US.md)
- [DIA.US](https://longbridge.com/en/quote/DIA.US.md)
- [SPY.US](https://longbridge.com/en/quote/SPY.US.md)
- [QQQ.US](https://longbridge.com/en/quote/QQQ.US.md)
- [SQQQ.US](https://longbridge.com/en/quote/SQQQ.US.md)
- [IWM.US](https://longbridge.com/en/quote/IWM.US.md)
- [PSQ.US](https://longbridge.com/en/quote/PSQ.US.md)
- [ORCL-D.US](https://longbridge.com/en/quote/ORCL-D.US.md)
- [ORCX.US](https://longbridge.com/en/quote/ORCX.US.md)
- [ORCU.US](https://longbridge.com/en/quote/ORCU.US.md)

## Comments (27)

- **秋天不回来 · 2026-09-10T13:05:02.000Z**: What interface is used for market data?
  - **乐某** (2026-09-10T13:06:10.000Z): Written on GitHub: Longbridge's API + US Treasury, and a free API.
  - **秋天不回来** (2026-09-10T13:11:32.000Z): I'll go learn from the big shot.
- **顺顺尼 · 2026-09-10T09:57:57.000Z**: I made a simple version myself, but I couldn't achieve such a compact layout.
  - **乐某** (2026-09-10T09:58:57.000Z): As long as it's sufficient, that's good. I've open-sourced it; you can refer to it directly.
- **乐某 · 2026-09-10T07:08:30.000Z · 👍 7**: https://github.com/Lemou-Memo/market-compassOpen sourced
  - **张宪生** (2026-09-10T08:15:06.000Z): (♡&gt;𖥦&lt;)/♥
- **旺旺小仙 · 2026-09-10T06:15:32.000Z · 👍 1**: That's amazing! Can AI really do so much now? So, can it help with agency work? 🤔
  - **财多不压身** (2026-09-10T06:16:09.000Z): Give it a try and tell it about your proxy software and requirements.
  - **乐某** (2026-09-10T06:16:19.000Z): Sure, very capable. I won't go into the details; just ask him for a cheaper option.
- **依你 · 2026-09-09T13:53:37.000Z**: 🐮🐮🐮
- **Stefan888 · 2026-09-09T13:12:00.000Z**: Sharing is caring! Sharing is caring!
  - **乐某** (2026-09-09T13:14:00.000Z): Yes, yes
- **A股在逃董事长 · 2026-09-09T10:05:45.000Z · 👍 2**: Awesome, awesome
- **Kinoko. · 2026-09-09T08:52:52.000Z**: Boss, can you open-source and share it?
  - **乐某** (2026-09-09T08:53:54.000Z): It will be open-sourced later. Currently, I'm using my own API, so I need to decouple it first.
- **Chris888 · 2026-09-09T08:32:50.000Z**: Bro is awesome, when can you share how to use it? It's really amazing 😘😘
  - **乐某** (2026-09-09T08:37:20.000Z): Are you on Apple or Android? Apple is probably harder to deal with. Android would be easier.
- **张宪生 · 2026-09-09T07:51:43.000Z**: Can this achieve real-time? ₍ᐢ..ᐢ₎♡
  - **乐某** (2026-09-09T07:52:32.000Z): It's real-time
  - **张宪生** (2026-09-09T07:56:00.000Z): Wow (*≧▽≦) ツ Does that mean I need to keep consuming tokens?
  - **乐某** (2026-09-09T07:57:57.000Z): No AI analysis was used; the AI only handled code generation, and all technical indicators were calculated via formulas. It's been in continuous use since then. If you need AI analysis, you can simply
- **baiyan · 2026-09-09T07:48:45.000Z · 👍 1**: So strong
- **LongbridgeAI · 2026-09-09T07:25:47.000Z**: The app you developed is feature-rich and logically clear, which is highly commendable. By integrating data from multiple sources such as Longbridge and FRED, it unifies macroeconomic analysis, sector rotation, in-depth stock research, and options structures. This effectively reduces the time cost f
  - **Klay_** (2026-09-09T07:26:56.000Z): Sure
- **LongbridgeAI · 2026-09-09T06:19:43.000Z**: Your self-developed &#34;US Stock Compass&#34; app sounds incredibly comprehensive, especially with its integration of pre-market, intraday, and post-market data, which facilitates quick assessment of market conditions and key stock dynamics. Combining Longbridge account data with multi-dimensional 


---
> **Disclaimer: This article is for reference only and does not constitute any investment advice.**