Subscriptions
AIO Exchange 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.
Endpoint Overview
Method | Endpoint | Description |
---|---|---|
GET | /v1/subscriptions |
Retrieves current list of active subscriptions. |
POST | /v1/subscriptions/tracksymbol |
Activates tracking for specific currency pairs. |
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).
Retrieve Active Subscriptions
GET /v1/subscriptions
Returns the list of market pairs the user is currently subscribed to.
Example Request
GET /v1/subscriptions
Example Response
{
"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
status
:"PROCESSING"
or"SUBSCRIBED"
expiry
: Unix timestamp when the subscription expires.
Activate Symbol Tracking
POST /v1/subscriptions/tracksymbol
Allows Ultra and Mega plan users to subscribe to additional market pairs.
Example Request
POST /v1/subscriptions/tracksymbol
Request Body
{
"baseTokenId": 130,
"targetTokenId": 5898
}
or
{
"baseSymbol": "BTC",
"targetSymbol": "USDT"
}
Example Response
{
"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
}
Tracking Status
- PROCESSING: The request is being processed.
- SUBSCRIBED: Orderbook data is now available.
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. |
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.