Skip to main content
POST
/
api
/
swaps
/
build
Build swap transaction (returns signing-ready payload)
curl --request POST \
  --url https://api.walletsuite.io/api/swaps/build \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "quoteId": "<string>",
  "nonce": 123,
  "priorityFeeMultiplier": "1.2"
}
'
{
  "ok": true,
  "code": "<string>",
  "message": "<string>",
  "data": {
    "srcChain": "<string>",
    "dstChain": "<string>",
    "srcToken": "<string>",
    "dstToken": "<string>",
    "srcAmount": 123,
    "dstAmount": 123,
    "minDstAmount": 123,
    "rawProviderRef": "<string>",
    "expiresAt": "2023-11-07T05:31:56Z",
    "fees": {
      "integratorBps": 123,
      "total": 123,
      "totalBps": 123,
      "integratorAmount": 123,
      "protocolBps": 123,
      "protocolAmount": 123,
      "gasBaseFee": 123,
      "outboundFee": 123,
      "liquidityFee": 123,
      "priceImpactBps": 123,
      "feeAsset": "<string>"
    },
    "warnings": [
      "<string>"
    ],
    "priceImpactBps": 123,
    "estimatedGas": 123,
    "gasUsd": 123,
    "estimatedDurationSec": 123,
    "approvalSpender": "<string>",
    "tx": {
      "chain": "<string>",
      "from": "<string>",
      "to": "<string>",
      "approvalRequired": true,
      "chainId": 123,
      "data": "<string>",
      "valueWei": 123,
      "gasLimit": 123,
      "maxPriorityFeePerGas": 123,
      "maxFeePerGas": 123,
      "gasPrice": 123,
      "nonce": 123,
      "memo": "<string>",
      "approvalSpender": "<string>",
      "approvalToken": "<string>",
      "approvalAmount": 123,
      "solanaTransactionBase64": "<string>",
      "depositAddress": "<string>",
      "depositExpiresAt": "2023-11-07T05:31:56Z"
    },
    "notes": "<string>"
  }
}

Authorizations

x-api-key
string
header
required

API key provided by WalletSuite team

Body

application/json

Build request — finalize a quote into a signing-ready payload.

quoteId
string
required

Quote id returned by /api/swaps/quote.

nonce
integer

Optional EVM account nonce override.

priorityFeeMultiplier
number<double>

Optional EIP-1559 tip multiplier in [0.1, 10.0].

Example:

"1.2"

Response

200 - */*

OK

ok
boolean
required
code
string
required
message
string
required
data
object