Query Tradable Instrument
Interface Description
Function description: Query the information of a traded symbol.
URL: /trade/instrument/tradable/list
Method: GET
Rate limit: The calling frequency of each App ID is limited to 10 times in 30 seconds.
Request Parameters
Parameter | Type | Required fields | Description | Example value |
---|---|---|---|---|
account_id | String | Yes | Account ID | ac133fsde |
Response Parameter
Parameter | Type | Description | Example value |
---|---|---|---|
instruments | Instruments | Tradeable Instrument List |
Instruments:
Parameter | Type | Description | Example value |
---|---|---|---|
symbol | String | CRYPTO code | BTCUSD |
instrument_id | String | Instrument ID | 950160802 |
instrument_type | String | TickerType | CRYPTO |
trade_policy | String | Trading Policies: referring to TradePolicy in the data dictionary | ALL |
name | String | symbol name | Bitcoin |
min_trade_amt | String | min trade amount | |
max_trade_amt | String | max trade amount | |
min_trade_qty | String | min trade quantity | |
max_trade_qty | String | max trade quantity | |
price_steps | String | price steps | |
lot_size | String | lot size | |
currency | String | currency |
Request Example
- Python
- Java
from webullpaysdktrade.api import API
from webullpaysdkcore.client import ApiClient
from webullpaysdkcore.common.region import Region
your_app_key = "<your_app_key>"
your_app_secret = "<your_app_secret>"
account_id = "account_id"
api_client = ApiClient(your_app_key, your_app_secret, Region.US.value)
api = API(api_client)
response = api.trade_instrument.get_tradable_instruments(account_id)
if response.status_code == 200:
trade_instrument_detail = response.json()
print(trade_instrument_detail)
HttpApiConfig apiConfig = HttpApiConfig.builder()
.appKey("<your_app_key>")
.appSecret("<your_app_secret>")
.regionId(Region.us.name())
.build();
TradeApiService apiService = new TradeHttpApiService(apiConfig);
TradableInstruments tradableInstruments = apiService.getTradableInstruments("accountId");
//print
System.out.println(JsonSerializer.toJson(tradableInstruments, SerializeConfig.builder().underscoresToCamel(true).build()));
Response Example
{
"instruments": [
{
"name": "Bitcoin",
"min_trade_amt": "1.0000000000",
"max_trade_amt": "100000.0000000000",
"min_trade_qty": "0.0000000100",
"max_trade_qty": "10000000000.0000000000",
"price_steps": "0.0100000000",
"lot_size": "0.0000000100",
"trade_policy": "ALL",
"currency": "USD",
"symbol": "BTCUSD",
"instrument_id": "950160802",
"instrument_type": "CRYPTO"
},
{
"name": "Ethereum",
"min_trade_amt": "1.0000000000",
"max_trade_amt": "100000.0000000000",
"min_trade_qty": "0.0000000100",
"max_trade_qty": "10000000000.0000000000",
"price_steps": "0.0100000000",
"lot_size": "0.0000000100",
"trade_policy": "ALL",
"currency": "USD",
"symbol": "ETHUSD",
"instrument_id": "950160804",
"instrument_type": "CRYPTO"
}
]
}
Exception Example
{
"error_code": "INVALID_TOKEN",
"message": "401 UNAUTHORIZED \"app_id and account_id not related\""
}