MuesliSwap
Search…
API
to fill ordersMuesliSwap provides a small number of beta API endpoints for querying the state of the DEX. The following is an incomplete list of endpoints, subject to change. Token decimals have to be accounted for by the client, unless explicitely stated.
This API covers both trades through Orderbook contract v1 and v2.

Exchange Endpoints

There are a number of endpoints that align with the specification of Cryptocurrency exchange listings like CoinMarketCap or CoinGecko.

Ticker

The ticker endpoint is to provide a 24-hour pricing and volume summary for each market pair available on the exchange. The quote volume is in ADA.
{
"8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa.MILK_ADA": {
"last_price": 2.09,
"base_volume": 93662,
"quote_volume": 166684.208
},
...
}

Trades

The trades endpoint is to return data on all recently completed trades for a given market pair. The quote volume is in lovelace.
[
{
"trade_id": 49,
"base_volume": 50000000,
"quote_volume": 104500000,
"timestamp": 1642667477,
"type": "buy"
},
{
"trade_id": 50,
"base_volume": 20000000,
"quote_volume": 43000000,
"timestamp": 1642667290,
"type": "buy"
},

Orderbook Data (Contract V2)

The current state of the orderbook can be queried directly from our endpoint. It contains information on what token is traded against which other (where "." denotes ADA), and a list of buy and sell orders. Each order consists of three data points:
  • lvlPerToken The price per token in this offer, in lovelace, rounded to 11 decimal places
  • amount The amount of token to be bought
  • totalLvl The total amount of lovelace to be spent on all tokens to be bought
{
"bidToken": ".",
"askToken": "8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa.MILK",
"buy": [
{
"lvlPerToken": 2100000,
"amount": 1,
"totalLvl": 2100000
},
{
"lvlPerToken": 2100000,
"amount": 1,
"totalLvl": 2100000
},
...
],
"sell": [
{
"lvlPerToken": 2000000,
"amount": 500,
"totalLvl": 1000000000
},
{
"lvlPerToken": 2090000,
"amount": 750,
"totalLvl": 1567500000
},
...
]
}

Historical Data

We provide endpoints for historical data on finalized trades as well as the volume on the exchange.

Price Charts

The price endpoint provides a detailed overview of historical trades as an hourly or daily summary. Each summary starts at 0 minutes into the hour/day respectively and summarizes the following information for the interval. Prices are provided in ADA.
  • open The price of the first trade in the interval
  • close The price of the last trade in the interval
  • timestamp The UNIX timestamp of the beginning of the interval
  • low The lowest price of any trade within the interval
  • high The highest price of any trade within the interval
[
{
"open": "0.64",
"close": "0.65",
"timetamp": 1640075400,
"high": "0.75",
"low": "0.6",
"median": "0.655"
},
{
"open": "0.6599999999999999",
"close": "0.64",
"timetamp": 1640079000,
"high": "0.68",
"low": "0.525",
"median": "0.605"
},

Volume

The volume endpoint provides detailed data on the daily volume of a token. The volume is the sum over all tokens or ADA contained in matched orders during the specified time interval. Each datapoint is specified by three values:
  • time The UNIX timestamp of the beginning of the interval
  • volumeToken The volume of the token involved in token exchanges in the interval
  • volumeAda The volume of ADA involved in token exchanges in the interval
[
{
"time": 1638273600,
"volumeToken": "32059",
"volumeADA": "7364.764999999999"
},
{
"time": 1638360000,
"volumeToken": "51490",
"volumeADA": "11166.83"
},

Community Tools

In this section, we simply highlight certain tools that have been built on top of our API and contract. We take no liability for the quality of these services and do encourage some caution before employing these tools.

Google Sheets

Twitter user @cardanostra wrote a small thread on importing live price feed data into Google Sheets: https://twitter.com/cardanostra/status/1488522351985799173

Coin Overview

Cardanians built a pretty overview on all currently available tokens on the network, including data on the prices and volume powered by the MuesliSwap API: https://cardanoassets.com/

Last Trades

This website shows the most recent trades for featured tokens on the MuesliSwap page: https://yummymuesli.com/
Last modified 3mo ago