API

REST API endpoints for the Baseline protocol.

Base URL: https://api.baseline.markets

All REST endpoints are versioned under /v1/. Address parameters must be EIP-55 checksummed.

Integration endpoints that expose indexed on-chain data are chain-scoped. Use the :chain path segment to select the network:

ChainAliasChain ID
ethereummainnet1
base—8453
hyperevmhyperliquid999
robinhoodrobinhoodchain4663

Legacy unscoped integration routes are still served as Ethereum mainnet, but chain-scoped routes are preferred.


Protocol metrics

GET /v1/protocol/metrics

Returns current protocol-level reserve metrics grouped by chain and reserve token, plus the Baseline staking metric for $B. Values are raw integer token units; use the returned decimals field to decimalize balances.

GEThttps://api.baseline.markets/v1/protocol/metrics

Response

{
  "reserveMetrics": [
    {
      "chainId": "1",
      "tokenAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
      "symbol": "WETH",
      "decimals": 18,
      "reserveLiquidity": "712116589552028176816",
      "totalDebt": "14788752752346013575496",
      "totalCreatorFees": "5663969771441968974",
      "totalProtocolFees": "3977595860797789422",
      "totalStakingFees": "0",
      "totalVolume": "761102995753535272538"
    }
  ],
  "stakingMetrics": [
    {
      "chainId": "1",
      "tokenAddress": "0x9fDbDE76236998Dc2836FE67A9954eDE456A1D63",
      "symbol": "B",
      "decimals": 18,
      "totalStaked": "29569970092404356096317215"
    }
  ]
}
FieldTypeDescription
reserveMetrics[].chainIdstringEVM chain ID
reserveMetrics[].tokenAddressstringReserve token contract address on the chain
reserveMetrics[].symbolstringReserve token symbol
reserveMetrics[].decimalsnumberReserve token decimals
reserveMetrics[].reserveLiquiditystringTotal reserve liquidity across indexed Baseline pools, in raw reserve token units
reserveMetrics[].totalDebtstringTotal outstanding debt across indexed Baseline pools, in raw reserve token units
reserveMetrics[].totalCreatorFeesstringTotal creator fees accrued, in raw reserve token units
reserveMetrics[].totalProtocolFeesstringTotal protocol fees accrued, in raw reserve token units
reserveMetrics[].totalStakingFeesstringTotal staking fees accrued, in raw reserve token units
reserveMetrics[].totalVolumestringTotal swap volume, in raw reserve token units
stakingMetrics[].chainIdstringEVM chain ID
stakingMetrics[].tokenAddressstringStaked $B token contract address on the chain
stakingMetrics[].symbolstringToken symbol
stakingMetrics[].decimalsnumberToken decimals
stakingMetrics[].totalStakedstringTotal $B amount staked in Baseline, in raw token units

DexScreener adapter

Implements the DexScreener Adapter Spec v1.1. These endpoints are queried directly by DexScreener to index Baseline pools.

GET /v1/dexscreener/:chain/latest-block

Returns the latest indexed block for a chain. DexScreener polls this continuously to determine where to resume indexing.

GEThttps://api.baseline.markets/v1/dexscreener/ethereum/latest-block

Response

{
  "block": {
    "blockNumber": 24922675,
    "blockTimestamp": 1776706931
  }
}
FieldTypeDescription
block.blockNumbernumberLatest indexed block number
block.blockTimestampnumberUnix timestamp (seconds) of that block

GET /v1/dexscreener/:chain/asset

Returns token metadata for a given contract address on a chain.

Query parameters

ParameterTypeRequiredDescription
idstringYesChecksummed token contract address
GEThttps://api.baseline.markets/v1/dexscreener/ethereum/asset?id=0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B

Response

{
  "asset": {
    "id": "0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B",
    "name": "Based Liquidity Token",
    "symbol": "BLT",
    "decimals": 18,
    "totalSupply": "72000000",
    "circulatingSupply": "29569970.092404356096317215"
  }
}
FieldTypeDescription
asset.idstringContract address
asset.namestringToken name
asset.symbolstringToken symbol
asset.decimalsnumberToken decimals (also used to decimalize supply fields)
asset.totalSupplystringDecimalized total supply (omitted if unavailable)
asset.circulatingSupplystringDecimalized circulating supply (omitted if unavailable)

Errors

StatusBodyCause
400{ error: [{ message: "Invalid input: expected string, received undefined" }] }Missing or invalid id parameter
404{ error: "Asset not found" }Address not in the indexed token registry

GET /v1/dexscreener/:chain/pair

Returns pool metadata for a given btoken contract address on a chain.

Query parameters

ParameterTypeRequiredDescription
idstringYesChecksummed btoken contract address
GEThttps://api.baseline.markets/v1/dexscreener/ethereum/pair?id=0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B

Response

{
  "pair": {
    "id": "0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B",
    "dexKey": "baseline",
    "asset0Id": "0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B",
    "asset1Id": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
    "createdAtBlockNumber": 24921292,
    "createdAtBlockTimestamp": 1776690287,
    "createdAtTxnId": "0x7576a097a1680a8ec8a595212572b49e0d9cc8d64cfdcd891f5bc2bce2aa2178",
    "creator": "0xB2A9f3886134e5F6A19a1A87bD62343FE2685c64"
  }
}
FieldTypeDescription
pair.idstringbtoken contract address (the pair identifier)
pair.dexKeystringAlways "baseline"
pair.asset0Idstringbtoken address
pair.asset1IdstringReserve token address (WETH on mainnet)
pair.createdAtBlockNumbernumberPool deploy block
pair.createdAtBlockTimestampnumberPool deploy Unix timestamp
pair.createdAtTxnIdstringPool deploy transaction hash
pair.creatorstringAddress that deployed the pool

Errors

StatusBodyCause
404{ error: "Pair not found" }No pool found for this address

GET /v1/dexscreener/:chain/events

Returns swap events within an inclusive block range for a chain. DexScreener uses this to index historical and live trades.

Query parameters

ParameterTypeRequiredDescription
fromBlocknumberYesStart block (inclusive)
toBlocknumberYesEnd block (inclusive)

Maximum range: 2000 blocks per request.

GEThttps://api.baseline.markets/v1/dexscreener/ethereum/events?fromBlock=24921292&toBlock=24922675

Response

{
  "events": [
    {
      "block": { "blockNumber": 24921350, "blockTimestamp": 1776691000 },
      "eventType": "swap",
      "txnId": "0x7576a097a1680a8ec8a595212572b49e0d9cc8d64cfdcd891f5bc2bce2aa2178",
      "txnIndex": 4,
      "eventIndex": 0,
      "maker": "0xB2A9f3886134e5F6A19a1A87bD62343FE2685c64",
      "pairId": "0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B",
      "asset1In": "0.5",
      "asset0Out": "966424.684",
      "priceNative": "0.00000063",
      "reserves": {
        "asset0": "29569970.09",
        "asset1": "0.61"
      }
    }
  ]
}

Each event is a swap. asset0 is always the btoken; asset1 is always the reserve token.

FieldTypeDescription
eventType"swap"Always "swap"
txnIdstringTransaction hash
txnIndexnumberTransaction order within block
eventIndexnumberEvent order within transaction
makerstringWallet that submitted the transaction
pairIdstringbtoken address
asset1InstringReserve amount in (buy)
asset0Outstringbtoken amount out (buy)
asset0Instringbtoken amount in (sell)
asset1OutstringReserve amount out (sell)
priceNativestringPrice of asset0 quoted in asset1 (decimalized)
reserves.asset0stringPost-swap btoken pool balance
reserves.asset1stringPost-swap reserve pool balance

All amounts are decimalized (amount / 10 ** decimals).

Errors

StatusBodyCause
400{ error: "Block range exceeds max range of 2000" }Range greater than 2000 blocks
400{ error: [{ message: "..." }] }Missing or invalid query parameters

1inch adapter

Same chain routes and indexer shape as the DexScreener adapter (latest-block, asset, pair, events), plus the pool state and quote surface 1inch needs to route Baseline. Chain-scoped routes use the prefix /v1/1inch/:chain/. Unprefixed routes are Ethereum mainnet.

Pair ids on this prefix are the bToken address. That address is the pool key passed into the relay quote functions. Reserves and quote amounts are raw token units (uint256 strings), not decimalized.

Quotes are view calls on the Baseline relay (0xc81Fd894C0acE037d133aF4886550aC8133568E8 on every chain):

  • Sell bToken for the reserve: quoteSellExactIn(bToken, amountIn) returns (amountOut, fee, slippage). amountIn is bToken units.
  • Buy bToken with the reserve: quoteBuyExactIn(bToken, reservesIn) returns (tokensOut, fee, slippage). amountIn on the HTTP quote route is reserve units.

GET /v1/1inch/:chain/latest-block, /asset, /pair, and /events match the DexScreener routes above. /pair returns the bToken address as pair.id with no :bpool suffix.

GET /v1/1inch/:chain/pools

Returns every indexed pool on the chain, with current reserves and the relay calls that quote it.

GEThttps://api.baseline.markets/v1/1inch/ethereum/pools

Response

{
  "quoteContract": "0xc81Fd894C0acE037d133aF4886550aC8133568E8",
  "quotes": {
    "sellExactIn": {
      "function": "quoteSellExactIn",
      "args": ["_bToken", "_amountIn"],
      "returns": ["amountOut_", "feesReceived_", "slippage_"]
    },
    "buyExactIn": {
      "function": "quoteBuyExactIn",
      "args": ["_bToken", "_reservesIn"],
      "returns": ["tokensOut_", "feesReceived_", "slippage_"]
    }
  },
  "pools": [
    {
      "poolAddress": "0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B",
      "uniswapPoolId": "0xabc0000000000000000000000000000000000000000000000000000000000001",
      "bToken": {
        "address": "0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B",
        "name": "Based Liquidity Token",
        "symbol": "BLT",
        "decimals": 18
      },
      "reserveToken": {
        "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
        "name": "Wrapped Ether",
        "symbol": "WETH",
        "decimals": 18
      },
      "reserves": {
        "bToken": "29569970092404356096317215",
        "reserve": "610000000000000000",
        "updatedAtBlock": 24922675,
        "updatedAtTimestamp": 1776706931
      },
      "createdAtBlockNumber": 24921292,
      "createdAtBlockTimestamp": 1776690287,
      "createdAtTxnId": "0x7576a097a1680a8ec8a595212572b49e0d9cc8d64cfdcd891f5bc2bce2aa2178",
      "creator": "0xB2A9f3886134e5F6A19a1A87bD62343FE2685c64"
    }
  ]
}
FieldTypeDescription
quoteContractstringRelay address. All quote and swap calls go here
quotesobjectRelay view functions. First arg is poolAddress
pools[].poolAddressstringbToken address. This is the pool key
pools[].uniswapPoolIdstring | nullUniswap v4 pool id, when a snapshot exists
pools[].bTokenobjectbToken address, name, symbol, decimals
pools[].reserveTokenobjectReserve token address, name, symbol, decimals
pools[].reserves.bTokenstringCurrent bToken liquidity, raw units
pools[].reserves.reservestringCurrent reserve liquidity, raw units
pools[].reservesobject | nullnull until the indexer has a snapshot

GET /v1/1inch/:chain/pool

Returns one pool. Same fields as a pools[] entry, plus quoteContract and quotes.

Query parameters

ParameterTypeRequiredDescription
idstringYesbToken address (the pool address)
GEThttps://api.baseline.markets/v1/1inch/ethereum/pool?id=0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B

Errors

StatusBodyCause
404{ error: "Pool not found" }No indexed pool for this bToken on the chain
400{ error: [{ message: "..." }] }Missing or invalid id

GET /v1/1inch/:chain/quote

Reads quoteSellExactIn or quoteBuyExactIn on the relay and returns the raw result.

Query parameters

ParameterTypeRequiredDescription
idstringYesbToken address (the pool address)
side"buy" | "sell"Yessell quotes bToken in, reserve out. buy quotes reserve in, bToken out
amountInstringYesPositive integer in raw token units. bToken units for sell, reserve units for buy
GEThttps://api.baseline.markets/v1/1inch/ethereum/quote?id=0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B&side=sell&amountIn=1000000000000000000

Response

{
  "poolAddress": "0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B",
  "quoteContract": "0xc81Fd894C0acE037d133aF4886550aC8133568E8",
  "side": "sell",
  "function": "quoteSellExactIn",
  "amountIn": "1000000000000000000",
  "amountOut": "500000000000000000",
  "fee": "1000000000000000",
  "slippage": "0"
}
FieldTypeDescription
functionstringquoteSellExactIn or quoteBuyExactIn
amountOutstringReserve out on a sell, bToken out on a buy. Raw units
feestringFee from the relay quote, raw units
slippagestringSlippage from the relay quote, raw units

Errors

StatusBodyCause
404{ error: "Pool not found" }No indexed pool for this bToken on the chain
400{ error: [{ message: "..." }] }Missing id, side other than buy or sell, or amountIn that is not a positive integer
500{ error: "Internal server error" }Relay quote reverted or the chain client failed

CoinGecko and GeckoTerminal adapter

CoinGecko-related HTTP surfaces on Baseline: a GeckoTerminal-compatible on-chain index (latest-block, asset, pair, events) and a CoinGecko decentralized spot exchange feed (tickers, orderbook, historical_trades). Chain-scoped routes use the prefix /v1/coingecko/:chain/.

GET /v1/coingecko/:chain/latest-block

Returns the latest indexed block for a chain. This value should stay in sync with /events: it is the highest block for which event data is available for range queries.

GEThttps://api.baseline.markets/v1/coingecko/ethereum/latest-block

Response

{
  "block": {
    "blockNumber": 24922675,
    "blockTimestamp": 1776706931
  }
}
FieldTypeDescription
block.blockNumbernumberLatest indexed block number
block.blockTimestampnumberUnix timestamp (seconds) of that block

GET /v1/coingecko/:chain/asset

Returns token metadata for a given contract address on a chain.

Query parameters

ParameterTypeRequiredDescription
idstringYesChecksummed token contract address
GEThttps://api.baseline.markets/v1/coingecko/ethereum/asset?id=0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B

Response

{
  "asset": {
    "id": "0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B",
    "name": "Based Liquidity Token",
    "symbol": "BLT",
    "decimals": 18,
    "totalSupply": "72000000",
    "circulatingSupply": "29569970.092404356096317215"
  }
}
FieldTypeDescription
asset.idstringContract address
asset.namestringToken name
asset.symbolstringToken symbol
asset.decimalsnumberToken decimals (also used to decimalize supply fields)
asset.totalSupplystringDecimalized total supply (omitted if unavailable)
asset.circulatingSupplystringDecimalized circulating supply (omitted if unavailable)

Errors

StatusBodyCause
400{ error: [{ message: "Invalid input: expected string, received undefined" }] }Missing or invalid id parameter
404{ error: "Asset not found" }Address not in the indexed token registry

GET /v1/coingecko/:chain/pair

Returns pool metadata for a given btoken contract address on a chain.

Query parameters

ParameterTypeRequiredDescription
idstringYesChecksummed btoken contract address
GEThttps://api.baseline.markets/v1/coingecko/ethereum/pair?id=0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B

Response

{
  "pair": {
    "id": "0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B",
    "dexKey": "baseline",
    "asset0Id": "0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B",
    "asset1Id": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
    "createdAtBlockNumber": 24921292,
    "createdAtBlockTimestamp": 1776690287,
    "createdAtTxnId": "0x7576a097a1680a8ec8a595212572b49e0d9cc8d64cfdcd891f5bc2bce2aa2178",
    "creator": "0xB2A9f3886134e5F6A19a1A87bD62343FE2685c64"
  }
}
FieldTypeDescription
pair.idstringbtoken contract address (the pair identifier)
pair.dexKeystringAlways "baseline"
pair.asset0Idstringbtoken address
pair.asset1IdstringReserve token address (WETH on mainnet)
pair.createdAtBlockNumbernumberPool deploy block
pair.createdAtBlockTimestampnumberPool deploy Unix timestamp
pair.createdAtTxnIdstringPool deploy transaction hash
pair.creatorstringAddress that deployed the pool

Errors

StatusBodyCause
404{ error: "Pair not found" }No pool found for this address

GET /v1/coingecko/:chain/events

Returns swap events within an inclusive block range for a chain.

Query parameters

ParameterTypeRequiredDescription
fromBlocknumberYesStart block (inclusive)
toBlocknumberYesEnd block (inclusive)

Maximum range: 2000 blocks per request.

GEThttps://api.baseline.markets/v1/coingecko/ethereum/events?fromBlock=24921292&toBlock=24922675

Response

{
  "events": [
    {
      "block": { "blockNumber": 24921350, "blockTimestamp": 1776691000 },
      "eventType": "swap",
      "txnId": "0x7576a097a1680a8ec8a595212572b49e0d9cc8d64cfdcd891f5bc2bce2aa2178",
      "txnIndex": 4,
      "eventIndex": 0,
      "maker": "0xB2A9f3886134e5F6A19a1A87bD62343FE2685c64",
      "pairId": "0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B",
      "asset1In": "0.5",
      "asset0Out": "966424.684",
      "priceNative": "0.00000063",
      "reserves": {
        "asset0": "29569970.09",
        "asset1": "0.61"
      }
    }
  ]
}

Each event is a swap. asset0 is always the btoken; asset1 is always the reserve token.

FieldTypeDescription
eventType"swap"Always "swap"
txnIdstringTransaction hash
txnIndexnumberTransaction order within block
eventIndexnumberEvent order within transaction
makerstringWallet that submitted the transaction
pairIdstringbtoken address
asset1InstringReserve amount in (buy)
asset0Outstringbtoken amount out (buy)
asset0Instringbtoken amount in (sell)
asset1OutstringReserve amount out (sell)
priceNativestringPrice of asset0 quoted in asset1 (decimalized)
reserves.asset0stringPost-swap btoken pool balance
reserves.asset1stringPost-swap reserve pool balance

All amounts are decimalized (amount / 10 ** decimals).

Errors

StatusBodyCause
400{ error: "Block range exceeds max range of 2000" }Range greater than 2000 blocks
400{ error: [{ message: "..." }] }Missing or invalid query parameters

GET /v1/coingecko/:chain/tickers

Returns all active Baseline pools on a chain with current price, volume, and liquidity data. Responses are cached for 30 seconds.

GEThttps://api.baseline.markets/v1/coingecko/ethereum/tickers

Response

[
  {
    "ticker_id": "0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B_0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
    "base_currency": "0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B",
    "target_currency": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
    "pool_id": "0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B",
    "last_price": "0.00000063",
    "base_volume": "966424.68430129",
    "target_volume": "0.61341692",
    "liquidity_in_usd": "31086",
    "high": "0.00000064",
    "low": "0.00000060"
  }
]

ticker_id is formatted as BTOKEN_RESERVE. base_currency is the btoken; target_currency is the reserve asset.


GET /v1/coingecko/:chain/orderbook

Returns an empty orderbook stub. Baseline uses an AMM with no traditional order book.

Query parameters

ParameterTypeRequiredDescription
ticker_idstringYesPair ID in BTOKEN_RESERVE format
GEThttps://api.baseline.markets/v1/coingecko/ethereum/orderbook?ticker_id=0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B_0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

Response

{
  "ticker_id": "0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B_0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
  "timestamp": "1776770625054",
  "bids": [],
  "asks": []
}

GET /v1/coingecko/:chain/historical_trades

Returns historical trades for a pair within an optional time window on a chain.

Query parameters

ParameterTypeRequiredDescription
ticker_idstringYesPair ID in BTOKEN_RESERVE format
type"buy" | "sell"NoFilter by trade direction
limitnumberNoMax trades to return
start_timenumberNoUnix timestamp start (inclusive)
end_timenumberNoUnix timestamp end (inclusive)
GEThttps://api.baseline.markets/v1/coingecko/ethereum/historical_trades?ticker_id=0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B_0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2&limit=1

Response

{
  "buy": [
    {
      "trade_id": "0x7a68e9216c6e238e6388dd67e737e3de92c5c93b:1",
      "price": "0.00000063",
      "base_volume": "966424.68",
      "target_volume": "0.61",
      "trade_timestamp": "1776706931000",
      "type": "buy"
    }
  ],
  "sell": []
}

Points and leaderboard

GET /v1/points/:walletAddress

Returns points summary for a wallet — cumulative all-time points and per-week breakdown.

Path parameters

ParameterTypeDescription
walletAddressstringChecksummed EVM wallet address
GEThttps://api.baseline.markets/v1/points/0x89C6AD1CC1c22c8705670a8600541fEf162e77Cf

Response

{
  "wallet": "0x89C6AD1CC1c22c8705670a8600541fEf162e77Cf",
  "referralPoints": "0",
  "cumulative": {
    "totalPoints": "100000",
    "totalVolumeUsd": "209",
    "rank": 1
  },
  "currentWeek": {
    "weekStart": 1776056400,
    "points": "100000",
    "volumeUsd": "209",
    "rank": 1
  },
  "weeklyHistory": [
    {
      "weekStart": 1776056400,
      "weekEnd": 1776661200,
      "points": "100000",
      "volumeUsd": "209"
    }
  ]
}

GET /v1/leaderboard

Returns the points leaderboard with pagination.

Query parameters

ParameterTypeDefaultDescription
period"all" | "1w""all"All-time or weekly leaderboard
limitnumber10Results per page (max 500)
offsetnumber0Pagination offset
searchstring—Filter by wallet address substring
week_startnumber—Unix timestamp of a specific week start (overrides period)
GEThttps://api.baseline.markets/v1/leaderboard?period=1w&limit=1

Response

{
  "entries": [
    {
      "rank": 1,
      "wallet": "0xe8d6d566c2B9eBBCcb4072ab5FffbD1dfe016721",
      "points": "63935",
      "volumeUsd": "922",
      "weightedVolume": "922",
      "referralWeightedVolume": "0",
      "totalWeightedVolume": "922",
      "breakdown": [
        {
          "btokenAddress": "0x7a68e9216C6e238e6388Dd67E737E3De92C5C93B",
          "btokenSymbol": "BLT",
          "reserveSymbol": "WETH",
          "volumeUsd": 922.08,
          "multiplier": 1,
          "weightedVolume": 922.08
        }
      ],
      "referralCount": 0
    }
  ],
  "totalEntries": 4,
  "totalWeightedVolume": 1442,
  "totalPoints": 100000,
  "totalVolume": 1442
}

GET /v1/leaderboard/weeks

Returns a list of completed weeks with their points pool sizes, ordered most-recent first.

GEThttps://api.baseline.markets/v1/leaderboard/weeks

Response

{
  "weeks": [
    { "week_start": 1776056400, "points_pool": 100000 }
  ]
}