Skip to main content

Market Snapshot

Interface Description

  • Function description:

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

  • Method: GET

  • Rate limit: The calling frequency of each App ID is limited to one time per second.

Request Parameters

ParameterTypeRequired fieldsDescription
symbolsStringYesList of security codes; for example: single: BTCUSD multiple: BTCUSD,ETHUSD; For each request,up to 100 symbols can be subscribed
categoryStringYesSecurity type, enumeration, reference: Category, such as: CRYPTO

Response Parameter

FieldTypeDescription
symbolStringSecurities code
openStringOpening price: the opening price during the market time, 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, 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, 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
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
instrument_idStringInstrument ID
trade_timestampLongUTC timestamp, eg: 1739100939000

Request Example

from webullpaysdkcore.client import ApiClient
from webullpaysdkmdata.common.category import Category
from webullpaysdkmdata.request.get_snapshot_request import GetSnapshotRequest
from webullpaysdkcore.common.region import Region

your_app_key = "<your_app_key>"
your_app_secret = "<your_app_secret>"

api_client = ApiClient(your_app_key, your_app_secret, Region.US.value)
request = GetSnapshotRequest()
request.set_category(Category.CRYPTO.name)
request.set_symbols("BTCUSD")
response = api_client.get_response(request)
if response.status_code == 200:
result = response.json()
print(result)

Response Example

[
{
"symbol": "BTCUSD",
"open": "100",
"high": "105",
"low": "99",
"pre_close": "101",
"change": "1.0",
"change_ratio": "0.05",
"instrument_id": "950160802",
"trade_timestamp": 1739955675063
}
]