Skip to content

Authentication

moomoo MCP uses OAuth 2.1 for authentication. MCP clients (such as Claude Desktop, Cursor) will automatically guide you through the authorization flow.

Authorization Flow

  1. AI client initiates authorization request — the client redirects you to the moomoo OAuth consent page
  2. User authenticates and grants permissions — you log in and choose which scopes to authorize
  3. Client receives access token — upon consent, the client obtains a token for API calls
  4. Token auto-refreshes — when the token expires, the client handles refresh transparently (tokens expire after 14 days of inactivity by default)

Token Lifecycle

  • Access tokens are short-lived (typically 2 hours)
  • Refresh tokens are used to obtain new access tokens without re-authorization
  • Access tokens can be manually revoked from the console

Scopes

During OAuth authorization, you can select the permission scopes to grant on the consent page:

ScopeDescription
quote:readAccess real-time quotes, historical candlesticks, and market data
quote:writeManage watchlist symbols
trade:readQuery account balance, positions, and historical orders
trade:writeSubmit and cancel orders