API
Last updated
Was this helpful?
Last updated
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.
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.
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/
Get a list of all token information (without price information)
GET /token-list HTTP/1.1
Host: api.muesliswap.com
Accept: */*
OK
No content
Get a list of tokens, each with basic token info and basic price information
GET /list HTTP/1.1
Host: api.muesliswap.com
Accept: */*
OK
No content
Get the 'best' price for a certain token pair. We will use the biggest available market to determine this price.
4d494c4b
8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa
GET /price HTTP/1.1
Host: api.muesliswap.com
Accept: */*
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 the last trades for a certain token pair
4d494c4b
8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa
GET /trades HTTP/1.1
Host: api.muesliswap.com
Accept: */*
OK
No content
Get a directional orderbook for a certain token pair.
8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa
4d494c4b
GET /orderbook HTTP/1.1
Host: api.muesliswap.com
Accept: */*
OK
No content
Get historical chart data. Contains price and volume data.
4d494c4b
8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa
1h
Possible values: GET /charts/price HTTP/1.1
Host: api.muesliswap.com
Accept: */*
OK
No content
Get available liquidity pools
y
Possible values: .
8a1cfae21368b8bebbbed9800fec304e95cce39a2a57dc35e2e3ebaa.4d494c4b
muesliswap_v2,minswap,muesliswap
GET /liquidity/pools HTTP/1.1
Host: api.muesliswap.com
Accept: */*
OK
No content
Get all myield pools
GET /staking/myield-pools HTTP/1.1
Host: api.muesliswap.com
Accept: */*
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 all MILK pools
GET /staking/token-pools HTTP/1.1
Host: api.muesliswap.com
Accept: */*
OK
No content
Get all farms
GET /staking/farming-pools HTTP/1.1
Host: api.muesliswap.com
Accept: */*
OK
No content
Get open, closed or canceled Muesliswap orders
n
Possible values: n
Possible values: y
Possible values: cf391390f15b02acf7b1ce322bcddaa6625ac6720bb42d5f9a55c982
n
Possible values: GET /orders/v2 HTTP/1.1
Host: api.muesliswap.com
Accept: */*
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 all open farming positions
cf391390f15b02acf7b1ce322bcddaa6625ac6720bb42d5f9a55c982
GET /staking/farming-open HTTP/1.1
Host: api.muesliswap.com
Accept: */*
OK
No content
Get basic information to figure out all open positions of a certain wallet
cf391390f15b02acf7b1ce322bcddaa6625ac6720bb42d5f9a55c982
019645fedab3763ddc5b0e77d71d041fd9b8d92f40c8fad7327c859e2bcf391390f15b02acf7b1ce322bcddaa6625ac6720bb42d5f9a55c982
GET /open-positions HTTP/1.1
Host: api.muesliswap.com
Accept: */*
OK
No content