StaticfromApp key
App secret
Access token
OptionalhttpUrl: string | nullHTTP endpoint url override (reads
LONGPORT_HTTP_URL from env if omitted; falls
back to https://openapi.longportapp.com)
StaticfromCreate a new HttpClient from environment variables (API Key mode)
It first reads the .env file in the current directory.
LONGPORT_HTTP_URL - HTTP endpoint urlLONGPORT_APP_KEY - App keyLONGPORT_APP_SECRET - App secretLONGPORT_ACCESS_TOKEN - Access tokenStaticfromCreate a new HttpClient from an OAuth handle
LONGPORT_HTTP_URL is read from the environment automatically.
Passing httpUrl overrides that value.
OAuth handle obtained from OAuth.build(...)
OptionalhttpUrl: string | nullHTTP endpoint url override (reads LONGPORT_HTTP_URL
from env if omitted; falls back to
https://openapi.longportapp.com)
Create a new
HttpClientusing API Key authenticationLONGPORT_HTTP_URLis read from the environment automatically. PassinghttpUrloverrides that value.