Clypto Documentation
Get API KeyClypto Exchange
  • Welcome to Clypto
  • Getting Started
    • What is Clypto?
    • Why Clypto?
    • Supported Chains and DEX Aggregators, Bridges
  • FAQ
  • Clypto Exchange
    • Overview
    • Wallets
      • How to connect a wallet
    • How to swap
  • Integrate API
    • Overview
    • Get API Key
    • Monetization
    • Integrate SDK
    • API Reference
      • Supported Chains and Providers
      • Utility
      • Quote
      • Swap
  • Resources
    • X (Twitter)
    • Discord
    • Blog
    • GitHub
Powered by GitBook
On this page
Export as PDF
  1. Integrate API
  2. API Reference

Swap

PreviousQuote

Get the optimal and alternative routes with full transaction details.

get

Get the optimal and alternative routes with full transaction details.

Authorizations
Query parameters
srcChainstringRequired

Source chain ID (e.g., bitcoin, solana, 1, 56 )

srcTokenstringRequired

Source token contract address. Use an empty string for native assets.

destChainstringRequired

Destination chain ID (e.g., bitcoin, solana, 1, 56 )

destTokenstringRequired

Destination token contract address. Use an empty string for native assets.

amountstringRequired

Amount of the source token to swap (in base units)

srcAddressstringRequired

Sender wallet address (used for generating transaction data)

destAddressstringRequired

Recipient wallet address (default: same as sender)

slippageBpsnumber · min: 1 · max: 10000Optional

Maximum slippage in basis points (1% = 100 bps). Default behavior is provider-defined.

referrerstringOptional

Referrer wallet address to receive a portion of the trade fee. Requires referralFeeBps to be set.

referralFeeBpsnumber · min: 1 · max: 1000Optional

Referral fee in basis points (max 1000 = 10%). Requires referrer to be specified.

providerstringOptional

Comma-separated list of provider IDs to include in routing (e.g., "thorchain,1inch,0x").

excludeProviderstringOptional

Comma-separated list of provider IDs to exclude from routing (e.g., "thorchain,1inch,0x").

Responses
200
Default Response
application/json
get
GET /v1/swap HTTP/1.1
Host: api.clypto.com
x-api-key: YOUR_API_KEY
Accept: */*
200

Default Response

{
  "srcChain": "text",
  "srcToken": "text",
  "destChain": "text",
  "destToken": "text",
  "slippageBps": 1,
  "srcAmount": "text",
  "srcAddress": "text",
  "destAddress": "text",
  "referrer": "text",
  "referralFeeBps": 1,
  "provider": [
    "text"
  ],
  "excludeProvider": [
    "text"
  ],
  "tokenMeta": {
    "srcToken": {
      "address": "text",
      "chainId": "text",
      "decimals": 1,
      "logoURI": "text",
      "name": "text",
      "symbol": "text"
    },
    "destToken": {
      "address": "text",
      "chainId": "text",
      "decimals": 1,
      "logoURI": "text",
      "name": "text",
      "symbol": "text"
    }
  },
  "bestRoute": {
    "provider": "text",
    "destAmount": "text",
    "minDestAmount": "text",
    "eta": 1,
    "tx": {
      "from": "text",
      "to": "text",
      "data": "text",
      "value": "text",
      "gasPrice": "text",
      "gasRate": "text",
      "gasLimit": "text"
    },
    "meta": {
      "providerLogoURI": "text",
      "explorerUrl": "text",
      "notes": "text",
      "extra": null
    },
    "tags": [
      "Fastest"
    ]
  },
  "routes": [
    {
      "provider": "text",
      "destAmount": "text",
      "minDestAmount": "text",
      "eta": 1,
      "tx": {
        "from": "text",
        "to": "text",
        "data": "text",
        "value": "text",
        "gasPrice": "text",
        "gasRate": "text",
        "gasLimit": "text"
      },
      "meta": {
        "providerLogoURI": "text",
        "explorerUrl": "text",
        "notes": "text",
        "extra": null
      },
      "tags": [
        "Fastest"
      ]
    }
  ]
}