Tycho RPC
Last updated
Last updated
Tycho exposes data through two mechanisms, the RPC and the stream. The RPC provides you access to static data, like the state of a component at a given block or extended information about the tokens it has found. For streaming data, we recommend using the Tycho Client. This guide documents the RPC interfaces.
Tycho stream provides only the token addresses that Protocol Components use. If you require more token information, you can request using Tycho RPC's POST /v1/tokensendpoint. This service allows filtering by both quality and activity.
The quality rating system helps you quickly assess token's specific properties:
100: Normal ERC-20 Token behavior
75: Rebasing token
50: Fee-on-transfer token
10: Token analysis failed at first detection
5: Token analysis failed multiple times (after creation)
0: Failed to extract attributes, like Decimal or Symbol
The Token Quality Analysis was developed to aid Tycho Simulation in filtering out tokens that behave differently from standard ERC-20 Tokens. The analysis is under constant improvement and can provide wrong information.
This section documents Tycho's RPC API. Full swagger docs are available at: https://tycho-beta.propellerheads.xyz/docs/
This endpoint retrieves the state of contracts within a specific execution environment. If no
contract ids are given, all contracts are returned. Note that protocol_system
is not a filter;
it's a way to specify the protocol system associated with the contracts requested and is used to
ensure that the correct extractor's block status is used when querying the database. If omitted,
the block status will be determined by a random extractor, which could be risky if the extractor
is out of sync. Filtering by protocol system is not currently supported on this endpoint and
should be done client side.
ethereum
, starknet
, zksync
, arbitrum
, base
The version of the requested state, given as either a timestamp or a block.
If block is provided, the state at that exact block is returned. Will error if the block has not been processed yet. If timestamp is provided, the state at the latest block before that timestamp is returned. Defaults to the current time.
This endpoint retrieves components within a specific execution environment, filtered by various criteria.
ethereum
, starknet
, zksync
, arbitrum
, base
The minimum TVL of the protocol components to return, denoted in the chain's native token.
This endpoint retrieves the state of protocols within a specific execution environment.
ethereum
, starknet
, zksync
, arbitrum
, base
Whether to include account balances in the response. Defaults to true.
The version of the requested state, given as either a timestamp or a block.
If block is provided, the state at that exact block is returned. Will error if the block has not been processed yet. If timestamp is provided, the state at the latest block before that timestamp is returned. Defaults to the current time.
This endpoint retrieves tokens for a specific execution environment, filtered by various criteria. The tokens are returned in a paginated format.
ethereum
, starknet
, zksync
, arbitrum
, base
Quality is between 0-100, where: