Skip to main content
POST
/
v1
/
swaps
/
quote
/
execution
Execute Swap Quote
curl --request POST \
  --url https://sandbox-api.borderless.xyz/v1/swaps/quote/execution \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "cm2c4x3cc000019stwv7um4zl",
  "passphrase": "my-secure-passphrase"
}
'
{
  "id": "<string>",
  "expiredAt": "2023-11-07T05:31:56Z",
  "fromAmountUSD": "<string>",
  "toAmountUSD": "<string>",
  "estimatedCostsUSD": "<string>",
  "steps": [
    {
      "executionDuration": 123,
      "source": {
        "currency": "<string>",
        "chainId": 123,
        "amount": "<string>",
        "amountUSD": "<string>",
        "minAmount": "<string>"
      },
      "destination": {
        "currency": "<string>",
        "chainId": 123,
        "amount": "<string>",
        "amountUSD": "<string>",
        "minAmount": "<string>"
      },
      "estimate": {
        "feeCosts": [
          {
            "amount": "<string>",
            "amountUSD": "<string>",
            "token": "<string>",
            "included": true
          }
        ],
        "gasCosts": [
          {
            "amount": "<string>",
            "amountUSD": "<string>",
            "token": "<string>",
            "included": true
          }
        ]
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
id
string
required

The identifier of the created quote for execution.

Required string length: 25
Example:

"cm2c4x3cc000019stwv7um4zl"

passphrase
string

The passphrase for executing the transaction, if required. Learn more at Transaction Signing Documentation.

Example:

"my-secure-passphrase"

Response

Successfully created Swap transaction data.

id
string
required

Temporary quote ID for execution via /swaps/quote/execution.

expiredAt
string<date-time>
required

Quote expiration date.

fromAmountUSD
string
required

Amount in USD for the source asset.

toAmountUSD
string
required

Amount in USD for the destination asset.

estimatedCostsUSD
string
required

Estimated costs in USD.

steps
object[]
required

Steps for the swap.