longbridge
Installation
SKILL.md
What this is
☁️ Cloud broker — runs directly in the container via the official longport SDK (formerly longbridge). Covers US, HK, and A-share markets.
Auth is static key: App Key + App Secret + Access Token. These use the SDK's own env var names so they're picked up automatically.
⚠️ No paper/live discriminator exists in the API. Paper vs live is determined only by which Access Token you loaded — there is no field, account prefix, or host that distinguishes them. So --profile here is trust-declared (echoed back as paper_guard: config_declared); it does not verify anything on the server. Live placement still requires --confirm-live. Treat the token you configure as authoritative for which environment you're in.
Get your credentials
- Open a Longbridge account, then go to the LongPort OpenAPI console (开放平台).
- Apply for / enable OpenAPI access. The console issues three values:
- App Key
- App Secret
- Access Token (has an expiry — regenerate when it lapses)
- For paper trading, generate the token while your account/environment is in the paper/模拟 mode the platform offers; for live, use the live token. (Same three field names either way.)