v1

latestOpenAPI 3.0.32026-07-2495744.0 KB

api of fast swap

do fast swap on sui chain

post/v1/sui/order

Request body

allowPoolsstring
baseTokensstring
chainIdstring
dexesstring
disableSimulateboolean

validate: optional disable simulate

excludeDexesstring
excludePoolsstring
gasBudgetinteger

validate: optional gasBudget

gasPriceinteger

validate: optional gasPrice

inputAmountstring required

Amount rename to InputAmount

inputTokenstring required
maxHopsinteger
maxSwapsinteger
mockInputCoinboolean

validate: optional mock input coin, if true, a mock input coin will be used instead of the real coins from userAddress

outputTokenstring required
scenestring
slippageBpsinteger

validate: required slippage in bps, e.g. 100 means 1%, 85 means 0.85%

userAddressstring

validate: required

Example request

{
  "commission": {
    "commissionRate": 3,
    "commissionRecipient": "BEzfhXANdSW1kM4Yg1nEYTsWSuvyHxmiLy3wbBkdrSrV"
  },
  "gasBudget": 100000000,
  "gasPrice": 1000,
  "slippageBps": 85,
  "userAddress": "BEzfhXANdSW1kM4Yg1nEYTsWSuvyHxmiLy3wbBkdrSrV"
}

Response

OK

codeinteger
msgstring

Example response

{
  "data": {
    "routePlans": [
      {
        "amount": "1000000",
        "router": "0x2::sui::SUI - 0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC",
        "subRouters": [
          {
            "dexes": [
              {
                "dex": "bluefin_spot",
                "poolAddress": "0xa701a909673dbc597e63b4586ace6643c02ac0e118382a78b9a21262a4a2e35d",
                "reverse": true,
                "weight": 10000
              }
            ],
            "fromToken": "0x2::sui::SUI",
            "toToken": "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC"
          }
        ]
      }
    ]
  }
}