STX.CITY Documentation
  • 🏙️Welcome to STXCITY
  • Features
    • 💡Deploy Token
      • 🧑‍🔧Update token metadata
      • 🔥Burn token
    • 🎁Airdrop Token
    • 💸Listing Token
    • 📈Portfolio
    • 🤖Swap Bot Notification
  • Bonding Curve
    • ❓How does it work?
    • ⚡How to Create a Bonding Curve Token
    • ⚡Deploy incomplete dex
    • 🧑‍🏫Technical explanation
    • 🔐Audited & Secured Contract
  • API
    • Get Bonding Curve List
    • Search tokens
    • Analytics
    • Get All Deployed Tokens
  • Support
    • 💰Pricing
    • ❓Frequently Asked Questions
Powered by GitBook
On this page
  • Query Parameters
  • Response
  • Usage Scenarios

Was this helpful?

  1. API

Search tokens

Overview

The Search Tokens API allows users to retrieve information about deployed tokens and bonding curve tokens based on various search criteria. It supports fetching specific tokens, searching by keywords, or retrieving the top entries when no criteria are provided.

Query Parameters

  • keyword (optional): A string to search for in the token's name, symbol, or description.

  • token_contract (optional): A specific token contract to fetch detailed information.

Response

The API returns a JSON object containing the following fields:

Success Response

  • Status Code: 200 OK

  • Response Body:

    {
      "ads_tokens": [ /* Array of ads tokens */ ],
      "bonding_curve": [ /* Array of bonding curve tokens */ ],
      "normal": [ /* Array of normal deployed tokens */ ]
    }

Error Response

  • Status Code: 405 Method Not Allowed

  • Response Body:

    {
      "error": "Error message"
    }

Usage Scenarios

1. Fetching Specific Token

To fetch a specific token using its contract:

GET /api/searchTokens?token_contract=<TOKEN_CONTRACT>

2. Searching by Keyword

To search for tokens using a keyword:

GET /api/searchTokens?keyword=<SEARCH_KEYWORD>

PreviousGet Bonding Curve ListNextAnalytics

Last updated 8 months ago

Was this helpful?