Longbridge OpenAPI SDK
    Preparing search index...

    Interface ExtraConfigParams

    Optional extra parameters shared by Config.fromApikey and Config.fromOAuth. All fields are optional.

    interface ExtraConfigParams {
        httpUrl?: string;
        quoteWsUrl?: string;
        tradeWsUrl?: string;
        language?: Language;
        enableOvernight?: boolean;
        pushCandlestickMode?: PushCandlestickMode;
        enablePrintQuotePackages?: boolean;
        logPath?: string;
        enablePapertrading?: boolean;
    }
    Index
    httpUrl?: string

    HTTP API url (default: "https://openapi.longbridge.com")

    quoteWsUrl?: string

    Websocket url for quote API (default: "wss://openapi-quote.longbridge.com/v2")

    tradeWsUrl?: string

    Websocket url for trade API (default: "wss://openapi-trade.longbridge.com/v2")

    language?: Language

    Language identifier (default: Language.EN)

    enableOvernight?: boolean

    Enable overnight (default: false)

    pushCandlestickMode?: PushCandlestickMode

    Push candlesticks mode (default: PushCandlestickMode.Realtime)

    enablePrintQuotePackages?: boolean

    Enable printing the opened quote packages when connected to the server (default: true). Set to false to suppress the output.

    logPath?: string

    Set the path of the log files (Default: no logs)

    enablePapertrading?: boolean

    Enable paper trading mode (default: false).

    When true, all API calls target the paper trading (simulation) environment. The server validates the token: if it belongs to a real-money account the server returns an error.

    When false (the default) the server imposes no restrictions — both paper trading and real-money accounts are accepted.

    Paper trading users should set this to true as a safety guard.