MuesliSwap
  • Hello!
  • Cardano
    • Introduction
    • Cardano Wallets
    • Token Listing
      • Token Verification
      • Creating a Pool
    • Fee Structure
    • Orderbook
      • Network Load
    • Swaps (AMMs and LPs)
      • Instant Swap
      • Limit Swap
    • Liquidity pools 101
    • Staking
    • Hungry Cows NFT
    • Tokenomics
      • MuesliSwap MILK
      • Muesli Yield Token
      • MuesliSwap SNOW
      • Other tokens
    • Decentralization
      • Matchmakers
    • API
    • Swap Integration
    • FAQ
      • MILK LB Event FAQ
    • MILK Token Migration FAQ
    • Social media & Contact
  • Milkomeda
    • Introduction
    • Getting started
      • Configuring Flint Wallet
      • Configuring MetaMask
      • Obtaining milkADA
    • Providing Liquidity
    • Trading
    • Farming & Staking
    • Smart Contracts
Powered by GitBook
On this page

Was this helpful?

  1. Cardano

API

PreviousMatchmakersNextSwap Integration

Last updated 1 year ago

Was this helpful?

MuesliSwap provides a number of 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.

General

Price

Pools, etc

Wallet Specific

Terms of Use

For private use only. If you are interested in using this API commercially please contact us at contact@muesliswap.com. Moreover, we are applying a fair use policy to our API where we expect a reasonable number of requests.

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

Coin Overview

Last Trades

Twitter user @cardanostra wrote a small thread on importing live price feed data into Google Sheets:

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:

This website shows the most recent trades for featured tokens on the MuesliSwap page:

https://twitter.com/cardanostra/status/1488522351985799173
https://cardanoassets.com/
https://yummymuesli.com/
get

Get a list of all token information (without price information)

Query parameters
base-policy-idstringOptional
base-tokennamestringOptional
Responses
200
OK
get
GET /token-list HTTP/1.1
Host: api.muesliswap.com
Accept: */*
200

OK

No content

get

Get a list of tokens, each with basic token info and basic price information

Query parameters
base-policy-idstringOptional
base-tokennamestringOptional
Responses
200
OK
get
GET /list HTTP/1.1
Host: api.muesliswap.com
Accept: */*
200

OK

No content

get

Get the 'best' price for a certain token pair. We will use the biggest available market to determine this price.

Query parameters
quote-tokennamestringOptionalExample: 4d494c4b
quote-policy-idstringOptionalExample: 8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa
base-policy-idstringOptional
base-tokennamestringOptional
Responses
200
OK
application/json
get
GET /price HTTP/1.1
Host: api.muesliswap.com
Accept: */*
200

OK

{"askPrice":3106433.7287356323,"baseAddress":{"name":"","policyId":""},"baseDecimalPlaces":6,"bidPrice":3068069.491431218,"marketCap":18409843476926.83,"price":3108936.3812528746,"priceChange":{"24h":"2.207904494033208","7d":"-2.5697111428506503"},"quoteAddress":{"name":"4d494c4b","policyId":"8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa"},"quoteDecimalPlaces":0,"volume":{"base":"55802822293","quote":"18085"},"volumeChange":{"base":0,"quote":0}}
get

Get the last trades for a certain token pair

Query parameters
quote-tokennamestringOptionalExample: 4d494c4b
quote-policy-idstringOptionalExample: 8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa
base-policy-idstringOptional
base-tokennamestringOptional
Responses
200
OK
get
GET /trades HTTP/1.1
Host: api.muesliswap.com
Accept: */*
200

OK

No content

get

Get a directional orderbook for a certain token pair.

Query parameters
from-tokennamestringOptional
from-policy-idstringOptional
to-policy-idstringOptionalExample: 8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa
to-tokennamestringOptionalExample: 4d494c4b
Responses
200
OK
get
GET /orderbook HTTP/1.1
Host: api.muesliswap.com
Accept: */*
200

OK

No content

get

Get historical chart data. Contains price and volume data.

Query parameters
quote-tokennamestringOptionalExample: 4d494c4b
quote-policy-idstringOptionalExample: 8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa
base-policy-idstringOptional
intervalstring · enumOptionalExample: 1hPossible values:
base-tokennamestringOptional
Responses
200
OK
get
GET /charts/price HTTP/1.1
Host: api.muesliswap.com
Accept: */*
200

OK

No content

get

Get available liquidity pools

Query parameters
only-verifiedstring · enumOptionalExample: yPossible values:
token-astringOptionalExample: .
token-bstringOptionalExample: 8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa.4d494c4b
providersstringOptionalExample: muesliswap_v2,minswap,muesliswap
Responses
200
OK
get
GET /liquidity/pools HTTP/1.1
Host: api.muesliswap.com
Accept: */*
200

OK

No content

get

Get all myield pools

Responses
200
OK
application/json
Responseobject
get
GET /staking/myield-pools HTTP/1.1
Host: api.muesliswap.com
Accept: */*
200

OK

[{"endTime":null,"hidden":false,"id":"0dc91bf7446011302669dd65be279080f673ff86","remainingRewards":null,"rewardToken":{"address":{"name":"4d564f5543484552","policyId":"a2936e00439913f1ac105c29883c013322360247c409343028b831be"},"categories":["1","2"],"decimalPlaces":6,"description":"MYield staking reward for MuesliSwap DEX. Redeem MILK at the price of 1 ADA by presenting a MILK Voucher. MILK Vouchers are earned by staking 100 MYield tokens for 30 days.","image":"https://tokens.muesliswap.com/static/img/tokens/a2936e00439913f1ac105c29883c013322360247c409343028b831be.4d564f5543484552.png","status":"verified","supply":{"circulating":null,"total":"1000000000000"},"symbol":"MVOUCHER","website":"https://muesliswap.com/MVOUCHER"},"size":null,"stakeToken":{"address":{"name":"4d5949454c44","policyId":"8f9c32977d2bacb87836b64f7811e99734c6368373958da20172afba"},"categories":["1","2"],"decimalPlaces":6,"description":"The official yield farming reward token of MuesliSwap.","image":"https://tokens.muesliswap.com/static/img/tokens/8f9c32977d2bacb87836b64f7811e99734c6368373958da20172afba.4d5949454c44.png","status":"verified","supply":{"circulating":null,"total":"100000000000000"},"symbol":"MYIELD","website":"https://muesliswap.com/MYIELD"},"title":null,"totalStaked":"8167943820055.0"}]
get

Get all MILK pools

Responses
200
OK
get
GET /staking/token-pools HTTP/1.1
Host: api.muesliswap.com
Accept: */*
200

OK

No content

get

Get all farms

Responses
200
OK
get
GET /staking/farming-pools HTTP/1.1
Host: api.muesliswap.com
Accept: */*
200

OK

No content

get

Get open, closed or canceled Muesliswap orders

Query parameters
canceledstring · enumOptionalExample: nPossible values:
matchedstring · enumOptionalExample: nPossible values:
openstring · enumOptionalExample: yPossible values:
stake-key-hashstringOptionalExample: cf391390f15b02acf7b1ce322bcddaa6625ac6720bb42d5f9a55c982
v2_onlystring · enumOptionalExample: nPossible values:
Responses
200
OK
application/json
Responseobject
get
GET /orders/v2 HTTP/1.1
Host: api.muesliswap.com
Accept: */*
200

OK

[{"attachedLvl":"2650000","feeField":2650000,"finalizedAt":null,"fromAmount":"1000000","fromToken":{"address":{"name":"","policyId":""},"categories":[],"decimalPlaces":6,"description":"The token of the Cardano Blockchain","image":"https://static.muesliswap.com/images/tokens/ada.png","onhold":true,"sign":"\u20b3","status":"verified","supply":{"circulating":"34277702082","total":"45000000000"},"symbol":"ADA","website":"https://cardano.org/"},"outputIdx":0,"paidAmount":"0","placedAt":1676634369,"pubKeyHash":"9645fedab3763ddc5b0e77d71d041fd9b8d92f40c8fad7327c859e2b","receivedAmount":"0","scriptVersion":"v4","status":"open","toAmount":"1","toToken":{"address":{"name":"4d494c4b","policyId":"8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa"},"categories":["1","2"],"decimalPlaces":0,"description":"MILK is the utility token powering the MuesliSwap ecosystem.","image":"https://static.muesliswap.com/images/tokens/MILK.png","status":"verified","supply":{"circulating":"5921589","total":"10000000"},"symbol":"MILK","website":"https://ada.muesliswap.com/"},"txHash":"dc0a02506ce402610829c30f5444d45c61c3e02b71aa9955a7aa22b1fac81b37"},{"attachedLvl":"2650000","feeField":2650000,"finalizedAt":null,"fromAmount":"1000000","fromToken":{"address":{"name":"","policyId":""},"categories":[],"decimalPlaces":6,"description":"The token of the Cardano Blockchain","image":"https://static.muesliswap.com/images/tokens/ada.png","onhold":true,"sign":"\u20b3","status":"verified","supply":{"circulating":"34277702082","total":"45000000000"},"symbol":"ADA","website":"https://cardano.org/"},"outputIdx":0,"paidAmount":"0","placedAt":1676634724,"pubKeyHash":"9645fedab3763ddc5b0e77d71d041fd9b8d92f40c8fad7327c859e2b","receivedAmount":"0","scriptVersion":"v4","status":"open","toAmount":"1","toToken":{"address":{"name":"4d494c4b","policyId":"8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa"},"categories":["1","2"],"decimalPlaces":0,"description":"MILK is the utility token powering the MuesliSwap ecosystem.","image":"https://static.muesliswap.com/images/tokens/MILK.png","status":"verified","supply":{"circulating":"5921589","total":"10000000"},"symbol":"MILK","website":"https://ada.muesliswap.com/"},"txHash":"f74bfd704a843676f06c0f71d446e1751b317ca6497ad02bf087bb24a6aa8380"},{"attachedLvl":"2650000","feeField":2650000,"finalizedAt":null,"fromAmount":"1000000","fromToken":{"address":{"name":"","policyId":""},"categories":[],"decimalPlaces":6,"description":"The token of the Cardano Blockchain","image":"https://static.muesliswap.com/images/tokens/ada.png","onhold":true,"sign":"\u20b3","status":"verified","supply":{"circulating":"34277702082","total":"45000000000"},"symbol":"ADA","website":"https://cardano.org/"},"outputIdx":0,"paidAmount":"0","placedAt":1676636165,"pubKeyHash":"9645fedab3763ddc5b0e77d71d041fd9b8d92f40c8fad7327c859e2b","receivedAmount":"0","scriptVersion":"v4","status":"open","toAmount":"1","toToken":{"address":{"name":"4d494c4b","policyId":"8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa"},"categories":["1","2"],"decimalPlaces":0,"description":"MILK is the utility token powering the MuesliSwap ecosystem.","image":"https://static.muesliswap.com/images/tokens/MILK.png","status":"verified","supply":{"circulating":"5921589","total":"10000000"},"symbol":"MILK","website":"https://ada.muesliswap.com/"},"txHash":"d11d31b084774c75c00b5e053bcc3e6f134125bca1d7cc599add3783534938a6"}]
get

Get all open farming positions

Query parameters
skhstringOptionalExample: cf391390f15b02acf7b1ce322bcddaa6625ac6720bb42d5f9a55c982
Responses
200
OK
get
GET /staking/farming-open HTTP/1.1
Host: api.muesliswap.com
Accept: */*
200

OK

No content

get

Get basic information to figure out all open positions of a certain wallet

Query parameters
skhstringOptionalExample: cf391390f15b02acf7b1ce322bcddaa6625ac6720bb42d5f9a55c982
walletstringOptionalExample: 019645fedab3763ddc5b0e77d71d041fd9b8d92f40c8fad7327c859e2bcf391390f15b02acf7b1ce322bcddaa6625ac6720bb42d5f9a55c982
Responses
200
OK
get
GET /open-positions HTTP/1.1
Host: api.muesliswap.com
Accept: */*
200

OK

No content

  • General
  • GET/token-list
  • GET/list
  • Price
  • GET/price
  • GET/trades
  • GET/orderbook
  • GET/charts/price
  • Pools, etc
  • GET/liquidity/pools
  • GET/staking/myield-pools
  • GET/staking/token-pools
  • GET/staking/farming-pools
  • Wallet Specific
  • GET/orders/v2
  • GET/staking/farming-open
  • GET/open-positions
  • Terms of Use
  • Community Tools
  • Google Sheets
  • Coin Overview
  • Last Trades