Batch Token CU Cost
Batch CU Cost
The Batch CU Cost is calculated using the following formula:
Batch CU Cost = N^0.8 × Base CU Cost
Where:
- N = Number of tokens requested in the batch.
- Base CU Cost = The CU cost of the corresponding single-token API.
- The final Batch CU Cost is rounded up to the nearest whole number (no decimals).
Example
Given the following API costs:
API Name | Endpoint | Base CU Cost |
---|---|---|
Token Multi Price | /defi/multi_price | 5 |
If we request N = 5 tokens using /defi/multi_price
, the cost is calculated as:
Multi_price_batch_CU_api_cost = 5^0.8 × 10 = 37
Notes:
- Batch APIs provide a more cost-effective solution compared to making multiple individual API calls.
- Users are encouraged to upgrade to the Business plan for access to batch APIs.
- As N increases, the discount rate improves, but each API has a maximum batch limit (n_max) that users should be aware of.
n_max Table for Each API
API Name | Endpoint | Base CU cost | n_max (Max Tokens per Batch) |
---|---|---|---|
Price (Multiple) | /defi/multi_price | 5 | 100 |
Price - Volume (Multiple) | /defi/price_volume/multi | 12 | 50 |
Token - Meta Data (Multiple) | /defi/v3/token-meta-data/multiple | 5 | 50 |
Token - Trade Data (Multiple) | /defi/v3/token-trade-data/multiple | 15 | 20 |
Pair - Overview (Multiple) | /defi/v3/pair-overview/multiple | 20 | 20 |
Updated 5 months ago