OpenAPI adds stock short selling and options functions. For details, please refer to the update logs.
OpenAPI adds stock short selling and options functions. For details, please refer to the update logs.
OpenAPI adds stock short selling and options functions. For details, please refer to the update logs.
Skip to main content

Market Snapshot

Interface Description

  • Function description:

    • Query the latest stock market snapshots in batches according to the stock code list.
  • Request URL: /market-data/snapshot

  • Request method: Support HTTP and GRPC protocol.

    • HTTP 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.

  • Frequency limit: The calling frequency of each AppId is limited to one time per second.

Request Parameters

ParameterTypeRequired fieldsDescription
symbolsStringYesList of security codes; for example: single: 00700 multiple: 00700,00981; For each request,up to 100 symbols can be subscribed; Under the authority of Hong Kong stock BMP, a single request supports up to 20 symbols
categoryStringYesSecurity type, enumeration, reference: Category, such as: HK_STOCK

Response Parameter

FieldTypeDescription
symbolStringSecurities code
priceStringCurrent price
openStringOpening price: the opening price during the market time in the U.S. market, excluding pre-market and post-market data. If there is no transaction on the day, there is no return value
highStringToday's highest price: the highest intraday price in the U.S. market, excluding pre-market and post-market data. If there is no transaction on the day, there is no return value
lowStringToday's lowest price: the lowest intraday price in the U.S. market, excluding pre-market and post-market data. If there is no transaction on the day, there is no return value
pre_closeStringYesterday's closing price
volumeStringVolume: if there is no transaction on the day, there is no return value
changeStringThe amount of change: if there is no transaction on the day, there is no return value
change_ratioStringChange: if there is no transaction on the day, there is no return value

Request Example

HTTP

from webullsdktrade.api import API
from webullsdkcore.client import ApiClient
from webullsdkcore.common.region import Region

api_client = ApiClient(your_app_key, your_app_secret, Region.HK.value)
api = API(api_client)
response = api.market_data.get_snapshot(symbols, category)
if response.status_code == 200:
bars = response.json()

gRPC

from webullsdktrade.grpc_api import API
from webullsdkquotescore.grpc.grpc_client import GrpcApiClient
from webullsdkcore.common.region import Region

grpc_client = GrpcApiClient(your_app_key, your_app_secret, Region.HK.value)
api = API(grpc_client)
response = api.market_data.get_snapshot(symbols, category)
if response.status_code == 200:
result = response.json()

Response Example

[
0:{
"symbol":
"AAPL"
"price":
"100"
"open":
"100"
"high":
"105"
"low":
"99"
"pre_close":
"101"
"volume":
"1000"
"change":
"1.0"
"change_ratio":
"0.05"
}
]