Skip to main content

Overview

TypeFunction introductionProtocolDescription
GetGet InstrumentsHTTP、GRPC
CandlesticksHTTP、GRPCHTTP only supports A-share (China Connect) and Hong Kong stock BMP query; GRPC can support all market quotations, if the user have the corresponding quotation authority
Market SnapshotHTTP、GRPC
Order BookGRPC
Tick-by-TickGRPC
Get Trading CalendarHTTPGet the market trading calendar
Market Push QuotesGet TokenGRPCSupport market snapshots, Security order book, and Tick-by-Tick transaction data
SubscribeGRPC
UnsubscribeGRPC
Market Push QuotesMQTT

Illustration:

For the gRPC interface, when the following code is executed:

grpc_client = GrpcApiClient(your_app_key, your_app_secret, 'hk')

A gRPC connection will be initialized, and subsequent interface requests will use this gRPC connection for data request and reception. Every time a connection is established, we consider it a market session, and each App Key can only establish a maximum of 10 gRPC connections.

Some interfaces support gRPC and HTTP interfaces, which are convenient for users to obtain data. However, the token acquisition, subscription, and unsubscribe interfaces related to MQTT persistent connection only support gRPC calls.