Liquidity Pools & Tokens API

This endpoint provides detailed information on liquidity vaults (pools) and tokens.

Endpoint Details

  • URL: GET https://charisma.rocks/api/v0/vaults

  • Method: GET

  • Headers: Content-Type: application/json

  • Body: None required.

Note: Only GET is allowed; other methods return a 405 Method Not Allowed.


Response Structure

The JSON response always has a success flag and a data object:

{
  "success": true,
  "data": {
    "vaults": [ ... ],
    "tokens": [ ... ]
  }
}
  • success: Boolean indicating if the request succeeded.

  • data: Object containing:

    • vaults: An array of liquidity vault objects.

    • tokens: An array of token metadata objects.


Vault Object Schema

Each vault object contains:

  • contractId (String): Unique vault contract identifier.

  • name (String): Name of the vault.

  • symbol (String): Vault token symbol.

  • decimals (Number): Decimal precision.

  • identifier (String): Short vault identifier.

  • description (String): Description of the vault.

  • image (String): URL to the vault’s image.

  • fee (Number): Fee (likely in basis points).

  • liquidity (Array): List of tokens that make up the vault:

    • Each liquidity item has:

      • contractId (String): Token contract ID.

      • identifier (String): Token identifier.

      • name (String): Token name.

      • symbol (String): Token symbol.

      • decimals (Number): Decimal precision.

      • description (String): Token description.

      • image (String): Token image URL.

      • reserves (Number): Token reserves in the pool.

  • supply (Number): Total supply of the vault token.

  • externalPoolId (String): Optional external identifier.

  • engineContractId (String): Optional engine contract ID.


Token Object Schema

Each token object includes:

  • contractId (String): Unique token contract ID.

  • name (String): Token name.

  • symbol (String): Token symbol.

  • decimals (Number): Decimal precision.

  • identifier (String): Short token identifier.

  • description (String): Token description.

  • image (String): URL to the token’s image.


Example Request

curl https://charisma.rocks/api/v0/vaults

Example Response

Below is a truncated sample response:

{
  "success": true,
  "data": {
    "vaults": [
      {
        "contractId": "SP2D5BGGJ956A635JG7CJQ59FTRFRB0893514EZPJ.age-of-empires",
        "name": "Age of Empires",
        "symbol": "AOE",
        "decimals": 6,
        "identifier": "AOE",
        "description": "Liquidity vault for the USDh-CHA trading pair",
        "image": "https://kghatiwehgh3dclz.public.blob.vercel-storage.com/aoe-RaIAEAGz8asYZg95fj2gTX8UKlh4Xm.jpeg",
        "fee": 10000,
        "liquidity": [
          {
            "contractId": "SPN5AKG35QZSK2M8GAMR4AFX45659RJHDW353HSG.usdh-token-v1",
            "identifier": "usdh",
            "name": "Hermetica USDh",
            "symbol": "USDh",
            "decimals": 8,
            "description": "Hermetica USDh",
            "image": "https://assets.hermetica.fi/usdh_logo.svg",
            "reserves": 561983632
          },
          {
            "contractId": "SP2ZNGJ85ENDY6QRHQ5P2D4FXKGZWCKTB2T0Z55KS.charisma-token",
            "identifier": "charisma",
            "name": "Charisma",
            "symbol": "CHA",
            "decimals": 6,
            "description": "The primary token of the Charisma ecosystem.",
            "image": "https://charisma.rocks/charisma-logo-square.png",
            "reserves": 8906881
          }
        ],
        "supply": 10000000,
        "externalPoolId": "",
        "engineContractId": ""
      }
      // ... other vaults
    ],
    "tokens": [
      {
        "contractId": "SPN5AKG35QZSK2M8GAMR4AFX45659RJHDW353HSG.usdh-token-v1",
        "name": "Hermetica USDh",
        "symbol": "USDh",
        "decimals": 8,
        "identifier": "usdh",
        "description": "Hermetica USDh",
        "image": "https://assets.hermetica.fi/usdh_logo.svg"
      }
      // ... other tokens
    ]
  }
}

Error Responses

  • 405 Method Not Allowed

    Returned if a method other than GET is used.

    { "error": "Method not allowed" }
  • 500 Internal Server Error

    Returned when an error occurs while fetching data.

    { "success": false, "error": "Failed to fetch vault data" }

Last updated