Product IDs
In the QuBit API, all tradable products are identified by a human-readable, unique string Product ID (instId). We have moved away from confusing integer indices to provide developers with a more intuitive and less error-prone interaction experience.
You can retrieve the complete list of all tradable products and their instIds via the Get Instruments (GET /api/v1/common/instruments) endpoint.
instId Naming Convention
instId Naming ConventionThe composition of an instId follows a simple and standardized naming convention, making it easy for you to construct or parse them directly.
1. Spot
The instId for spot products follows the format {BaseCurrency}-{QuoteCurrency}.
Format:
BASE-QUOTEExamples:
BTC-USDT: Represents the spot trading pair for Bitcoin against Tether.ETH-BTC: Represents the spot trading pair for Ethereum against Bitcoin.
2. Perpetual Swaps
The instId for perpetual swap products follows the format {BaseCurrency}-{QuoteCurrency}-SWAP.
Format:
BASE-QUOTE-SWAPExamples:
BTC-USDT-SWAP: Represents the BTC perpetual swap, margined and settled in USDT.ETH-USDT-SWAP: Represents the ETH perpetual swap, margined and settled in USDT.
💡 Developer Tip
We strongly recommend that you do not hardcode
instIds in your application. The best practice is to fetch the latest list of products by calling theGET /api/v1/common/instrumentsendpoint when your program starts and cache the results. This ensures that your application can adapt to dynamic market changes, such as the listing of new pairs or the delisting of old ones.
Mainnet vs. Testnet Differences
Please note that while the naming convention for instId is the same on both Mainnet and Testnet, the list of available products may differ. The Testnet may include non-existent or test-only trading pairs for development purposes.
Mainnet Product List:
GET https://api.qubit.com/api/v1/common/instrumentsTestnet Product List:
GET https://api.qubit-test.com/api/v1/common/instruments
Last updated