Markets API

Markets API

Rubicon maintains a CoinGecko-compatible markets API at https://coingecko.rubicon.finance. This endpoint is useful for market data consumers, indexers, and data integrations that need ticker, order book, or historical trade data.

This API is kept as a reference surface for data integrations. For contract integration work, start with Deployments and the Protocol pages.

Endpoints

GoalEndpoint
Market info for all markets over the last 24 hourshttps://coingecko.rubicon.finance/{chainId}/tickers
Current order book depth for a pairhttps://coingecko.rubicon.finance/{chainId}/orderbook?ticker_id={tickerId}&depth={depth}
Historical trade data for a pairhttps://coingecko.rubicon.finance/{chainId}/historical_trades?ticker_id={tickerId}&limit={limit}&start_time={startTime}&end_time={endTime}&type={type}

GET /{chainId}/tickers

Returns 24-hour pricing and volume information for active market pairs on the specified chain.

NameTypeRequiredDescription
chainIdintegerYesEVM chain ID.

Response fields include chain, ticker_id, base_currency, target_currency, last_price, base_volume, target_volume, bid, ask, high, low, pool_id, and liquidity_in_usd.

GET /{chainId}/orderbook

Returns order book information for a market pair.

NameTypeRequiredDescription
chainIdintegerYesEVM chain ID.
ticker_idstringYesPair identifier using token contract addresses, such as 0x..._0x....
depthintegerNoOrder depth. 0 returns full depth. 100 returns 50 bids and 50 asks.

Response fields include ticker_id, timestamp, bids, and asks.

GET /{chainId}/historical_trades

Returns historical completed trades for a market pair.

NameTypeRequiredDescription
chainIdintegerYesEVM chain ID.
ticker_idstringYesPair identifier using token contract addresses, such as 0x..._0x....
limitintegerNoNumber of trades to return. 0 or undefined defaults to 10.
start_timeintegerNoStart time in seconds.
end_timeintegerNoEnd time in seconds.
typestringNoTrade direction filter, such as buy or sell.

Response fields include trade_id, price, base_volume, target_volume, trade_timestamp, and type.

Example

For WETH/USDC on Arbitrum:

const tickerId = "0x82af49447d8a07e3bd95bd0d56f35241523fbab1_0xaf88d065e77c8cc2239327c5edb3a432268e5831";
curl "https://coingecko.rubicon.finance/42161/tickers"
curl "https://coingecko.rubicon.finance/42161/orderbook?ticker_id=0x82af49447d8a07e3bd95bd0d56f35241523fbab1_0xaf88d065e77c8cc2239327c5edb3a432268e5831&depth=100"
curl "https://coingecko.rubicon.finance/42161/historical_trades?ticker_id=0x82af49447d8a07e3bd95bd0d56f35241523fbab1_0xaf88d065e77c8cc2239327c5edb3a432268e5831"