githubEdit

REST API

Front-end developers may use our REST API (https://api.alexgo.ioarrow-up-right) 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
chevron-right
200

Successfully returning all existing swaps.

application/json
get
/v1/allswaps

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
chevron-right
200

Successfully returning pool stats.

application/json
tokennumberRequired

Pool token identifier

Example: 13
get
/v1/pool_stats/{pool_token_id}

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
chevron-right
200

Successfully returning volumes.

application/json
tokennumberRequired

Pool token identifier

Example: 13
get
/v1/pool_volume/{pool_token_id}

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
chevron-right
200

Successfully returning volumes

application/json
tokennumberRequired

Pool token identifier

Example: 13
get
/v1/volume_24h/{pool_token_id}

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
chevron-right
200

Successfully returning volumes.

application/json
tokennumberRequired

Pool token identifier

Example: 13
get
/v1/volume_7d/{pool_token_id}

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
chevron-right
200

Successfully returning liquidity.

application/json
tokennumberRequired

Pool token identifier

Example: 13
get
/v1/pool_liquidity/{pool_token_id}

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
chevron-right
200

Successfully returning liquidity

application/json
tokennumberRequired

Pool token identifier

Example: 13
get
/v1/liquidity/{pool_token_id}

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
chevron-right
200

Successfully returning fee

application/json
pool_tokennumberRequired

Pool token identifier

Example: 13
get
/v1/fee/{pool_token_id}

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
chevron-right
200

Successfully returning TVL

application/json
typestringRequired

Type of TVL being reported.

Example: Total TVL in ALEX DEX
lp_token_supplynumberRequired

The total supply of liquidity provider tokens.

Example: 16490364.062874101
reserve_pool_valuenumberRequired

The total value of the reserve pool.

Example: 15097746.975137029
tvlnumberRequired

The total value locked (TVL) in the ALEX DEX, combining all pools and reserves.

Example: 31588111.03801113
block_heightnumberRequired

The block height at which the TVL was last recorded.

Example: 799443
updated_atstring · date-timeRequired

The timestamp when the TVL was last updated.

Example: 2025-03-18T13:47:45.249+00:00
get
/v1/stats/tvl

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
chevron-right
200

Successfully returning liquidity

application/json
tokenstringRequired

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

Example: SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex
tvlnumberRequired

The total value locked (TVL) for the token.

Example: 3551330.078772197
block_heightnumberRequired

The block height at which the TVL was recorded.

Example: 805148
burn_block_timenumberRequired

The burn block time when the TVL was recorded.

Example: 1742389269
sync_atstring · date-timeRequired

The timestamp when the TVL was last synchronized.

Example: 2025-03-19T13:04:43.507+00:00
get
/v1/stats/tvl/{token}

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
chevron-right
200

Successfully returning total supply

application/json
tokenstringRequired

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

Example: SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex
block_heightnumberRequired

The block height at which the TVL was recorded.

Example: 804936
total_supplynumberRequired

The total supply of the token.

Example: 590496986.162147
get
/v1/stats/total_supply/{token}

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
chevron-right
200

Successfully returning price

application/json
tokenstringRequired

Contract identifier for token in the pool

Example: SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex
pricenumberRequired

The current price of the token

Example: 0.03118367
syncedBlockHeightnumberRequired

The block height at which the price was synchronized

Example: 793308
get
/v1/price/{token}

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
chevron-right
200

Successfully returning Pool token price

application/json
pool_tokennumberRequired

Pool token identifier

Example: 13
pricenumberRequired

The current price of the pool token

Example: 1.8186610911606693e-7
block_heightnumberRequired

Block height at which the price was recorded

Example: 799222
get
/v1/pool_token_price/{pool_token_id}

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
chevron-right
200

Successfully returning all existing pool token stats

application/json
idnumberRequiredExample: 13
pool_tokenstringRequired

Pool token identifier

Example: 13
pricenumberRequired

The current price of the pool token

Example: 1.881276488329545e-7
total_supplynumberRequired

Total supply of the pool token

Example: 21527396262050.875
reserved_balancenumberRequired

Reserved balance of the pool token

Example: 21527396262050.875
block_heightnumberRequired

Block height at which the stats were recorded

Example: 793384
updated_atstring · date-timeRequired

Timestamp at which the stats were last updated

Example: 2025-03-17T13:59:07.028+00:00
get
/v1/pool_token_stats

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
chevron-right
200

Successfully returning price history

application/json
tokenstringRequired

Contract identifier for token in the pool

Example: SP102V8P0F7JX67ARQ77WEA3D3CFB5XW39REDT0AM.token-alex
get
/v1/price_history/{token}

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
chevron-right
200

Successfully returning all existing pairs

application/json
tickerstringRequired

The unique identifier for the trading pair, combining the base and target currencies.

Example: SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.brc20-tx20_SP2XD7417HGPRTREMKF748VNEQPDRR0RMANB7X1NK.token-abtc
basestringRequired

Contract principal of the base token.

Example: brc20-tx20
targetstringRequired

Target currency of the pair

Example: bridged-btc
get
/v1/pairs

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
chevron-right
200

Successfully returning all markets statistics for the last 24 hours

application/json
ticker_idstringRequired

ticker id with delimiter between different cryptoassets.

Example: SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-slunr_stx
pool_idstringRequired

pool id with delimiter between different cryptoassets.

Example: SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-amm-swap-pool-v1-1
base_currencystringRequiredExample: SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-slunr
target_currencystringRequiredExample: stx
basestringRequired

display name of base currency.

Example: sLUNR
targetstringRequired

display name of target currency.

Example: STX
last_pricenumberRequiredExample: 0.08540716070881907
base_volumenumberRequiredExample: 0.08540716070881907
target_volumenumberRequiredExample: 22589.502469
liquidity_in_usdnumberRequiredExample: 22062.86716874599
get
/v1/tickers

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
chevron-right
200

Successfully returning all historical trades of certain ticker

application/json
ticker_idstringRequired

ticker id with delimiter between different cryptoassets.

Example: SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-slunr_stx
pool_idstringRequired

pool id with delimiter between different cryptoassets.

Example: SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-amm-swap-pool-v1-1
base_currencystringRequiredExample: SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-slunr
target_currencystringRequiredExample: stx
basestringRequired

display name of base currency.

Example: sLUNR
targetstringRequired

display name of target currency.

Example: STX
last_pricenumberRequiredExample: 0.08540716070881907
base_volumenumberRequiredExample: 0.08540716070881907
target_volumenumberRequiredExample: 22589.502469
liquidity_in_usdnumberRequiredExample: 22062.86716874599
get
/v1/ticker/{ticker_id}

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
chevron-right
200

Successfully returning all historical trades of certain ticker

No content

get
/v1/orderbook/{ticker}

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
chevron-right
200

Successfully returning all historical trades of certain ticker

No content

get
/v1/historical_swaps/{pool_token_id}

No content

Coin-gecko


get
Responses
chevron-right
200Success

No content

get
/v2/coin-gecko/pairs
200Success

No content

get
Responses
chevron-right
200

Get all tickers from AMM

application/json
ticker_idstringRequired

ticker id with delimiter between different cryptoassets.

Example: SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-slunr_stx
pool_idstringRequired

pool id with delimiter between different cryptoassets.

Example: SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-amm-swap-pool-v1-1
base_currencystringRequiredExample: SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-slunr
target_currencystringRequiredExample: stx
basestringRequired

display name of base currency.

Example: sLUNR
targetstringRequired

display name of target currency.

Example: STX
last_pricenumberRequiredExample: 0.08540716070881907
base_volumenumberRequiredExample: 0.08540716070881907
target_volumenumberRequiredExample: 22589.502469
liquidity_in_usdnumberRequiredExample: 22062.86716874599
get
/v2/coin-gecko/tickers
200

Get all tickers from AMM

Public


get
Responses
chevron-right
200

Get all token pairs from AMM

application/json
get
/v1/public/pairs
200

Get all token pairs from AMM

get
Responses
chevron-right
200

Get all stats of AMM pools

application/json
get
/v1/public/amm-pool-stats
200

Get all stats of AMM pools

Last updated

Was this helpful?