SolKnife Swap API

The Swap API from SolKnife — 2 operation(s) for swap.

GitHub OpenAPI

Operations 2

POST /api/swap/order Fetch a Jupiter quote and unsigned swap transaction #
POST /api/swap/execute Submit a wallet-signed swap transaction #

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/solknife-xyz:solknife-xyz-swap-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

solknife-xyz-swap-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SolKnife Swap API
  description: 'Non-custodial Solana toolkit. Every UI action is reachable over JSON HTTP: the server builds unsigned transactions, the caller signs, the server submits. Also available as an MCP server at /api/mcp.'
  version: 1.0.0
  contact:
    email: admin@solknife.xyz
  x-guidance: 'Every write is a two-step, non-custodial flow: POST to a /build endpoint to get an unsigned base64 VersionedTransaction, sign it with your own key, then POST the signed tx to the matching /execute endpoint. The server never holds your keys. Reads are plain GETs. Paid endpoints answer 402 with an x402 v2 challenge: pay the `exact` entry in USDC and retry with the PAYMENT-SIGNATURE header.'
servers:
- url: https://solknife.xyz
tags:
- name: Swap
paths:
  /api/swap/order:
    post:
      operationId: swap_order
      summary: Fetch a Jupiter quote and unsigned swap transaction
      description: Jupiter quote + unsigned swap transaction.
      security: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
        '402':
          description: Payment Required — see the x402 challenge in the body and the PAYMENT-REQUIRED header.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                inputMint:
                  type: string
                  pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
                  description: A Solana address in base58, 32-44 chars.
                outputMint:
                  type: string
                  pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
                  description: A Solana address in base58, 32-44 chars.
                amount:
                  type: string
                  pattern: ^\d+$
                  description: Amount in base units as a decimal string (not a float). For a 6-decimal mint, "1000000" is 1 token.
                taker:
                  type: string
                  pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
                  description: A Solana address in base58, 32-44 chars.
                slippageBps:
                  type: integer
                  minimum: 1
                  maximum: 10000
              required:
              - inputMint
              - outputMint
              - amount
              - taker
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.01'
        protocols:
        - x402: {}
      tags:
      - Swap
  /api/swap/execute:
    post:
      operationId: swap_execute
      summary: Submit a wallet-signed swap transaction
      description: Submit a wallet-signed swap transaction.
      security: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                signedTransaction:
                  type: string
                  minLength: 1
                  maxLength: 2500
                  description: The base64 VersionedTransaction returned by the matching /build call, signed with your key. Do not submit it yourself; this endpoint submits it.
                lastValidBlockHeight:
                  type: integer
                  exclusiveMinimum: 0
                  maximum: 10000000000
                  description: The `lastValidBlockHeight` returned alongside the unsigned tx by /build. Past this block height the tx can no longer land.
              required:
              - signedTransaction
              - lastValidBlockHeight
      tags:
      - Swap