Mimboku
  • Welcome
  • Mimboku Dex Aggregator
    • Concept
      • Dynamic Trade Routing
    • Developer Guides
      • Aggregator API
      • Contracts
        • Deployed Contracts
        • Test tokens and pools
      • Execute A Swap With The Aggregator API
    • User Guides
      • Choose Token
      • Connect Wallet
      • Transaction Review
  • IP Assets
  • Audit
Powered by GitBook
On this page
  1. Mimboku Dex Aggregator
  2. Developer Guides

Aggregator API

Query Superior Swap Rates

PreviousDeveloper GuidesNextContracts

Last updated 18 days ago

Mimboku Aggregator exposes a set of APIs that allows developers to easily query favourable rates for a swap. This includes additional swap data such as the exact swap route, swap routing parameters, as well as the encoded data to be submitted to the Aggregator Please refer to for examples on how to integrate with our APIs.

Public API

Environment
URL

Story mainnet

Story testnet (Aeneid)

Supported Networks

Chain ID
Network

1315

Aeneid Story Testnet

1514

Story Mainnet

API Documentation

Example Request

curl --request GET 'https://router-dev.mimboku.com/quote?tokenInAddress=0x1514000000000000000000000000000000000000&tokenInChainId=1315&tokenOutAddress=0xd1fa5456186758b84811b929b4d696178fb56ee3&tokenOutChainId=1315&amount=100000000000&type=exactIn&protocols=v2,v3,v3s1'

Protocols

Protocol
Dex

v2

PiperX V2

v3

StoryHunt V3

v3s1

PiperX V3

mixed

Mixed all dexes PiperX V2, V3 and StoryHunt V3

https://router.mimboku.com
https://router-dev.mimboku.com
smart contract.
Execute A Swap With The Aggregator API

Get swap quote

get

Returns the best swap quote based on the provided parameters

Authorizations
Query parameters
tokenInAddressstringRequired

Address of the input token

Example: 0x1514000000000000000000000000000000000000
tokenInChainIdintegerRequired

Chain ID of the input token

Example: 1315
tokenOutAddressstringRequired

Address of the output token

Example: 0xd1fa5456186758b84811b929b4d696178fb56ee3
tokenOutChainIdintegerRequired

Chain ID of the output token

Example: 1315
amountstringRequired

Amount of tokens to swap (in base units)

Example: 100000000000
typestring · enumRequired

Type of quote

Example: exactInPossible values:
protocolsstringOptional

Comma-separated list of protocols to include in the quote, available protocols v2, v3, v3s1, default v3

Example: v2,v3,v3s1,mixed
chainIdinteger · enumOptional

Available Chain IDs:

  • 1315: Aeneid Story Testnet
  • 1514: Story Mainnet
Example: 1315Possible values:
Responses
200
Successful response with quote information
application/json
400
Bad request - invalid parameters
500
Server error
get
GET /quote HTTP/1.1
Host: router-dev.mimboku.com
x-client-id: YOUR_API_KEY
Accept: */*
{
  "blockNumber": "4172602",
  "amount": "10000000000000000000",
  "amountDecimals": "10",
  "quote": "23380751936294484817899",
  "quoteDecimals": "23380.751936294484817899",
  "quoteGasAdjusted": "23380750164225210864289",
  "quoteGasAdjustedDecimals": "23380.750164225210864289",
  "gasUseEstimate": "783000",
  "gasUseEstimateQuote": "1772069273953609",
  "gasUseEstimateQuoteDecimals": "0.001772069273953609",
  "gasUseEstimateUSD": "0.000003",
  "simulationStatus": "UNATTEMPTED",
  "simulationError": false,
  "gasPriceWei": "1000090",
  "route": [
    [
      {
        "type": "v3-pool",
        "address": "0x0bB8Df520A2c1Bf8B50D0a7b326a0Df295069431",
        "routerAddress": "0x1062916B1Be3c034C1dC6C26f682Daf1861A3909",
        "dexName": "Storyhunt V3",
        "tokenIn": {
          "chainId": 1514,
          "decimals": "18",
          "address": "0x1514000000000000000000000000000000000000",
          "symbol": "WIP"
        },
        "tokenOut": {
          "chainId": 1514,
          "decimals": "6",
          "address": "0xF1815bd50389c46847f0Bda824eC8da914045D14",
          "symbol": "USDC.e"
        },
        "fee": "500",
        "liquidity": "135625982168192",
        "sqrtRatioX96": "169947854912589181635456",
        "tickCurrent": "-261061",
        "amountIn": "10000000000000000000",
        "amountOut": "23380751936294484817899"
      }
    ]
  ],
  "routeString": "[V3] 100.00% = WIP -- 0.05% [0x0bB8Df520A2c1Bf8B50D0a7b326a0Df295069431]USDC.e -- 0.3% [0xFD061584f1F88F24fe11Dfa12B9D283afe2FC9F8]BENJI",
  "quoteId": "2674a",
  "hitsCachedRoutes": false,
  "priceImpact": "0.1"
}
  • Public API
  • Supported Networks
  • API Documentation
  • GETGet swap quote
  • Example Request