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

# api of fast swap

`POST /v1/sol/order`

do fast swap on solana chain

## Request body

- GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesSolOrderRequest
  - `allowPools` string
  - `baseTokens` string
  - `commission` GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesSolSolCommission
    - `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% commissionRate 不能为0, 如果不需要收取手续费, 则整个Commission结构体不传
    - `commissionRecipient` string — validate: required commission receipient address, base58-encode string
    - `commissionRecipientIsOwner` boolean — validate: optional If the value is true, CommissionRecipient is the owner of ata, default value is false
  - `computeUnitLimit` integer — validate: optional compute unit limit
  - `dexes` string
  - `disableSimulate` boolean — validate: optional disable simulate
  - `excludeDexes` string
  - `excludePools` string
  - `inputAmount` string, required — Amount rename to InputAmount
  - `inputToken` string, required
  - `jitoAccount` string
  - `jitoTips` string
  - `maxHops` integer
  - `maxSwaps` integer
  - `outputToken` string, required
  - `prioritizationFeeLamports` string, uint64 — validate: optional prioritization fee in lamports
  - `showSimulateLogs` boolean — validate: optional show simulate logs
  - `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

- GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesSolResponse
  - `code` integer
  - `data` GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesSolOrderResponse
    - `blockNumber` integer
    - `chainId` string
    - `commissionDirection` boolean
    - `commissionRate` integer
    - `computeUnitLimit` integer
    - `estimatedComputeUnitConsumed` integer
    - `inputAmount` string
    - `inputToken` string
    - `midPrice` string
    - `orderId` string
    - `outputAmount` string
    - `outputToken` string
    - `priceImpactPct` string
    - `prioritizationFeeLamports` string
    - `recentBlockHash` string
    - `routePlans` GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesSolRouter[]
      - `amount` string, uint64 — validate: required amount to be swapped
      - `router` string — validate: required router name, in format of "{fromToken} - {toToken}"
      - `subRouters` GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesSolSubRouter[] — validate: required sub routers for this router plan
        - `dexes` GitToolsfdgNetBeLiquidMeshGatewayPkgRoutingTypesSolDexInfo[] — validate: required weighted dexes for swapping
          - `dex` string — validate: required dex name
          - `extraInfo` string — validate: optional extra info for extension. The string format depends on the dex.
          - `poolAddress` string — validate: required pool address, a base58-encode string
          - `reverse` boolean — validate: optional reverse or not
          - `weight` integer — validate: required dex weight for the amount, in range of (0,100], e.g. 40 means 40% of the amount will be swap by this dex.
        - `fromToken` string — validate: required from token address, a base58-encoded string
        - `toToken` string — validate: required to token address, a base58-encoded string
    - `simulateLogs` 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)
