Tomo Docs
Tomo Docs
  • Overview
    • Introducing Tomo
    • Tomo's Key Management
  • Tomo SDK
    • TomoEVMKit
      • Quick Start
      • Use with Ethers.js
      • Migration from RainbowKit
      • Migration from Blocknative
      • Internal Wallet Services
      • Supported Chains
    • Tomo Web SDK
      • Quick Start
      • Solana Provider
      • EVM Provider
      • Bitcoin Provider
      • Tron Provider
      • Movement Provider
      • Sui Provider
      • Internal Wallet Services
    • Tomo Telegram SDK
      • Quick Start
      • Wallet Provider
        • EVM Provider
        • Solana Provider
        • Sui Provider (Beta)
        • TON Provider
      • Partners
    • Tomo Enterprise SDK
      • For Babylon
        • Install the SDK
        • Tomo Wallet Provider
        • Bitcoin Provider
        • Cosmos Provider
        • Multiple Connection Mode
        • Integrate Extension Wallet
          • Submit Wallet PR
          • Extend the SDK
          • Q & A
        • Integrate Mobile Wallet
  • TOMO WALLET
    • Tomo Wallets
    • Mobile Wallet
      • Tomo Keys
        • Bonding Curve Explained
        • How to: Tomo Keys
      • TomoID
        • How to: TomoID
        • How to: Connect Instagram
      • Tomo Socials
      • Tomo Android App
      • Tomo iOS App
    • Extension Wallet
      • Developer Manual
        • EVM Integration
        • Bitcoin Integration
      • Example of User Flows
        • Claiming Signet BTC
        • Staking at Testnet
      • Install Link
    • Telegram Wallet
      • Quick Start
      • Chains/Networks
      • User Manual
        • Account Security
        • Gift feature
        • FAQ
        • Transaction
        • Swap
  • ABOUT US
    • Brand Assets
    • Privacy Policy
Powered by GitBook
On this page
  • getTokenByName
  • getTokenDetails
  • getAllTokens
  • getMainstreamTokens
  • getTrendingTokens
  • searchToken
  • getOHLCV
  1. Tomo SDK
  2. Tomo Telegram SDK

Tomo APIs

Tomo APIs provide various functions for developers to interact with open market information.

getTokenByName

Retrieves detailed information about the token of a given token name.

Request Parameters:

  • tokenName (string, required): The name of the token to query.

const tokenDetails = async () => {
  return await fetch('https://apis.tomo.inc/sky/api/socialLogin/teleGram/getByName?tokenName=BTC', {
    method: 'GET'
  }).then(res => res.json());
};

getTokenDetails

Fetches detailed metadata for a token, including its name, symbol, price, and additional information like social links. This is useful for users who want comprehensive data about a particular token.

Request Parameters:

  • address (string, query, required): The contract address of the token.

  • chain (string, query, required): The blockchain on which the token resides (e.g., "eth" for Ethereum).

Example Request:

const queryTokenDetails = async () => {
  return await fetch('https://apis.tomo.inc/cloud/v4/memes-overview?address=0x8290333cef9e6d528dd5618fb97a76f268f3edd4&chain=eth', {
    method: 'GET'
  }).then(res => res.json());
};

getAllTokens

Searches and retrieves all tokens available in the market. The result can be big and take time. Developers can cache it locally for operations like different sorting of all tokens.

const allTokens= async () => {
  return await fetch('https://apis.tomo.inc/sky/api/socialLogin/teleGram/wallet/tokens', {
    method: 'GET'
  }).then(res => res.json());
};

getMainstreamTokens

Fetches detailed information about mainstream tokens like BTC, ETH, SOL, etc.

const getSelectedTokens = async () => {
  return await fetch('https://apis.tomo.inc/sky/api/socialLogin/teleGram/wallet/selectedTokens', {
    method: 'GET'
  }).then(res => res.json());
};

getTrendingTokens

Fetches the trending tokens based on chain activity and user interactions.

const trendingTokens = async () => {
  return await fetch('https://apis.tomo.inc/sky/api/socialLogin/teleGram/wallet/trendingTokens', {
    method: 'GET'
  }).then(res => res.json());
};

searchToken

This API allows users to search for tokens' details in a fuzzy way by providing the keywords in the token name or contract address.

Request Parameters:

  • content (string, query, required): Search keywords such as the address of the token or token name.

  • chain (string, query, optional): The blockchain network on which the token resides (e.g., Ethereum, BSC). If omitted, it will search across all supported chains.

const searchTokens = async () => {
  return await fetch('https://apis.tomo.inc/sky/api/socialLogin/teleGram/wallet/tokens/search?content="&chain=eth', {
    method: 'GET'
  }).then(res => res.json());
};

getOHLCV

Retrieves OHLCV (Open, High, Low, Close, Volume) chart data for a specific token. Used for drawing the K-line of the token.

Request Parameters:

  • tokenName (string, path, required): The name of the token for which the OHLCV data is requested.

  • interval (string, query, required): The time interval for each OHLCV data point. Possible values include:

    • minute

    • five_minute

    • fifteen_minute

    • hour

    • four_hour

Last updated 7 months ago