Skip to the content.

Proposed new API design reference for Multi-Chain Coinhall

Pairs API (/dashboard and /pairs)

Current

Returns ALL pairs from ALL chains (terra classic and terra v2, ~1200-1300 total including unverified)

Success response:

Proposed

Returns pairs data based on query parameters sorted by mcap desc (similar to gecko) including usd and quote asset (native) price:

Examples:

/api/v2/pairs/terra1uenpalqlmfaf4efgtqsvzpa3gh898d9h2a232g

/api/v2/pairs?chains=Terra+Classic%2CTerra+2.0&verified=true&start=0&limit=120

/api/v2/pairs?chains=Terra+Classic%2CTerra+2.0&name=classic

Success response:

Historical Prices API (/dashboard and /charts) note: endpoint highly similar to Latest Prices API

Current

Returns historical prices from ALL chains (terra classic and terra v2, 984 total)

Example:

api/charts/terra/prices/historical?pairs=terra18g4d309jykk54l43k58fjqq8h2qdpzgdctxfwf&pairs=terra170lzdyflaamashcqkst23k9ew773dtg67tfu5m

Success response:

Proposed

Move to store historical and latest prices in pairs API

Latest Prices API (/dashboard and /charts)

Current

Returns latest prices from ALL chains (terra classic and terra v2, 984 total)

Example:

api/charts/terra/prices/latest

Success response:

Proposed

Move to store prices in pairs API

Candles API (/charts)

Current

Returns candle data for chart page

Example:

/api/v1/charts/terra/candles?bars=320&from=1654517647&interval=1h&pairAddress=terra1m6ywlgn6wrjuagcmmezzz2a029gtldhey5k552&quoteAsset=uusd&to=1655669647

Success response:

Proposed

Rename API endpoint to /api/v1/charts/:chain_name/candles where chain_name is the name of the chain where the pair address is on