---
title: "api of fast swap"
method: POST
path: "/v1/{networkId}/order"
---

# api of fast swap

`POST /v1/{networkId}/order`

do fast swap on evm chain

## Path parameters

- `networkId` string, required

## Request body

- GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesEvmOrderRequest
  - `allowPools` string
  - `baseTokens` string
  - `bypassChecks` boolean — validate: optional whether or not to open debug mode
  - `chainId` string
  - `commission` GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesEvmCommission
    - `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
  - `disableRFQ` boolean — validate: optional
  - `disableSimulate` boolean — validate: optional whether or not to disable simulate
  - `excludeDexes` string
  - `excludePools` string
  - `fourmemeCustomizedInfo` GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesEvmFourmemeCustomizedInfo
    - `expiredTime` integer
    - `signature` string
  - `inputAmount` string, required — Amount rename to InputAmount
  - `inputToken` string, required
  - `maxHops` integer
  - `maxSwaps` integer
  - `outputToken` string, required
  - `receiver` string — validate: optional receiver address
  - `slippageBps` integer — validate: required slippage in bps, e.g. 100 means 1%, 85 means 0.85%
  - `userAddress` string — validate: required user address in base58

## Response `200`

OK

- GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesEvmResponse
  - `code` integer
  - `data` GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesEvmOrderResponse
    - `blockNumber` integer
    - `callMsg` GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesEvmCallMsg
      - `data` string — validate: required input data, usually an ABI-encoded contract method invocation
      - `from` string — validate: required the sender of the 'transaction', an EIP55-compliant hex string representation of the go-ethereum address.
      - `to` string — validate: required the destination contract (nil for contract creation), an EIP55-compliant hex string representation of the go-ethereum address.
      - `value` string, 0x0 — validate: required amount of wei sent along with the call, as a hexadecimal string.
    - `chainId` string
    - `commissionDirection` boolean
    - `commissionRate` integer
    - `estimatedGas` integer
    - `expiryTimestamp` integer
    - `inputAmount` string
    - `inputToken` string
    - `midPrice` string
    - `orderId` string
    - `outputAmount` string
    - `outputToken` string
    - `priceImpactPct` string
    - `routePlans` GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesEvmRouter[]
      - `amount` string, uint256 — validate: required amount of input token to swap
      - `router` string — validate: required router address
      - `subRouters` GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesEvmSubRouter[] — validate: required router pathes
        - `dexes` GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesEvmDexInfo[] — validate: required dexes to be used
          - `dex` string — validate: required dex name
          - `extraInfo` string — validate: required 根据Dex判断是哪种类型的pool 决定如何解析传入的ExtraInfo v3传入pool fee 转uint24 用于校验， pancakeStableSwap传入i，j（uint256)，代表fromToken toToken在池子中的索引, 可用逗号隔开，传入两个数值, stableSwap先不用考虑
          - `poolAddress` string — validate: required dex contract address
          - `reverse` boolean — validate: required 确定买卖方向 true, sellQuote, false sellBase
          - `weight` integer — validate: required dex weight, 0-100
        - `fromToken` string — validate: required from token address
        - `toToken` string — validate: required to token address
    - `tradeType` 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)
