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 cost of the corresponding single-token API.
  • The Batch CU cost is rounded up to the nearest whole number (0 decimal).

Example

Given the following API costs:

API NameEndpointBase CU Cost
Token Price/defi/price10

If we request N = 5 tokens using /defi/multi_price, the cost would be:

Multi_price_batch_CU_api_cost = 5^0.8 x 10 = 37

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_max cap that users should be aware of.

n_max Table for Each API

API NameEndpointn_max (Max Tokens per Batch)
Price (Multiple)/defi/multi_price100
Price - Volume (Multiple)/defi/price_volume/multi50
Token - Meta Data (Multiple)/defi/v3/token/meta-data/multiple50
Token - Trade Data (Multiple)/defi/v3/token/trade-data/multiple20
Pair - Overview (Multiple)/defi/v3/pair/overview/multiple20