Skip to main content

Tokens API

Query the list of tokens available on Kroko DEX, ranked by trading activity.

GET /api/v1/tokens2

Returns the token list ranked by trading activity (total transaction count across V2 pairs and V3 pools).

Parameters

ParameterTypeRequiredDescription
limitnumberNoNumber of tokens to return (1–500, default: 100)

Response

{
  "tokens": [
    {
      "address": "0x2c2Ae87Ba178F48637acAe54B87c3924F544a83e",
      "symbol": "WKAS",
      "name": "Wrapped KAS",
      "decimals": 18,
      "logoURI": "https://..."
    },
    {
      "address": "0xB190a6A7fC2873f1Abf145279eD664348d5Ef630",
      "symbol": "HUB",
      "name": "Hub Token",
      "decimals": 18,
      "logoURI": null
    }
  ]
}
FieldDescription
addressToken contract address (checksummed)
symbolToken ticker symbol
nameFull token name
decimalsNumber of decimal places
logoURIToken icon URL (nullable)

Ranking Logic

Tokens are ranked by total txCount aggregated across all V2 pairs and V3 pools they participate in. Pinned tokens (with admin-set priority) appear first regardless of activity.

GET /api/v1/tokens2/search

Search tokens by symbol or name. Useful for token selector UIs.

Parameters

ParameterTypeRequiredDescription
qstringYesSearch query (case-insensitive)
limitnumberNoMax results (default: 10)

Response

Same format as /api/v1/tokens2. Searches both symbol and name fields using substring matching.

Example

# Search for tokens with "SUN" in the name or symbol
curl "https://dex.kasplex.org/api/v1/tokens2/search?q=SUN&limit=10"
{
  "tokens": [
    {
      "address": "0x1234...",
      "symbol": "SUN",
      "name": "Sun Token",
      "decimals": 18,
      "logoURI": "https://..."
    }
  ]
}

Token Address Discovery

If you have a token contract address but it’s not in the API:
  1. Search by address is not currently supported via the API
  2. Read on-chain: Call symbol(), name(), and decimals() on the ERC-20 contract directly
  3. Import: Contact the team to have the token added to the official list