Get Instruments
Interface Description
Function description: Query the underlying information according to the security symbol list and security type.
Request URL: /instrument/list
Request method: The interface provides HTTP and gRPC two protocols for the query. There is no difference between the data queried by the HTTP and gRPC interfaces. The HTTP interface only needs to obtain data through ordinary GET requests, and the gRPC needs to use the Webull SDK to establish a gRPC connection before it can be used.
Frequency limit: The calling frequency of each AppId is limited to 60 times per minute.
Request Parameters
Parameter | Type | Required fields | Description |
---|---|---|---|
symbols | String | Yes | Securities symbol, such as: 00700,00981. Multiple symbols should be separated by ",". A single query supports up to 100 symbols. |
category | String | Yes | Security type, enumeration. Reference: Category |
Response Parameter
Field | Type | Description |
---|---|---|
name | String | Name |
symbol | String | Security symbol, such as 00700 |
instrument_id | String | Unique identifier for the security |
exchange_code | String | Exchange code, reference: ExchangeCode |
currency | String | Currency, reference: Currency |
Request Example
HTTP
- Python
- Java
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.instrument.get_instrument(symbols, category)
if response.status_code == 200:
instruments = response.json()
HttpApiConfig apiConfig = HttpApiConfig.builder()
.appKey(Env.APP_KEY)
.appSecret(Env.APP_SECRET)
.regionId(Region.hk.name())
.build();
try (QuotesApiClient quotesApiClient = new HttpQuotesApiClient(apiConfig)) {
List<Instrument> instruments = quotesApiClient.getInstruments(symbols, category);
}
gRPC
- Python
- Java
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.instrument.get_instrument(symbols, category)
if response.status_code == 200:
instruments = response.json()
try (QuotesApiClient quotesApiClient = QuotesApiClient.builder()
.appKey(Env.APP_KEY)
.appSecret(Env.APP_SECRET)
.regionId(Region.hk.name())
.build()) {
List<Instrument> instruments = quotesApiClient.getInstruments(symbols, category);
}