REST API
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
Front-end developers may use our REST API (https://api.alexgo.io) to access the latest market data on ALEX.
Returns all existing swap pairs with their current volumes and prices in USD.
Successfully returning all existing swaps.
Forbidden
Not found
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 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.
Pool token ID of swap pool.
13
Specifies the offset of data to be returned, default value is 0.
Specifies number of data to be returned, default value is 10.
Successfully returning pool stats.
Forbidden
Not found
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 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.
Pool token ID of swap pool.
13
Specifies the offset of data to be returned, default value is 0.
Specifies number of data to be returned, default value is 10.
Successfully returning volumes.
Forbidden
Not found
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
}
]
}
Pool token ID of swap pool.
13
Specifies the offset of data to be returned, default value is 0.
Specifies number of data to be returned, default value is 10.
Successfully returning volumes
Forbidden
Not found
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 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.
Pool token ID of swap pool.
13
Specifies the offset of data to be returned, default value is 0.
Specifies number of data to be returned, default value is 10.
Successfully returning volumes.
Forbidden
Not found
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 liquidity history for a specific swap pool. Data is provided as a time series, with each entry corresponding to a specific Stacks block height.
Pool token ID of swap pool.
13
Specifies the offset of data to be returned, default value is 0.
Specifies number of data to be returned, default value is 10.
Successfully returning liquidity.
Forbidden
Not found
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
}
]
}
Pool token ID of swap pool.
13
Specifies the offset of data to be returned, default value is 0.
Specifies number of data to be returned, default value is 10.
Successfully returning liquidity
Forbidden
Not found
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'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.
Pool token ID of swap pool.
13
Specifies the offset of data to be returned, default value is 0.
Specifies number of data to be returned, default value is 10.
Successfully returning fee
Forbidden
Not found
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
}
]
}
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.
Successfully returning TVL
Forbidden
Not found
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 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.
The Stacks principal of the token contract.
SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex
Specifies the offset of data to be returned, default value is 0
Specifies number of data to be returned, default value is 10
Successfully returning liquidity
Forbidden
Not found
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 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.
The Stacks principal of the token contract.
age000-governance-token
Successfully returning total supply
Forbidden
Not found
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
}
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.
The unique identifier of the token, which is Stacks principal of the token contract.
SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex
Successfully returning price
Forbidden
Not found
GET /v1/price/{token} HTTP/1.1
Host: api.alexgo.io
Accept: */*
{
"token": "SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex",
"price": 0.03118367,
"syncedBlockHeight": 793308
}
Returns the current price of a specific pool token on the ALEX DEX, along with the block height at which the price was recorded.
Pool token ID of swap pool.
13
Successfully returning Pool token price
Forbidden
Not found
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 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.
Successfully returning all existing pool token stats
Forbidden
Not found
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 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.
The unique identifier of the token, which is Stacks principal of the token contract.
SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex
Specifies number of data to be returned, default value is 10
Specifies the order of block height to be returned, default value is desc
Specifies the end block height of data to be returned
Specifies the start block height of data to be returned
Specifies the offset of data to be returned, default value is 0
Successfully returning price history
Forbidden
Not found
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"
}
]
}
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.
Successfully returning all existing pairs
Forbidden
Not found
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 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.
Successfully returning all markets statistics for the last 24 hours
Forbidden
Not found
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 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.
Unique identifier of the pool, consisting of the token principals of each token delimited by an underscore.
SP2C2YFP12AJZB4MABJBAJ55XECVS7E4PMMZ89YZR.usda-token_SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex
Successfully returning all historical trades of certain ticker
Forbidden
Not found
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 order book for a specific ticker, including all historical trades.
Unique identifier of the pool, consisting of the token principals of each token delimited by an underscore.
ALEX_WSLM
Successfully returning all historical trades of certain ticker
Forbidden
Not found
GET /v1/orderbook/{ticker} HTTP/1.1
Host: api.alexgo.io
Accept: */*
No content
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.
Pool token ID of swap pool.
13
Specifies number of recent block heights to be returned, default value is 1000
Successfully returning all historical trades of certain ticker
Forbidden
Not found
GET /v1/historical_swaps/{pool_token_id} HTTP/1.1
Host: api.alexgo.io
Accept: */*
No content
GET /v2/coin-gecko/pairs HTTP/1.1
Host: api.alexgo.io
Accept: */*
No content
Get all tickers from AMM
GET /v2/coin-gecko/tickers HTTP/1.1
Host: api.alexgo.io
Accept: */*
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
}
]
Get all token pairs from AMM
GET /v1/public/pairs HTTP/1.1
Host: api.alexgo.io
Accept: */*
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 all stats of AMM pools
GET /v1/public/amm-pool-stats HTTP/1.1
Host: api.alexgo.io
Accept: */*
Get all stats of AMM pools
{
"data": [
{
"pool_id": 13,
"target_token": "STX",
"base_token": "SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex",
"tvl": "4800976.56479834",
"apy": "0.017392667325066296"
}
]
}