Skip to content

longbridge/skills / skills/longbridge-market-data

longbridge-market-data

Verified

Real-time quotes, K-line charts, order book, trade ticks, intraday capital flow, market sentiment temperature, trading session schedule, security lists, exchange rates, and IPO calendar for HK/US/A-share/SG via Longbridge. Also covers ADR premium and FX carry frameworks. Triggers: "股价", "行情", "K线", "走势", "盘口", "资金流", "市场温度", "汇率", "IPO", "打新", "隔夜股", "ADR溢价", "外汇套息", "K線", "盤口", "資金流", "市場溫度", "匯率", "ADR溢價", "外匯套息", "现在多少钱", "多少钱", "stock price", "quote", "kline", "chart", "depth", "orderbook", "capital flow", "market sentiment", "exchange rate", "IPO calendar", "security list", "ADR premium", "fx carry", "market open", "trading hours", "开市", "溢价", "NVDA.US", "700.HK", "600519.SH", "股價", "走勢", "開盤", "今天開市"

references/market-temp.md

View on GitHub
# longbridge-market-temp

Market-level state: open / close, calendar, sentiment temperature. Symbol-level questions belong in `longbridge-quote`.

## Subcommands

> The `MARKET` argument is **positional** (not a `--market` flag). Run `longbridge <subcommand> --help` to confirm.

| CLI command                                                      | Returns                                                                                                     |
| ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `longbridge market-temp <MARKET> --format json`                  | Today's market temperature (0–100). Add `--history --start --end` for a time series. Default market = `HK`. |
| `longbridge trading session --format json`                       | Trading sessions for all markets (open / close times).                                                      |
| `longbridge trading days <MARKET> [--start --end] --format json` | Trading day calendar with half-days. Default market = `HK`.                                                 |

## Market mapping

LLM maps colloquial names to the positional `<MARKET>`:

| User says                              | `<MARKET>`                 |
| -------------------------------------- | -------------------------- |
| 美股 / US / Nasdaq / S&P / Dow         | `US`                       |
| 港股 / HK / Hang Seng / 恒生 / 恆生    | `HK`                       |
| A 股 / 沪 / 深 / 上证 / 深证 / SH / SZ | `CN` (aliases: `SH`, `SZ`) |
| 新加坡 / SG / Straits / 海峡 / 海峽    | `SG`                       |

`trading session` does not take a market argument; it returns all markets in one call.

## Workflow

1. Pick the subcommand (table above).
2. Resolve the positional `<MARKET>` if needed.
3. For "is the market open?" — call `trading session`, then reason against the current local time (US = UTC-5/-4 DST, HK / CN / SG = UTC+8) and the user's target market.
4. Call the Longbridge CLI directly (preferred) or fall back to MCP.
5. Translate the `market-temp` value into wording: 0–30 _偏空_, 30–50 _中性偏空_, 50–70 _中性偏多_, 70–100 _偏多_ (translate into the user's language).

## CLI

```bash
longbridge market-temp     HK                                          --format json
longbridge trading session                                              --format json
longbridge trading days    US --start 2026-04-28 --end 2026-05-31       --format json
longbridge market-temp     HK --history --start 2026-01-01 --end 2026-04-28 --format json
```

## Output

- `market-temp` (snapshot): single object with the temperature value. With `--history`, an array of historical points.
- `trading session`: array spanning all markets.
- `trading days`: `{trading_days, half_trading_days}` arrays for the selected market.

## Error handling

If `longbridge` is missing, fall back to MCP. Other stderr messages get relayed verbatim to the user.
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall