REST API

Front-end developers may use our REST API (https://api.alexgo.io) to access the latest market data on ALEX.

Pool


Returns all available swap pairs

get

Returns all existing swap pairs with their current volumes and prices in USD.

Responses
200
Successfully returning all existing swaps.
application/json
get
GET /v1/allswaps HTTP/1.1
Host: api.alexgo.io
Accept: */*
{
  "data": [
    {
      "id": 7,
      "base": "token-alex",
      "baseSymbol": "alex",
      "baseId": "SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex",
      "quote": "token-wban",
      "quoteSymbol": "BANANA",
      "quoteId": "SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-wban",
      "baseVolume": 105.45894916044628,
      "quoteVolume": 98.15140304673803,
      "lastBasePriceInUSD": 0.03150216,
      "lastQuotePriceInUSD": 0.005409090542472804
    }
  ]
}

Returns pool stats

get

Returns detailed statistics for a specific swap pool including volumes, fees, liquidity metrics and APR. Data is provided as a time series, with each entry corresponding to a specific Stacks block height.

Path parameters
pool_token_idone ofRequired

Pool token ID of swap pool.

integerOptionalExample: 13
Query parameters
offsetanyOptional

Specifies the offset of data to be returned, default value is 0.

limitanyRequired

Specifies number of data to be returned, default value is 10.

Responses
200
Successfully returning pool stats.
application/json
get
GET /v1/pool_stats/{pool_token_id} HTTP/1.1
Host: api.alexgo.io
Accept: */*
{
  "token": 13,
  "pool_status": [
    {
      "pool_token": 13,
      "block_height": 746617,
      "token_x": "SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-wstx-v2",
      "token_y": "SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex",
      "volume_x_24h": 112443.97784314597,
      "volume_y_24h": 111321.83151559353,
      "volume_24h": 225221.63555752003,
      "volume_x_7d": 772478.6819111536,
      "volume_y_7d": 763925.8164915497,
      "volume_7d": 1548772.3056866901,
      "fee_rebate_x_24h": 83.41996769813575,
      "fee_rebate_y_24h": 196.64898177152597,
      "fee_rebate_24h": 276.89283447830627,
      "fee_rebate_x_7d": 953.7354657850966,
      "fee_rebate_y_7d": 19723.707926126946,
      "fee_rebate_7d": 1909.7699233141293,
      "est_pool_token_price": 1.8974830418148833e-7,
      "liquidity": 4092767.3621235755,
      "total_supply": 4092767.3621156355,
      "apr_7d": 2.433093588672123,
      "burn_block_time": 1741601675,
      "sync_at": "2025-03-10T10:33:32.378+00:00"
    }
  ]
}

Returns daily pool volume

get

Returns 24-hour pool volume history for a specific swap pool. Data is provided as a time series, with each entry corresponding to a specific Stacks block height.

Path parameters
pool_token_idone ofRequired

Pool token ID of swap pool.

integerOptionalExample: 13
Query parameters
offsetanyOptional

Specifies the offset of data to be returned, default value is 0.

limitanyRequired

Specifies number of data to be returned, default value is 10.

Responses
200
Successfully returning volumes.
application/json
get
GET /v1/pool_volume/{pool_token_id} HTTP/1.1
Host: api.alexgo.io
Accept: */*
{
  "token": 13,
  "volume_values": [
    {
      "block_height": 748628,
      "volume_24h": 294318.0656719518
    }
  ]
}

Returns daily volumes of token in time series

get
Path parameters
pool_token_idone ofRequired

Pool token ID of swap pool.

integerOptionalExample: 13
Query parameters
offsetanyOptional

Specifies the offset of data to be returned, default value is 0.

limitanyRequired

Specifies number of data to be returned, default value is 10.

Responses
200
Successfully returning volumes
application/json
get
GET /v1/volume_24h/{pool_token_id} HTTP/1.1
Host: api.alexgo.io
Accept: */*
{
  "token": 13,
  "volume_values": [
    {
      "block_height": 748628,
      "volume_24h": 294318.0656719518
    }
  ]
}

Returns weekly pool volume

get

Returns 7-day pool volume history for a specific swap pool. Data is provided as a time series, with each entry corresponding to a specific Stacks block height.

Path parameters
pool_token_idone ofRequired

Pool token ID of swap pool.

integerOptionalExample: 13
Query parameters
offsetanyOptional

Specifies the offset of data to be returned, default value is 0.

limitanyRequired

Specifies number of data to be returned, default value is 10.

Responses
200
Successfully returning volumes.
application/json
get
GET /v1/volume_7d/{pool_token_id} HTTP/1.1
Host: api.alexgo.io
Accept: */*
{
  "token": 13,
  "volume_values": [
    {
      "block_height": 748811,
      "volume_7d": 1517660.0316130652
    }
  ]
}

Returns pool liquidity

get

Returns liquidity history for a specific swap pool. Data is provided as a time series, with each entry corresponding to a specific Stacks block height.

Path parameters
pool_token_idone ofRequired

Pool token ID of swap pool.

integerOptionalExample: 13
Query parameters
offsetanyOptional

Specifies the offset of data to be returned, default value is 0.

limitanyRequired

Specifies number of data to be returned, default value is 10.

Responses
200
Successfully returning liquidity.
application/json
get
GET /v1/pool_liquidity/{pool_token_id} HTTP/1.1
Host: api.alexgo.io
Accept: */*
{
  "token": 13,
  "liquidity_value": [
    {
      "block_height": 748855,
      "liquidity": 3769712.496803321
    }
  ]
}

Returns liquidity of token in time series

get
Path parameters
pool_token_idone ofRequired

Pool token ID of swap pool.

integerOptionalExample: 13
Query parameters
offsetanyOptional

Specifies the offset of data to be returned, default value is 0.

limitanyRequired

Specifies number of data to be returned, default value is 10.

Responses
200
Successfully returning liquidity
application/json
get
GET /v1/liquidity/{pool_token_id} HTTP/1.1
Host: api.alexgo.io
Accept: */*
{
  "token": 13,
  "liquidity_value": [
    {
      "block_height": 748855,
      "liquidity": 3769712.496803321
    }
  ]
}

Returns pool fee

get

Returns pool's fee rebate history for a specific swap pool. Data is provided as a time series, with each entry corresponding to a specific Stacks block height.

Path parameters
pool_token_idone ofRequired

Pool token ID of swap pool.

integerOptionalExample: 13
Query parameters
offsetanyOptional

Specifies the offset of data to be returned, default value is 0.

limitanyRequired

Specifies number of data to be returned, default value is 10.

Responses
200
Successfully returning fee
application/json
get
GET /v1/fee/{pool_token_id} HTTP/1.1
Host: api.alexgo.io
Accept: */*
{
  "pool_token": 13,
  "fee_value": [
    {
      "block_height": 748936,
      "fee_rebate_24h": 615.3625117185487,
      "fee_rebate_7d": 3173.3596157582247
    }
  ]
}

Stats


Returns total TVL value of ALEX DEX

get

Returns the total value locked (TVL) across all pools on the ALEX DEX. Data is provided as a time series, with each entry corresponding to a specific Stacks block height.

Responses
200
Successfully returning TVL
application/json
get
GET /v1/stats/tvl HTTP/1.1
Host: api.alexgo.io
Accept: */*
{
  "type": "Total TVL in ALEX DEX",
  "lp_token_supply": 16490364.062874101,
  "reserve_pool_value": 15097746.975137029,
  "tvl": 31588111.03801113,
  "block_height": 799443,
  "updated_at": "2025-03-18T13:47:45.249+00:00"
}

Returns token TVL in time series

get

Returns a time series of the total value locked (TVL) for a specific token on the ALEX DEX. The response includes TVL values, block heights, timestamps, and token identifiers for each recorded interval.

Path parameters
tokenone ofRequired

The Stacks principal of the token contract.

stringOptionalExample: SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex
Query parameters
offsetanyOptional

Specifies the offset of data to be returned, default value is 0

limitanyOptional

Specifies number of data to be returned, default value is 10

Responses
200
Successfully returning liquidity
application/json
get
GET /v1/stats/tvl/{token} HTTP/1.1
Host: api.alexgo.io
Accept: */*
[
  {
    "token": "SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex",
    "tvl": 3551330.078772197,
    "block_height": 805148,
    "burn_block_time": 1742389269,
    "sync_at": "2025-03-19T13:04:43.507+00:00"
  }
]

Returns total supply of the queried token

get

Returns the total supply of a specific token on the ALEX DEX. The response includes the token identifier, the total supply value, and the block height at which the total supply was recorded.

Path parameters
tokenone ofRequired

The Stacks principal of the token contract.

stringOptionalExample: age000-governance-token
Responses
200
Successfully returning total supply
application/json
get
GET /v1/stats/total_supply/{token} HTTP/1.1
Host: api.alexgo.io
Accept: */*
{
  "token": "SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex",
  "block_height": 804936,
  "total_supply": 590496986.162147
}

Price


Returns price of token

get

Returns the current price of a specific token along with the block height at which the price was last synchronized. This endpoint provides real-time price data for the requested token.

Path parameters
tokenone ofRequired

The unique identifier of the token, which is Stacks principal of the token contract.

stringOptionalExample: SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex
Responses
200
Successfully returning price
application/json
get
GET /v1/price/{token} HTTP/1.1
Host: api.alexgo.io
Accept: */*
{
  "token": "SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex",
  "price": 0.03118367,
  "syncedBlockHeight": 793308
}

Returns pool token price value of ALEX DEX

get

Returns the current price of a specific pool token on the ALEX DEX, along with the block height at which the price was recorded.

Path parameters
pool_token_idone ofRequired

Pool token ID of swap pool.

integerOptionalExample: 13
Responses
200
Successfully returning Pool token price
application/json
get
GET /v1/pool_token_price/{pool_token_id} HTTP/1.1
Host: api.alexgo.io
Accept: */*
{
  "pool_token": 13,
  "price": 1.8186610911606693e-7,
  "block_height": 799222
}

Returns all existing pool token stats of the ALEX DEX

get

Returns a list of all existing pool token statistics on the ALEX DEX, including details such as token prices, total supply, reserved balances, and the block height at which these statistics were recorded.

Responses
200
Successfully returning all existing pool token stats
application/json
get
GET /v1/pool_token_stats HTTP/1.1
Host: api.alexgo.io
Accept: */*
[
  {
    "id": 13,
    "pool_token": 13,
    "price": 1.881276488329545e-7,
    "total_supply": 21527396262050.875,
    "reserved_balance": 21527396262050.875,
    "block_height": 793384,
    "updated_at": "2025-03-17T13:59:07.028+00:00"
  }
]

Returns price history of token

get

Returns a list of the historical price data for a specific token, providing a time series of average prices. This endpoint supports optional filters for block height ranges, ordering, and pagination.

Path parameters
tokenone ofRequired

The unique identifier of the token, which is Stacks principal of the token contract.

stringOptionalExample: SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex
or
integerOptional
Query parameters
limitanyOptional

Specifies number of data to be returned, default value is 10

order_byanyOptional

Specifies the order of block height to be returned, default value is desc

end_block_heightanyOptional

Specifies the end block height of data to be returned

start_block_heightanyOptional

Specifies the start block height of data to be returned

offsetanyOptional

Specifies the offset of data to be returned, default value is 0

Responses
200
Successfully returning price history
application/json
get
GET /v1/price_history/{token} HTTP/1.1
Host: api.alexgo.io
Accept: */*
{
  "token": "SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex",
  "prices": [
    {
      "avg_price_usd": 0.03131814,
      "block_height": 793335,
      "sync_at": 1742219377,
      "token": "SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex"
    }
  ]
}

DEX


Returns all existing pairs

get

Returns a list of all active trading pairs on the ALEX AMM. Each pair includes the pool ticker (formed by the Stacks principals of the token pair) and the symbols of the base and target tokens.

Responses
200
Successfully returning all existing pairs
application/json
get
GET /v1/pairs HTTP/1.1
Host: api.alexgo.io
Accept: */*
[
  {
    "ticker": "SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.brc20-tx20_SP2XD7417HGPRTREMKF748VNEQPDRR0RMANB7X1NK.token-abtc",
    "base": "brc20-tx20",
    "target": "bridged-btc"
  }
]

Returns all markets statistics for the last 24 hours

get

Returns a list of market statistics for all trading pairs on the ALEX DEX over the last 24 hours. The response includes trading volumes, prices, and other key metrics for each pair.

Responses
200
Successfully returning all markets statistics for the last 24 hours
application/json
get
GET /v1/tickers HTTP/1.1
Host: api.alexgo.io
Accept: */*
[
  {
    "ticker_id": "SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-slunr_stx",
    "pool_id": "SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-amm-swap-pool-v1-1",
    "base_currency": "SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-slunr",
    "target_currency": "stx",
    "base": "sLUNR",
    "target": "STX",
    "last_price": 0.08540716070881907,
    "base_volume": 0.08540716070881907,
    "target_volume": 22589.502469,
    "liquidity_in_usd": 22062.86716874599
  }
]

Returns all markets statistics for a certain ticker

get

Returns detailed market statistics for a specific ticker over the last 24 hours. The response includes trading volumes, prices, and other metrics for the requested trading pair.

Path parameters
ticker_idone ofRequired

Unique identifier of the pool, consisting of the token principals of each token delimited by an underscore.

stringOptionalExample: SP2C2YFP12AJZB4MABJBAJ55XECVS7E4PMMZ89YZR.usda-token_SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex
or
integerOptional
Responses
200
Successfully returning all historical trades of certain ticker
application/json
get
GET /v1/ticker/{ticker_id} HTTP/1.1
Host: api.alexgo.io
Accept: */*
{
  "ticker_id": "SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-slunr_stx",
  "pool_id": "SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-amm-swap-pool-v1-1",
  "base_currency": "SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-slunr",
  "target_currency": "stx",
  "base": "sLUNR",
  "target": "STX",
  "last_price": 0.08540716070881907,
  "base_volume": 0.08540716070881907,
  "target_volume": 22589.502469,
  "liquidity_in_usd": 22062.86716874599
}

Returns the orderbook of a certain ticker

get

Returns the order book for a specific ticker, including all historical trades.

Path parameters
tickerone ofRequired

Unique identifier of the pool, consisting of the token principals of each token delimited by an underscore.

stringOptionalExample: ALEX_WSLM
or
integerOptional
Responses
200
Successfully returning all historical trades of certain ticker
get
GET /v1/orderbook/{ticker} HTTP/1.1
Host: api.alexgo.io
Accept: */*

No content

Returns all existing historical trades

get

Returns a list of all historical trades for a specific pool token on the ALEX DEX. The response includes trade details such as volumes, prices, and timestamps for each recorded trade.

Path parameters
pool_token_idone ofRequired

Pool token ID of swap pool.

integerOptionalExample: 13
Query parameters
limitanyRequired

Specifies number of recent block heights to be returned, default value is 1000

Responses
200
Successfully returning all historical trades of certain ticker
get
GET /v1/historical_swaps/{pool_token_id} HTTP/1.1
Host: api.alexgo.io
Accept: */*

No content

Coin-gecko


get
Responses
200Success
get
GET /v2/coin-gecko/pairs HTTP/1.1
Host: api.alexgo.io
Accept: */*
200Success

No content

get
Responses
200
Get all tickers from AMM
application/json
get
GET /v2/coin-gecko/tickers HTTP/1.1
Host: api.alexgo.io
Accept: */*
200

Get all tickers from AMM

[
  {
    "ticker_id": "SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-slunr_stx",
    "pool_id": "SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-amm-swap-pool-v1-1",
    "base_currency": "SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-slunr",
    "target_currency": "stx",
    "base": "sLUNR",
    "target": "STX",
    "last_price": 0.08540716070881907,
    "base_volume": 0.08540716070881907,
    "target_volume": 22589.502469,
    "liquidity_in_usd": 22062.86716874599
  }
]

Public


get
Responses
200
Get all token pairs from AMM
application/json
get
GET /v1/public/pairs HTTP/1.1
Host: api.alexgo.io
Accept: */*
200

Get all token pairs from AMM

{
  "data": [
    {
      "pool_id": 13,
      "token_x": "SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-wxusd",
      "wrapped_token_x": "SP2TZK01NKDC89J6TA56SA47SDF7RTHYEQ79AAB9A.Wrapped-USD",
      "token_y": "SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-wusda",
      "wrapped_token_y": "SP2C2YFP12AJZB4MABJBAJ55XECVS7E4PMMZ89YZR.usda-token"
    }
  ]
}
get
Responses
200
Get all stats of AMM pools
application/json
get
GET /v1/public/amm-pool-stats HTTP/1.1
Host: api.alexgo.io
Accept: */*
200

Get all stats of AMM pools

{
  "data": [
    {
      "pool_id": 13,
      "target_token": "STX",
      "base_token": "SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex",
      "tvl": "4800976.56479834",
      "apy": "0.017392667325066296"
    }
  ]
}

Last updated

Was this helpful?