Access Crypto Market Data APIs on Sui with Birdeye

Birdeye's APIs and WebSockets let builders integrate real-time crypto market data into their DeFi apps.

Access Crypto Market Data APIs on Sui with Birdeye

Birdeye, an onchain crypto trading data aggregator, began integrating Sui data in April, 2024. 

Individual DeFi users will find a wealth of data on Birdeye's homepage, with in-depth information about tokens, trades, and traders’ wallets on major blockchains. 

Through our Birdeye Data Services arm, Birdeye makes its APIs and WebSockets available for projects, including data such as token price and other DeFi metrics. Project builders can take advantage of Birdeye's onchain crypto trading data for decentralized exchanges (DEXes), crypto wallets, crypto trading bots, and other data-driven apps.

Founded in 2022, Birdeye has become the go-to source for onchain crypto trading data, having served  over 28 million retail and professional traders worldwide. It aggregates crypto trading data across over 200 DEXes and AMMs on multiple blockchains including Sui, making it a comprehensive source for accurate price, trade, token, and market data. Through Birdeye Data Services, DEXes, wallets, and trading bots on Sui can access precise crypto trading data APIs and WebSockets. These services let users make better-informed trades with real-time information.

Looking at Birdeye's key APIs, including Price, OHCLV, Token, and Trades, as well as WebSockets, including Price and Trades, you can see how easy it is to make use of this data in a project.

Key APIs and WebSockets for Sui 

Each API outlined here includes useful documentation, a brief description of the endpoint, and parameters to get the appropriate data and configure it for specific uses.

Price APIs

The Price API is available in three endpoints – individual token price, multiple token prices, and price history. 

Price  – Token API

The Token Price endpoint retrieves the current price of a token across different blockchain networks including Sui.

Parameters:

  • Token address (string): The specific address of a token to retrieve historical prices for.
  • check_liquidity (float): The liquidity value to verify the price of a token. 
  • include_liquidity (boolean): The indication of whether the liquidity data is included. If the input is ‘True’: Shows the liquidity number of the token. If the input is ‘False’: Does not show the liquidity number of a token. 

Price – Multiple Tokens API

The Multi Price endpoint facilitates retrieving price updates of multiple tokens in a single API call.

Parameters:

  • list_address (string): A comma-separated list of Solana token addresses to retrieve the current prices for.
  • check_liquidity (float): The liquidity value to verify the price of a token. 
  • include_liquidity (boolean): The indication of whether the liquidity data is included. If the input is ‘True’: Shows the liquidity number of the token. If the input is ‘False’: Does not show the liquidity number of a token. 

Price – Price History API

The Price History endpoint facilitates retrieving historical token prices based on specified parameters, allowing analysis and visualization of price trends over different intervals.

Parameters:

  • address (string): The Sui token address to retrieve historical prices for
  • address_type (string): the type of address provided
  • type (string): the OHCLV interval type
  • time_from (integer): The Unix timestamp for the start of the desired time range.
  • time_to (integer): The Unix timestamp for the end of the desired time range.

OHCLV (real-time candle chart) APIs

OHLCV or real-time candle chart APIs deliver up-to-date Open, High, Low, Close, and Volume data for any token or pair, enabling end-users to visualize price trends better for market analysis and trading decisions. The three available OHCLV endpoints for Sui provide candle charts for an individual token, a specific trading pair, and a base/quote pair.

OHCLV – Token and OHCLV – Pair

The OHLCV – Token endpoint fetches historical OHLCV data for a specific token, while the OHLCV – Pair endpoint retrieves similar data for a trading pair. Both use specified interval types and time ranges for technical analysis and price trend visualization across various blockchain networks, including Sui.

Parameters:

  • Token or trading pair’s token address (string): The token or trading pair address for which OHCLV data is requested.
  • type (string): The interval for the OHCLV data, with available options being 1m, 3m, 5m, 15m, 30m, 1H, 2H, 4H, 6H, 8H, 12H, 1D, 3D, 1W, and 1M.
  • time_from (integer): The Unix timestamp marking the start of the desired time range.
  • time_to (integer): The Unix timestamp marking the end of the desired time range.

OHCLV – Base/Quote

The OHCLV – Base/Quote endpoint retrieves historical OHLCV data for a trading pair using the base and quote token addresses, interval type, and time range specified by Unix timestamps.

Parameters:

  • base_address (string): The Sui address of the base token in the trading pair.
  • quote_address (string): The Sui address of the quote token in the trading pair.
  • type (string): The interval type for OHLCV data (e.g., 15m for 15 minutes).
  • time_from (integer): The Unix timestamp for the start of the desired time range.
  • time_to (integer): The Unix timestamp for the end of the desired time range.

Token APIs

Our Token APIs offer two endpoints: one that pulls a list of tokens and another that provides a deep dive into a single token.

Token – Token List

The Token List endpoint allows you to retrieve a sorted list of tokens with details like market capitalization, trading volume, and price changes by specifying sorting methods, pagination, and blockchain network. This API provides a comprehensive overview of token metrics.

Parameters:

  • sort_by (string): Specifies the attribute to sort the tokens by (e.g., v24hUSD).
  • sort_type (string): Determines the order of sorting, either descending (desc) or ascending (asc).
  • offset (integer): Sets the starting point in the token list for pagination.
  • limit (integer): Defines the maximum number of tokens to display, up to a limit of 50.

Token – Token Overview

Via the Token Overview API, our users can retrieve comprehensive details about a specific token, including metrics, price changes, and trading activity, using its address.

Parameters: 

  • Token address (string): Specifies the token's address for which an overview is requested.

Trades APIs

These APIs provide trading data for a token or a specific trading pair.

Trades – Token

The Trades – Token API retrieves a list of trades for a specific token.

Parameters:

  • Token address (string, required): The address of a token.
  • offset (integer): The offset from which to start fetching transaction data.
  • limit (integer): The maximum number of trades to retrieve data.
  • tx_type (string, required): The type of transaction to retrieve data.

Trades – Pair

The Trades – Pair API provides a list of trades for a specific trading pair or market.

Parameters:

  • All the ones mentioned in the Trades – Token endpoint
  • sort_type (string, required): The order in which transactions should be sorted.

WebSockets

These data sources deliver real-time data about tokens and token pairs, including price changes and transactions.

WebSocket – Price

The SUBSCRIBE_PRICE event lets you stream real-time updates about price changes for tokens or token pairs, allowing subscriptions to update for individual tokens, token pairs, or both. This is useful for tracking price movements and trends from the Birdeye platform. 

You can use this WebSocket to get real-time price updates for:

  • token prices, 
  • pair or market prices, and 
  • prices of multiple tokens/pairs (limit: 100 addresses at once).

WebSocket – Txs

The SUBSCRIBE_TXS event enables streaming real-time updates about token trades, with options to subscribe to transactions for individual tokens, token pairs, or both, aiding in tracking trading activities, transfers, and other pertinent transactions from the Birdeye platform. 

Birdeye Data Services’ customers can access this WebSocket to obtain real-time transaction updates for: 

  • token trades, 
  • pair or market trades, and 
  • trades involving multiple tokens/pairs (limit: 100 addresses at once).

For the full list of supported APIs and beta APIs, check out our API documentation.  

Unified dashboard for easy management

Birdeye's dashboard offers an integrated hub for enterprise partners to manage API keys, subscriptions, and billing, track data usage, and facilitate payments. This dashboard offers a unified interface for streamlined operations and enhanced efficiency.

Birdeye Data Services' Dashboard highlights several key sections for our customers, including API key generation and data usage tracking.

For information on Birdeye Data Services’ plans, check out the pricing section of our API Documentation

Access Sui crypto trading data APIs with Birdeye Data Services

Birdeye Data Services stands poised to facilitate seamless access to precise crypto trading data for products on Sui, fostering innovation and growth within the ecosystem. By offering essential APIs (Price, OHCLV, Token, and Trades) and WebSockets, we empower builders to create robust applications while attracting a broader user base to Sui. 

For trial usage and further inquiries, please reach out to our team using the details on our contact page.