MuesliSwap
Search…
API V1
MuesliSwap 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. All priceinformation is given in ADA. Token decimals usually have to be accounted for by the client, unless explicitely stated. Note: This documentation only covers trades through Orderbook v1, which is deprecated as of April 28th 2022.

Exchange Endpoints

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

Summary

The summary endpoint is to provide an overview of market data for all tickers and all market pairs on the exchange.​
1
[
2
{
3
"trading_pairs": "8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa.MILK_ADA",
4
"base_currency": "8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa.MILK",
5
"quote_currency": "ADA",
6
"last_price": 2.21,
7
"lowest_ask": 2,
8
"highest_bid": 2.1,
9
"base_volume": 93620,
10
"quote_volume": 166592.808,
11
"price_change_percent_24h": -2.552204176334094,
12
"highest_price_24h": 15.01,
13
"lowest_price_24h": 50.00000000000001
14
},
15
...
Copied!

Ticker

The ticker endpoint is to provide a 24-hour pricing and volume summary for each market pair available on the exchange.
1
{
2
"8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa.MILK_ADA": {
3
"last_price": 2.09,
4
"base_volume": 93662,
5
"quote_volume": 166684.208
6
},
7
...
8
}
Copied!

Trades

The trades endpoint is to return data on all recently completed trades for a given market pair.
1
[
2
{
3
"trade_id": "a160ae1d61933a197c7cbbf61255c866ed75247d5866d2876fd99a93d5d4040417",
4
"price": 2.09,
5
"base_volume": 50,
6
"quote_volume": 104500000,
7
"timestamp": 1642667477,
8
"type": "buy"
9
},
10
{
11
"trade_id": "a219f49a0aa7ae925e8d472df8d3505230a85fe01d9d54aa7ad86437446977351",
12
"price": 2.15,
13
"base_volume": 20,
14
"quote_volume": 43000000,
15
"timestamp": 1642667290,
16
"type": "buy"
17
},
Copied!

Orderbook Data

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:
  • price The price per token in this offer, rounded to 11 decimal places
  • amount The amount of token to be bought
  • totalPrice The total amount of ADA to be spent on all tokens to be bought
1
{
2
"fromToken": ".",
3
"toToken": "8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa.MILK",
4
"buy": [
5
{
6
"price": 2.1,
7
"amount": 1,
8
"totalPrice": 2.1
9
},
10
{
11
"price": 2.1,
12
"amount": 1,
13
"totalPrice": 2.1
14
},
15
...
16
],
17
"sell": [
18
{
19
"price": 2,
20
"amount": 500,
21
"totalPrice": 1000
22
},
23
{
24
"price": 2.09,
25
"amount": 750,
26
"totalPrice": 1567.5
27
},
28
...
29
]
30
}
Copied!

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.
  • open The price of the first trade in the interval
  • close The price of the last trade in the interval
  • time 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
1
[
2
{
3
"open": "0.64",
4
"close": "0.65",
5
"time": 1640075400,
6
"high": "0.75",
7
"low": "0.6",
8
"median": "0.655"
9
},
10
{
11
"open": "0.6599999999999999",
12
"close": "0.64",
13
"time": 1640079000,
14
"high": "0.68",
15
"low": "0.525",
16
"median": "0.605"
17
},
Copied!

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
1
[
2
{
3
"time": 1638273600,
4
"volumeToken": "32059",
5
"volumeADA": "7364.764999999999"
6
},
7
{
8
"time": 1638360000,
9
"volumeToken": "51490",
10
"volumeADA": "11166.83"
11
},
Copied!

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/