Batch Token CU Cost
Batch CU Cost
Formula:
Batch CU Cost = N^0.8 × Base CU Cost
where:
- N: Number of tokens requested in the batch.
- Base CU Cost: The CU unit cost of calling a single token using multiple url (different from CU cost of single url)
- The
Batch CU costis rounded up to the nearest whole number (0 decimal).
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 would be:
Multi_price_batch_CU_api_cost = 5^0.8 x 5 = 19
Note:
- Using the batch API is always more cost-efficient than making multiple single API calls.
- Users should consider purchasing a Business plan to access batch APIs.
- The larger the N, the higher the discount rate, but each API has an
n_maxcap that users should be aware of.
n_max Table for Each API
n_max Table for Each API| API Name | Endpoint | Base CU cost | n_max (Max Tokens per Batch) |
|---|---|---|---|
| Price (Multiple) GET & POST | /defi/multi_price | 5 | 100 |
| Price - Volume (Multiple) | /defi/price_volume/multi | 15 | 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 |
| Token - Market Data (Multiple) | /defi/v3/token/market-data/multiple | 15 | 20 |
| Pair - Overview (Multiple) | /defi/v3/pair/overview/multiple | 20 | 20 |
| All time - Trades (Multiple) | /defi/v3/all-time/trades/multiple | 25 | 20 |
| Exit liquidity (Multiple) | /defi/v3/token/exit-liquidity/multiple | 30 | 50 |
| Price stats (Multiple) | /defi/v3/price/stats/multiple | 20 | 20 |
| Token - Holder List (Batch) | /token/v1/holder/batch | 50 | 500 |
| Wallet - PnL | /wallet/v2/pnl | 40 | 50 |
| All time - Price (Multiple) | 25 | 20 |
Updated 2 months ago
