Skip to content

OAuth login succeeds but CLI only returns cash account (positions empty, region-cache forced to cn) #1067

@aspen-1021

Description

@aspen-1021

I successfully completed longbridge auth login, but the CLI still cannot access my real stock holdings.

Observed behavior:

  • longbridge auth login completes successfully
  • longbridge positions --format json returns []
  • longbridge portfolio --format json returns cash only
  • market_cap = 0
  • holdings = []

Additional details:

  • My Longbridge App does have real stock positions
  • The OAuth app already has these permissions:
    • Account & Positions
    • Trade Order Lookup
    • Trade Execution
  • After deleting local auth files and re-running login, the file ~/.longbridge/openapi/region-cache is automatically recreated with value cn
  • This behavior persists even after a clean re-login

What I need help checking:

  1. Whether my OAuth client is bound to the wrong account context
  2. Whether my account is being incorrectly routed to the cn OpenAPI environment
  3. Whether OpenAPI permissions are enabled on the same securities account that contains my real holdings

Environment:

  • Windows
  • Longbridge Terminal CLI 0.22.3

Expected behavior:

  • longbridge positions --format json should return my real stock holdings
  • longbridge portfolio --format json should show non-empty holdings / market value

I removed local auth cache (region-cache, cli-auth) and authenticated again, but the issue remained unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions