Skip to content

Market Data

All endpoints on this page are GET requests with no parameters, relative to the base URLs. Examples below use testnet; swap in the mainnet base URL for production.

Tokens Info

GET /tokens/info

Returns every token known to Cantex, including tokens that are not currently tradable.

curl -sS "https://api.testnet.cantex.io/v1/public/tokens/info"
{
  "tokens": [
    {
      "info": {
        "instrument_admin": "DSO::1220f22a8b8f2d813c25b9a684dc4dd52b532a0174d8e73a13cdf2baabfff7518337",
        "instrument_id": "Amulet",
        "instrument_name": "Canton Coin",
        "instrument_symbol": "CC"
      }
    }
  ]
}

The instrument_admin / instrument_id pair is how you reference a token in every other endpoint, including Connect quotes.

Swap Info

GET /swap/info

Returns the tokens that are currently tradable (i.e. present in at least one live pool) and the instrument used for network fees.

curl -sS "https://api.testnet.cantex.io/v1/public/swap/info"
{
  "data": {
    "fees": {
      "network_fee": {
        "instrument_admin": "DSO::1220f22a8b8f2d813c25b9a684dc4dd52b532a0174d8e73a13cdf2baabfff7518337",
        "instrument_id": "Amulet"
      }
    },
    "tokens": [
      {
        "instrument_admin": "DSO::1220f22a8b8f2d813c25b9a684dc4dd52b532a0174d8e73a13cdf2baabfff7518337",
        "instrument_id": "Amulet",
        "instrument_name": "Canton Coin",
        "instrument_symbol": "CC"
      }
    ],
    "updated_at": "2026-08-20T12:34:56.789012+00:00"
  }
}

This response is cached for several minutes; a newly added pool can take a few minutes to show up here.

Markets Info

GET /markets/info

Returns the list of market symbols, the candle periods available, and the websocket endpoint and channel names for streaming ticker and candle data.

curl -sS "https://api.testnet.cantex.io/v1/public/markets/info"
{
  "data": {
    "updated_at": "2026-08-20T12:34:56.789012+00:00",
    "websocket": {
      "endpoint": "/v1/ws/public",
      "channel_formats": {
        "ticker": "market.<SYMBOL>.ticker",
        "candles": "market.<SYMBOL>.candles.<PERIOD>"
      }
    },
    "candle_periods": [60, 300, 600, 3600],
    "markets": [
      {
        "symbol": "BTC-USDC",
        "source": "external",
        "kinds": ["ticker", "candles"],
        "channels": {
          "ticker": "market.BTC-USDC.ticker",
          "candles": [
            "market.BTC-USDC.candles.60",
            "market.BTC-USDC.candles.300",
            "market.BTC-USDC.candles.600",
            "market.BTC-USDC.candles.3600"
          ]
        }
      },
      {
        "symbol": "CC-USDCX",
        "source": "cantex",
        "kinds": ["ticker", "candles"],
        "channels": {
          "ticker": "market.CC-USDCX.ticker",
          "candles": [
            "market.CC-USDCX.candles.60",
            "market.CC-USDCX.candles.300",
            "market.CC-USDCX.candles.600",
            "market.CC-USDCX.candles.3600"
          ]
        }
      }
    ]
  }
}
  • source is "cantex" for markets derived from Cantex pools and "external" for reference price streams (e.g. BTC-USDC, ETH-USDC, CC-USDC).
  • candle_periods are in seconds (1m, 5m, 10m, 1h).
  • Symbols are <BASE>-<QUOTE> in upper case, e.g. CC-USDCX, CETH-CC.

Info

The websocket channels listed here are served on the public websocket at /v1/ws/public. Documentation for subscribing to these streams is coming soon.

Exchange Info

GET /exchange/info

Returns the current fee schedule and exchange policy.

curl -sS "https://api.testnet.cantex.io/v1/public/exchange/info"
{
  "data": {
    "updated_at": "2026-08-20T12:34:56.789012+00:00",
    "fees": {
      "transfer": {
        "amount": "1",
        "instrument_admin": "DSO::1220f22a8b8f2d813c25b9a684dc4dd52b532a0174d8e73a13cdf2baabfff7518337",
        "instrument_id": "Amulet"
      },
      "allocation": {
        "amount": "0",
        "instrument_admin": "DSO::1220f22a8b8f2d813c25b9a684dc4dd52b532a0174d8e73a13cdf2baabfff7518337",
        "instrument_id": "Amulet"
      }
    },
    "policy": {
      "free_transfers_per_day": 1,
      "min_recommended_cc_balance": "10",
      "min_swap_amount_for_fee_waiver": "1000",
      "min_swap_amount_size_cc": "10",
      "min_connect_swap_amount_size_cc": "50",
      "need_invite_code": false
    }
  }
}
  • fees are denominated in the listed instrument (CC).
  • min_swap_amount_size_cc is the minimum swap size, and min_swap_amount_for_fee_waiver is the size (both in CC or CC-equivalent) above which the network fee is waived.
  • min_connect_swap_amount_size_cc is the minimum size for a Connect swap, in CC or CC-equivalent.
  • free_transfers_per_day is the number of free transfers (withdrawals) per day.
  • need_invite_code tells you whether new account creation currently requires an invite code.

Fee values and policy can change; always use the values from this endpoint rather than hard-coding them.

Pools Info

GET /pools/info

Returns the liquidity pools currently available.

curl -sS "https://api.testnet.cantex.io/v1/public/pools/info"
{
  "pools": [
    {
      "contract_id": "…",
      "pool_id": "…",
      "token_a_instrument_id": "Amulet",
      "token_a_instrument_admin": "DSO::1220f22a8b8f2d813c25b9a684dc4dd52b532a0174d8e73a13cdf2baabfff7518337",
      "token_b_instrument_id": "USDCx",
      "token_b_instrument_admin": "decentralized-usdc-interchain-rep::122049e2af8a725bd19759320fc83c638e7718973eac189d8f201309c512d1ffec61",
      "fee_rate": "0.003",
      "admin_fee_share": "…"
    }
  ]
}

fee_rate is the pool's swap fee as a fraction (e.g. 0.003 = 0.30%).

Stats

GET /stats

Returns exchange-wide statistics: swap counts and volume, a 30-day volume chart, total value locked and active trader counts.

curl -sS "https://api.testnet.cantex.io/v1/public/stats"
{
  "stats": {
    "swaps": {
      "count_1h": 42,
      "cc_volume_1h": "12345.67",
      "count_24h": 980,
      "cc_volume_24h": "234567.89",
      "count_7d": 6543,
      "cc_volume_7d": "1234567.89",
      "count_30d": 25000,
      "cc_volume_30d": "4567890.12"
    },
    "swap_performance": {
      "chart_data": [{ "seconds": 2, "count": 2 }],
      "avg_speed": 6.2,
      "consistency": 2.8,
      "fastest": 2.0
    },
    "chart_volume": [
      { "day_bucket": "2026-08-19T00:00:00+00:00", "cc_volume_total": "98765.43" }
    ],
    "pool_tvl": { "tvl_cc": "1234567.89" },
    "active_traders": { "count_90d": 1234 }
  }
}
  • Volumes (cc_volume_*, tvl_cc) are denominated in CC.
  • chart_volume is daily CC volume over the last 30 days.
  • active_traders.count_90d is the number of unique traders over the last 90 days.