---
title: "api of fast swap"
method: POST
path: "/v1/sui/order"
---

# api of fast swap

`POST /v1/sui/order`

do fast swap on sui chain

## Request body

- GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesSuiOrderRequest
  - `allowPools` string
  - `baseTokens` string
  - `chainId` string
  - `commission` GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesSuiSuiCommission
    - `commissionDirection` boolean — validate: required commition direction, true means charge source token, false means charge destination token
    - `commissionRate` integer — validate: required commission rate, in bps, e.g. 100 means 1%, 85 means 0.85%
    - `commissionRecipient` string — validate: required commission recipient address
  - `dexes` string
  - `disableSimulate` boolean — validate: optional disable simulate
  - `excludeDexes` string
  - `excludePools` string
  - `gasBudget` integer — validate: optional gasBudget
  - `gasPrice` integer — validate: optional gasPrice
  - `inputAmount` string, required — Amount rename to InputAmount
  - `inputToken` string, required
  - `maxHops` integer
  - `maxSwaps` integer
  - `mockInputCoin` boolean — validate: optional mock input coin, if true, a mock input coin will be used instead of the real coins from userAddress
  - `outputToken` string, required
  - `scene` string
  - `slippageBps` integer — validate: required slippage in bps, e.g. 100 means 1%, 85 means 0.85%
  - `userAddress` string — validate: required

## Response `200`

OK

- GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesSuiResponse
  - `code` integer
  - `data` GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesSuiOrderResponse
    - `blockNumber` integer
    - `chainId` string
    - `commissionDirection` boolean
    - `commissionRate` integer
    - `estimatedGas` integer — TradeType TradeType `json:"tradeType"`
    - `inputAmount` string
    - `inputToken` string
    - `midPrice` string
    - `orderId` string
    - `outputAmount` string
    - `outputToken` string
    - `priceImpactPct` string
    - `routePlans` GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesSuiRouter[]
      - `amount` string, uint256 — validate: required amount of input token to swap
      - `router` string — validate: required router name, in format of "{fromToken} - {toToken}"
      - `subRouters` GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesSuiSubRouter[] — validate: required router pathes
        - `dexes` GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesSuiDexInfo[] — validate: required dexes to be used
          - `dex` string — validate: required dex name
          - `extraInfo` string — validate: required
          - `poolAddress` string — validate: required dex contract address
          - `reverse` boolean — validate: required false, a2b, ture, b2a
          - `weight` integer — validate: required dex weight, 0-10000
        - `fromToken` string — validate: required from token address
        - `toToken` string — validate: required to token address
    - `simulateResult` GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesSuiSuiTransactionBlockResponse
      - `balanceChanges` GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesSuiBalanceChanges[]
        - `amount` string
        - `coinType` string
        - `owner` GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesSuiOwner
          - `AddressOwner` string
      - `checkpoint` string
      - `confirmedLocalExecution` boolean
      - `digest` string
      - `effects` ModelsSuiEffects
        - `created` ModelsOwnedObjectRef[]
          - `owner` unknown
          - `reference` ModelsSuiObjectRef
            - `digest` string
            - `objectId` string
            - `version` integer
        - `deleted` ModelsSuiObjectRef[]
          - `digest` string
          - `objectId` string
          - `version` integer
        - `dependencies` string[]
        - `eventsDigest` string
        - `executedEpoch` string
        - `gasObject` ModelsOwnedObjectRef
          - `owner` unknown
          - `reference` ModelsSuiObjectRef
            - `digest` string
            - `objectId` string
            - `version` integer
        - `gasUsed` ModelsGasCostSummary
          - `computationCost` string
          - `nonRefundableStorageFee` string
          - `storageCost` string
          - `storageRebate` string
        - `messageVersion` string
        - `modifiedAtVersions` ModelsModifiedAtVersions[]
          - `objectId` string
          - `sequenceNumber` string
        - `mutated` ModelsOwnedObjectRef[]
          - `owner` unknown
          - `reference` ModelsSuiObjectRef
            - `digest` string
            - `objectId` string
            - `version` integer
        - `sharedObjects` ModelsSuiObjectRef[]
          - `digest` string
          - `objectId` string
          - `version` integer
        - `status` ModelsExecutionStatus
          - `error` string
          - `status` string
        - `transactionDigest` string
      - `events` ModelsSuiEventResponse[]
        - `bcs` string
        - `id` ModelsEventId
          - `eventSeq` string
          - `txDigest` string
        - `packageId` string
        - `parsedJson` object
        - `sender` string
        - `timestampMs` string
        - `transactionModule` string
        - `type` string
      - `objectChanges` ModelsObjectChange[]
        - `digest` string
        - `modules` string[]
        - `objectId` string
        - `objectType` string
        - `owner` unknown
        - `packageId` string
        - `previousVersion` string
        - `sender` string
        - `type` string
        - `version` string
      - `rawTransaction` string
      - `results` string
      - `timestampMs` string
      - `transaction` ModelsSuiTransactionBlock
        - `data` ModelsSuiTransactionBlockData
          - `gasData` ModelsSuiGasData
            - `budget` string
            - `owner` string — the owner's Sui address
            - `payment` ModelsSuiObjectRef[]
              - …
            - `price` string
          - `messageVersion` string
          - `sender` string
          - `transaction` ModelsSuiTransactionBlockKind
            - `inputs` ModelsSuiCallArg[]
              - …
            - `kind` string
            - `transactions` unknown[]
              - …
        - `txSignatures` string[]
    - `swapTransaction` string
  - `msg` string

## Other responses

- `400` — Invalid input
- `401` — Unauthorized, invalid LM-API-KEY
- `404` — Path not found
- `500` — Internal error

---

[API](https://skmtc.net/liquidmesh/apis/liquid-mesh-quotation-api.md) · [All operations](https://skmtc.net/liquidmesh/apis/liquid-mesh-quotation-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/liquidmesh/liquid-mesh-quotation-api/versions/d84bacd7b13b/schema)
