Clients

Tycho Client streams protocol state changes to you.

Tycho Client is available as a Python package and a Rust crate.

Key Features

  • Real-Time Streaming: Access live protocol data with low-latency updates allowing you to stay in sync with the latest protocol changes as they happen.

  • Protocol-Specific Insights: Automatically discover new pools and their tokens as they’re created.

  • Active TVL Filtering: Focus on the most impactful data by setting Total Value Locked (TVL) thresholds. The client actively filters on your behalf, so you receive updates only on the pools that meet your specified thresholds and notices for pools that no longer do.


Getting Started

Ready to dive in? This guide will walk you through the simple steps to set up and use the Tycho Client, whether you prefer the CLI Binary, Rust Crate, or Python Package. Follow along to stream your protocol data.

For a simple, setup-free start: download the latest binary release on GitHub, add it to your PATH, and verify installation with:

tycho-client -V

You should see the Tycho client version displayed. If you need more guidance, refer to our detailed installation instructions.

Now, define the pools you want to track: For example, to track the Uniswap V2 and V3 pools with a minimum value locked of 100 ETH, run:

tycho-client --exchange uniswap_v2 --exchange uniswap_v3 --min-tvl 100 --tycho-url {TYCHO_INDEXER_URL}

Authentication

For services where authentication is required, you can do this securely by setting an environment variable for your token:

export TYCHO_AUTH_TOKEN={your_token}

Or skip secure connections entirely with --no-tls for local setups [coming soon].

Help and More Information

For more details on using the CLI, run:

tycho client --help

Clear, Actionable Data in Real-Time

Tycho emits data in an easy-to-read JSON format. Get granular updates on each block:

  • Snapshots for complete component (or pool) states,

  • Deltas for specific updates, and

  • Removal notices for components that no longer match your filtration criteria.

Each message includes block details to help you stay on track with the latest block data.

For specifics on the message structures and their intended uses, see our tycho-client documentation.


Harness the Power of Tycho's RPC

The client packages above not only stream live data to you, but also provide you access to Tycho’s RPC, where you can query token and protocol data as you need it.

Key Capabilities:

  • s.

  • Token information: Query tokens that Tycho supports, and filter by e.g. days since the token was last traded or token type, so you can quickly identify the assets most relevant to you.

Here's an example demonstrating fetching tokens from Tycho:

use tycho_client::rpc::HttpRPCClient;
use tycho_core::dto::Chain;

let client = HttpRPCClient::new("insert_tycho_url", Some("my_auth_token"));

let tokens = client
    .get_all_tokens(
        Chain::Ethereum,
        Some(51_i32), // min token quality to filter for certain token types
        Some(30_u64), // number of days since last traded
        1000,         // pagination chunk size
    )
    .await
    .unwrap();
    
/// Token quality is between 0-100, where:
///  - 100: Normal token
///  - 75: Rebase token
///  - 50: Fee token
///  - 10: Token analysis failed at creation
///  - 5: Token analysis failed on cronjob (after creation).
///  - 0: Failed to extract decimals onchain

Hosted Tycho: Try Our Beta Service

You don't need to host Tycho yourself.

Get beta access to our hosted Tycho service. Message @tanay_j on Telegram to contact us.


Learn More and Get Started

Ready to dive deeper? For a detailed guide on using Tycho Indexer, including setup and customization options, visit the full documentation in our GitHub repository.

Last updated