Skip to content

Latest commit

 

History

History
84 lines (68 loc) · 5.48 KB

File metadata and controls

84 lines (68 loc) · 5.48 KB
title Compute Units
sidebarTitle Compute Units
description Understand how Sim bills API usage using Compute Units (CUs) and how they're calculated per endpoint.

import { DefaultChainCount } from "/snippets/default-chain-count.mdx";

Every API call costs Compute Units (CUs). Simple queries cost 1 CU. Multi-chain queries multiply by the number of chains. For example, fetching balances for 1 wallet on 3 chains = 3 CUs.

If you omit the `chain_ids` parameter, the request uses the `default` chain set, which currently includes {}+ chains and may grow as Sim adds networks. Always pass explicit `chain_ids` to keep costs predictable.
Endpoint Type Compute Units Default Chains (no chain_ids)
Balances (EVM & SVM) Chain-dependent N compute units, where N is the number of chains processed in the chain_ids query parameter after tag expansion {}
Balances (single token sub-path) Fixed 1 compute unit per request. Accepts exactly one chain_ids value (single chain only) -
Collectibles Chain-dependent N compute units, where N is the number of chains processed in the chain_ids query parameter after tag expansion {}
DeFi Positions Chain-dependent 10N compute units, where N is the number of chains processed in the chain_ids query parameter after tag expansion 6
Activity Fixed 3 compute units per request
Transactions (EVM & SVM) Fixed 1 compute unit per request
Token Info Fixed 2 compute units per request, even though chain_ids is required
Token Holders Fixed 2 compute units per request
Subscriptions Event-based 2 compute units per event sent to your webhook. Note that a single webhook payload can contain multiple events. All supported EVM chains (varies by subscription type) when chain_ids is omitted

How CUs work

For chain-dependent endpoints, CU equals the number of distinct chains the request processes. If you pass tags (like default, mainnet, or testnet) via chain_ids, we expand them to specific chains before computing CU. If you omit chain_ids in the Collectibles or Balances endpoints, the endpoint uses its default chain set. CU equals the size of that set at request time, currently {} for Balances and {} for Collectibles, and may change as Sim adds more chains.

For fixed endpoints, each request consumes exactly specified number of compute units regardless of how many chains you query or what parameters you provide.

Chain selection and tags

Chain count is computed after we expand any tags you pass. To keep CU predictable over time, specify explicit chain_ids (EVM). If you use tags like default or mainnet, we expand them to specific chains at request time. Tags can grow as we add more networks. Pin chains explicitly to keep CU stable. See Supported Chains.

Examples

Use `?chain_ids=1,8453,137` to process three chains. This consumes three CUs. Omitting `chain_ids` uses the endpoint's chains tagged `default`. CU equals the size of that set at request time ({} as of now, and subject to change). See [Supported Chains](/evm/supported-chains#tags).
<Card title="Balances: mainnet tag">
Passing `?chain_ids=mainnet` expands to all supported mainnet chains for the endpoint. CU equals the expanded chain count.
Each request consumes 1 CU and must specify exactly one chain via `chain_ids`. Omitting `chain_ids` uses the endpoint's chains tagged `default`. CU equals the size of that set at request time ({} as of now, and subject to change).
<Card title="Activity: fixed cost">
Activity uses a fixed-cost model. Each request consumes the same CU regardless of chains queried.
Token Info is fixed-cost per request, even though `chain_ids` is required. CU does not scale with the number of chains. Each event sent to your webhook consumes 2 CUs. A single webhook payload may contain multiple events, resulting in multiple CUs per webhook delivery.

FAQs

For chain-dependent endpoints, count the chains you include (after any tag expansion). For fixed-CU endpoints, see the table at the top of the page. No. CU is based on chain count or a fixed per-request cost, not on token filtering. See [Token Filtering](/token-filtering). If you omit `chain_ids` for endpoints where it can be passed, we use the endpoint's `default` chain set, which may grow as new chains are added. Pin explicit chains to keep CU stable. Visit your Sim Dashboard.