Classic Swaps API

The Swaps API from Classic — 3 operation(s) for swaps.

Operations 3

POST /v1/swap/quote Get executable quote #
GET /v1/swap/rates Get swap rates #
GET /v1/swap/status Get swap status #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/classic-swaps-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

classic-swaps-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.0.0
  title: ShapeShift Public Swaps API
  description: The ShapeShift Public API lets you integrate multi-chain swap functionality into your application.
servers:
- url: https://api.shapeshift.com
- url: http://localhost:3001
tags:
- name: Swaps
paths:
  /v1/swap/quote:
    post:
      operationId: getSwapQuote
      summary: Get executable quote
      description: Get an executable quote for a swap, including transaction data. Requires a specific swapper name.
      tags:
      - Swaps
      parameters:
      - schema:
          type: string
        required: false
        description: Partner code for affiliate fee attribution. The API resolves the code to the registered affiliate address and BPS. Register a code at the affiliate dashboard.
        name: X-Partner-Code
        in: header
        example: vultisig
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                sellAssetId:
                  type: string
                  minLength: 1
                  example: eip155:1/slip44:60
                buyAssetId:
                  type: string
                  minLength: 1
                  example: bip122:000000000019d6689c085ae165831e93/slip44:0
                sellAmountCryptoBaseUnit:
                  type: string
                  minLength: 1
                  example: '1000000000000000000'
                receiveAddress:
                  type: string
                  minLength: 1
                  example: bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq
                sendAddress:
                  type: string
                  minLength: 1
                  example: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
                swapperName:
                  type: string
                  minLength: 1
                  example: Relay
                slippageTolerancePercentageDecimal:
                  type: string
                  example: '0.01'
                accountNumber:
                  type:
                  - number
                  - 'null'
                  default: 0
                  example: 0
              required:
              - sellAssetId
              - buyAssetId
              - sellAmountCryptoBaseUnit
              - receiveAddress
              - sendAddress
              - swapperName
      responses:
        '200':
          description: Swap quote
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteResponse'
        '400':
          description: Invalid request or unavailable swapper
        '404':
          description: No quote available
        '429':
          description: Rate limit exceeded. Includes Retry-After header with seconds until reset.
          headers:
            Retry-After:
              description: Seconds until the rate limit window resets
              schema:
                type: integer
                example: 30
            RateLimit-Limit:
              description: Maximum requests allowed per window
              schema:
                type: integer
                example: 60
            RateLimit-Remaining:
              description: Requests remaining in the current window
              schema:
                type: integer
                example: 0
            RateLimit-Reset:
              description: Seconds until the rate limit window resets
              schema:
                type: integer
                example: 30
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
        '500':
          description: Internal server error
  /v1/swap/rates:
    get:
      operationId: getSwapRates
      summary: Get swap rates
      description: Get informative swap rates from all available swappers. This does not create a transaction.
      tags:
      - Swaps
      parameters:
      - schema:
          type: string
          minLength: 1
          example: eip155:1/slip44:60
        required: true
        name: sellAssetId
        in: query
      - schema:
          type: string
          minLength: 1
          example: eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
        required: true
        name: buyAssetId
        in: query
      - schema:
          type: string
          pattern: ^\d+$
          example: '1000000000000000000'
        required: true
        name: sellAmountCryptoBaseUnit
        in: query
      - schema:
          type: string
          pattern: ^(?:\d+)(?:\.\d+)?$
          example: '0.01'
        required: false
        name: slippageTolerancePercentageDecimal
        in: query
      - schema:
          type: string
        required: false
        description: Partner code for affiliate fee attribution. The API resolves the code to the registered affiliate address and BPS. Register a code at the affiliate dashboard.
        name: X-Partner-Code
        in: header
        example: vultisig
      responses:
        '200':
          description: Swap rates
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateResponse'
        '400':
          description: Invalid request
        '429':
          description: Rate limit exceeded. Includes Retry-After header with seconds until reset.
          headers:
            Retry-After:
              description: Seconds until the rate limit window resets
              schema:
                type: integer
                example: 30
            RateLimit-Limit:
              description: Maximum requests allowed per window
              schema:
                type: integer
                example: 60
            RateLimit-Remaining:
              description: Requests remaining in the current window
              schema:
                type: integer
                example: 0
            RateLimit-Reset:
              description: Seconds until the rate limit window resets
              schema:
                type: integer
                example: 30
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
        '500':
          description: Internal server error
  /v1/swap/status:
    get:
      operationId: getSwapStatus
      summary: Get swap status
      description: Look up the current status of a swap by its quote ID. Pass txHash on the first call after broadcasting to bind it to the quote and start tracking. Subsequent calls can omit txHash.
      tags:
      - Swaps
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: quoteId
        in: query
      - schema:
          type: string
          minLength: 1
          maxLength: 128
        required: false
        name: txHash
        in: query
      - schema:
          type: string
        required: false
        description: Partner code for affiliate fee attribution. The API resolves the code to the registered affiliate address and BPS. Register a code at the affiliate dashboard.
        name: X-Partner-Code
        in: header
        example: vultisig
      responses:
        '200':
          description: Swap status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SwapStatusResponse'
        '400':
          description: Invalid request parameters or txHash required to begin tracking
        '404':
          description: Quote not found or expired
        '409':
          description: Transaction hash mismatch
        '429':
          description: Rate limit exceeded. Includes Retry-After header with seconds until reset.
          headers:
            Retry-After:
              description: Seconds until the rate limit window resets
              schema:
                type: integer
                example: 30
            RateLimit-Limit:
              description: Maximum requests allowed per window
              schema:
                type: integer
                example: 60
            RateLimit-Remaining:
              description: Requests remaining in the current window
              schema:
                type: integer
                example: 0
            RateLimit-Reset:
              description: Seconds until the rate limit window resets
              schema:
                type: integer
                example: 30
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
        '500':
          description: Internal server error
        '503':
          description: Swap service unavailable
        '504':
          description: Swap service timed out
components:
  schemas:
    QuoteStep:
      type: object
      properties:
        sellAsset:
          $ref: '#/components/schemas/Asset'
        buyAsset:
          $ref: '#/components/schemas/Asset'
        sellAmountCryptoBaseUnit:
          type: string
          example: '1000000000000000000'
        buyAmountAfterFeesCryptoBaseUnit:
          type: string
          example: '995000000'
        allowanceContract:
          type: string
          example: '0xdef1c0ded9bec7f1a1670819833240f027b25eff'
        estimatedExecutionTimeMs:
          type: number
          example: 60000
        source:
          type: string
          example: 0x
        transactionData:
          oneOf:
          - type: object
            properties:
              type:
                type: string
                enum:
                - evm
                example: evm
              chainId:
                type: number
                example: 1
              to:
                type: string
                example: '0xdef1c0ded9bec7f1a1670819833240f027b25eff'
              data:
                type: string
                example: 0x...
              value:
                type: string
                example: '1000000000000000000'
              gasLimit:
                type: string
                example: '300000'
              signatureRequired:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                    - permit2
                  eip712:
                    type: object
                    additionalProperties: {}
                required:
                - type
                - eip712
            required:
            - type
            - chainId
            - to
            - data
            - value
          - type: object
            properties:
              type:
                type: string
                enum:
                - solana
                example: solana
              instructions:
                type: array
                items:
                  type: object
                  properties:
                    programId:
                      type: string
                    keys:
                      type: array
                      items:
                        type: object
                        properties:
                          pubkey:
                            type: string
                          isSigner:
                            type: boolean
                          isWritable:
                            type: boolean
                        required:
                        - pubkey
                        - isSigner
                        - isWritable
                    data:
                      type: string
                  required:
                  - programId
                  - keys
                  - data
              addressLookupTableAddresses:
                type: array
                items:
                  type: string
            required:
            - type
            - instructions
            - addressLookupTableAddresses
          - type: object
            properties:
              type:
                type: string
                enum:
                - utxo_psbt
                example: utxo_psbt
              psbt:
                type: string
              opReturnData:
                type: string
              depositAddress:
                type: string
              value:
                type: string
            required:
            - type
            - psbt
          - type: object
            properties:
              type:
                type: string
                enum:
                - utxo_deposit
                example: utxo_deposit
              depositAddress:
                type: string
              memo:
                type: string
              value:
                type: string
            required:
            - type
            - depositAddress
            - memo
            - value
          - type: object
            properties:
              type:
                type: string
                enum:
                - cosmos
                example: cosmos
              chainId:
                type: string
              to:
                type: string
              value:
                type: string
              memo:
                type: string
            required:
            - type
            - chainId
            - to
            - value
      required:
      - sellAsset
      - buyAsset
      - sellAmountCryptoBaseUnit
      - buyAmountAfterFeesCryptoBaseUnit
      - allowanceContract
      - source
    Asset:
      type: object
      properties:
        assetId:
          type: string
          example: eip155:1/slip44:60
        chainId:
          type: string
          example: eip155:1
        name:
          type: string
          example: Ethereum
        symbol:
          type: string
          example: ETH
        precision:
          type: number
          example: 18
        color:
          type: string
          example: '#5C6BC0'
        icon:
          type: string
          example: https://assets.coincap.io/assets/icons/eth@2x.png
        networkName:
          type: string
          example: Ethereum
        networkColor:
          type: string
          example: '#5C6BC0'
        networkIcon:
          type: string
          example: https://assets.coincap.io/assets/icons/eth@2x.png
        explorer:
          type: string
          example: https://etherscan.io
        explorerAddressLink:
          type: string
          example: https://etherscan.io/address/
        explorerTxLink:
          type: string
          example: https://etherscan.io/tx/
        relatedAssetKey:
          type:
          - string
          - 'null'
      required:
      - assetId
      - chainId
      - name
      - symbol
      - precision
      - color
      - icon
      - explorer
      - explorerAddressLink
      - explorerTxLink
      - relatedAssetKey
    RateLimitError:
      type: object
      properties:
        error:
          type: string
          example: Too many requests, please try again later
        code:
          type: string
          enum:
          - RATE_LIMIT_EXCEEDED
          example: RATE_LIMIT_EXCEEDED
      required:
      - error
      - code
    RateResponse:
      type: object
      properties:
        rates:
          type: array
          items:
            type: object
            properties:
              swapperName:
                type: string
              rate:
                type: string
              buyAmountCryptoBaseUnit:
                type: string
              sellAmountCryptoBaseUnit:
                type: string
              steps:
                type: number
              estimatedExecutionTimeMs:
                type: number
              priceImpactPercentageDecimal:
                type: string
              affiliateBps:
                type: string
                description: Total on-chain fee in bps.
                example: '60'
              partnerBps:
                type: string
                description: Partner share in bps.
                example: '50'
              shapeshiftBps:
                type: string
                description: ShapeShift platform fee in bps.
                example: '10'
              networkFeeCryptoBaseUnit:
                type: string
              error:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                required:
                - code
                - message
            required:
            - swapperName
            - rate
            - buyAmountCryptoBaseUnit
            - sellAmountCryptoBaseUnit
            - steps
            - affiliateBps
            - shapeshiftBps
        timestamp:
          type: number
        expiresAt:
          type: number
      required:
      - rates
      - timestamp
      - expiresAt
    SwapStatusResponse:
      type: object
      properties:
        quoteId:
          type: string
          format: uuid
        txHash:
          type: string
        status:
          type: string
          enum:
          - pending
          - submitted
          - confirmed
          - failed
        swapperName:
          type: string
        sellAssetId:
          type: string
        buyAssetId:
          type: string
        sellAmountCryptoBaseUnit:
          type: string
        buyAmountAfterFeesCryptoBaseUnit:
          type: string
        partnerAddress:
          type: string
          pattern: ^0x[0-9a-fA-F]{40}$
          example: '0x1234567890123456789012345678901234567890'
        affiliateBps:
          type: string
          description: Total on-chain fee in bps.
          example: '60'
        partnerBps:
          type: string
          description: Partner share in bps.
          example: '50'
        shapeshiftBps:
          type: string
          description: ShapeShift platform fee in bps.
          example: '10'
        registeredAt:
          type: number
        buyTxHash:
          type: string
        isAffiliateVerified:
          type: boolean
      required:
      - quoteId
      - status
      - swapperName
      - sellAssetId
      - buyAssetId
      - sellAmountCryptoBaseUnit
      - buyAmountAfterFeesCryptoBaseUnit
      - affiliateBps
      - shapeshiftBps
    QuoteResponse:
      type: object
      properties:
        quoteId:
          type: string
          format: uuid
        swapperName:
          type: string
          example: 0x
        rate:
          type: string
          example: '0.995'
        sellAsset:
          $ref: '#/components/schemas/Asset'
        buyAsset:
          $ref: '#/components/schemas/Asset'
        sellAmountCryptoBaseUnit:
          type: string
        buyAmountBeforeFeesCryptoBaseUnit:
          type: string
        buyAmountAfterFeesCryptoBaseUnit:
          type: string
        affiliateBps:
          type: string
          description: Total on-chain fee in bps.
          example: '60'
        partnerBps:
          type: string
          description: Partner share in bps.
          example: '50'
        shapeshiftBps:
          type: string
          description: ShapeShift platform fee in bps.
          example: '10'
        slippageTolerancePercentageDecimal:
          type: string
          example: '0.01'
        networkFeeCryptoBaseUnit:
          type: string
          example: '23000'
        approval:
          type: object
          properties:
            isRequired:
              type: boolean
              example: true
            spender:
              type: string
              example: '0xdef1c0ded9bec7f1a1670819833240f027b25eff'
            approvalTx:
              type: object
              properties:
                to:
                  type: string
                  example: '0xdef1c0ded9bec7f1a1670819833240f027b25eff'
                data:
                  type: string
                  example: 0x
                value:
                  type: string
                  example: '0'
              required:
              - to
              - data
              - value
          required:
          - isRequired
          - spender
        steps:
          type: array
          items:
            $ref: '#/components/schemas/QuoteStep'
        expiresAt:
          type: number
      required:
      - quoteId
      - swapperName
      - rate
      - sellAsset
      - buyAsset
      - sellAmountCryptoBaseUnit
      - buyAmountBeforeFeesCryptoBaseUnit
      - buyAmountAfterFeesCryptoBaseUnit
      - affiliateBps
      - shapeshiftBps
      - approval
      - steps
      - expiresAt