Comment on page
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.
There are a number of endpoints that align with the specification of Cryptocurrency exchange listings like CoinMarketCap or CoinGecko.
The summary endpoint is to provide an overview of market data for all tickers and all market pairs on the exchange.
[
{
"trading_pairs": "8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa.MILK_ADA",
"base_currency": "8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa.MILK",
"quote_currency": "ADA",
"last_price": 2.21,
"lowest_ask": 2,
"highest_bid": 2.1,
"base_volume": 93620,
"quote_volume": 166592.808,
"price_change_percent_24h": -2.552204176334094,
"highest_price_24h": 15.01,
"lowest_price_24h": 50.00000000000001
},
...
The ticker endpoint is to provide a 24-hour pricing and volume summary for each market pair available on the exchange.
{
"8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa.MILK_ADA": {
"last_price": 2.09,
"base_volume": 93662,
"quote_volume": 166684.208
},
...
}
The trades endpoint is to return data on all recently completed trades for a given market pair.
[
{
"trade_id": "a160ae1d61933a197c7cbbf61255c866ed75247d5866d2876fd99a93d5d4040417",
"price": 2.09,
"base_volume": 50,
"quote_volume": 104500000,
"timestamp": 1642667477,
"type": "buy"
},
{
"trade_id": "a219f49a0aa7ae925e8d472df8d3505230a85fe01d9d54aa7ad86437446977351",
"price": 2.15,
"base_volume": 20,
"quote_volume": 43000000,
"timestamp": 1642667290,
"type": "buy"
},
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 placesamount
The amount of token to be boughttotalPrice
The total amount of ADA to be spent on all tokens to be bought
{
"fromToken": ".",
"toToken": "8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa.MILK",
"buy": [
{
"price": 2.1,
"amount": 1,
"totalPrice": 2.1
},
{
"price": 2.1,
"amount": 1,
"totalPrice": 2.1
},
...
],
"sell": [
{
"price": 2,
"amount": 500,
"totalPrice": 1000
},
{
"price": 2.09,
"amount": 750,
"totalPrice": 1567.5
},
...
]
}
We provide endpoints for historical data on finalized trades as well as the volume on the exchange.
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 intervalclose
The price of the last trade in the intervaltime
The UNIX timestamp of the beginning of the intervallow
The lowest price of any trade within the intervalhigh
The highest price of any trade within the interval
[
{
"open": "0.64",
"close": "0.65",
"time": 1640075400,
"high": "0.75",
"low": "0.6",
"median": "0.655"
},
{
"open": "0.6599999999999999",
"close": "0.64",
"time": 1640079000,
"high": "0.68",
"low": "0.525",
"median": "0.605"
},
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 intervalvolumeToken
The volume of the token involved in token exchanges in the intervalvolumeAda
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"
},
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.
Twitter user @cardanostra wrote a small thread on importing live price feed data into Google Sheets: https://twitter.com/cardanostra/status/1488522351985799173
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/
This website shows the most recent trades for featured tokens on the MuesliSwap page: https://yummymuesli.com/
Last modified 1yr ago