Subscriptions
Omnibit API provides a subscription-based model to ensure high-quality, low-latency market data. Users must be subscribed to a market pair before accessing orderbook data or requesting trade quotes.
Subscription Limits by Plan
- All users: Automatically subscribed to the top 15 USDT pairs (by market cap).
- Ultra Plan: Can track 25 market pairs total (10 additional beyond default).
- Mega Plan: Can track 50 market pairs total (35 additional beyond default).
Endpoint Overview¶
Method | Endpoint | Description |
---|---|---|
GET | /v1/subscriptions |
Retrieves current list of active subscriptions. |
POST | /v1/subscriptions/tracksymbol |
Activates tracking for specific currency pairs. |
Endpoints That Require Subscription¶
The following endpoints require an active subscription before use:
Method | Endpoint | Description |
---|---|---|
GET | /v1/orderbook/{baseTokenId}/{targetTokenId} |
Fetches the orderbook snapshot by token ID. |
GET | /v1/orderbook/symbols/{baseSymbol}/{targetSymbol} |
Fetches the orderbook snapshot by symbol. |
POST | /v1/trade/requestquote |
Requests a basic trade quote. |
POST | /v1/trade/requestadvancedquote |
Requests an advanced trade quote. |
Retrieve Active Subscriptions¶
Purpose:
Returns the list of market pairs the user is currently subscribed to.
Example Requests
Example Response
json
{
"data": [
{
"baseSymbol": "BTC",
"targetSymbol": "USDT",
"baseTokenId": 130,
"targetTokenId": 5898,
"expiry": 1741414027,
"status": "SUBSCRIBED"
},
{
"baseSymbol": "ETH",
"targetSymbol": "USDT",
"baseTokenId": 7312,
"targetTokenId": 5898,
"expiry": 1741414027,
"status": "SUBSCRIBED"
}
],
"success": true,
"timestamp": 1741413127630,
"requestId": "6139c8e1-a8a7-4429-996f-7430091199fb",
"message": "",
"error": null
}
Response Fields
Name | Type | Description |
---|---|---|
status | string | "PROCESSING" or "SUBSCRIBED" . |
expiry | number | Unix timestamp when the subscription expires. |
Activate Symbol Tracking¶
Purpose:
Allows Ultra and Mega plan users to subscribe to additional market pairs.
Request Body (by Token IDs):
Name | Type | Mandatory | Description |
---|---|---|---|
baseTokenId | number | Yes | Token ID of the base token. |
targetTokenId | number | Yes | Token ID of the target token. |
Request Body (by Symbols):
Name | Type | Mandatory | Description |
---|---|---|---|
baseSymbol | string | Yes | Symbol of the base token. |
targetSymbol | string | Yes | Symbol of the target token. |
Example Request
http
POST /v1/subscriptions/tracksymbol
Content-Type: application/json
{
"baseTokenId": 130,
"targetTokenId": 5898
}
Example Response
json
{
"data": {
"baseSymbol": "BTC",
"targetSymbol": "USDT",
"baseTokenId": 130,
"targetTokenId": 5898,
"expiry": 1741415038719,
"status": "PROCESSING"
},
"success": true,
"timestamp": 1741414138719,
"requestId": "0d54b945-cb59-4ea0-a516-74053ffb29dc",
"message": "Symbol tracking activated.",
"error": null
}
Best Practices
- Check active subscriptions before requesting orderbook data or trade quotes.
- Use token IDs to avoid ambiguity.
- Plan your subscriptions based on your API plan limits