Vybe Network Trading API

The Trading API from Vybe Network, for trading.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 2

POST /v4/trading/swap Build Swap #
GET /v4/trading/swap-quote Swap Quote #

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/vybenetwork-com:vybenetwork-com-trading-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

vybenetwork-com-trading-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: info@vybenetwork.com
    name: Vybe Dev Team
  description: 'This API provides read access to data from the Solana blockchain.

    The API is organized according to related data of interest.

    Please consult individual endpoints'' documentation for more.

    The API is for authenticated users only.

    To gain access, please contact us at support@vybenetwork.com to obtain an API key.'
  license:
    name: Terms of Service
    url: https://alpha.vybenetwork.com/terms
  title: Solana API & WebSocket Trading API
  version: 4.0.11
servers:
- description: Vybe Solana API
  url: https://api.vybenetwork.xyz/
security:
- apiKey: []
tags:
- name: Trading
paths:
  /v4/trading/swap:
    post:
      description: Solana API endpoint for building token swaps. Build and return unsigned transactions for direct swaps on DEXs like Pump.fun, Raydium and more.
      operationId: do_swap_proxy
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwapProxyParams'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                description: 'Swap execution payload containing transaction details, route metadata, and outcome status.


                  Optional passthrough fields from ix-builder (only present when requested or on bridge routes):

                  `enrichment`, `simulation`, bridge-leg transactions (`preSwap*`, `postSwap*`, `intermediateSwap*`),

                  and per-pool discovery activity (`tradeCount`, `buyCount`, `sellCount`, `source`, `liquidity`).

                  When `enumerateRoutes` is true with `marketFetchMode` and no pinned pool, ix-builder may return

                  `outcome: "multi"` and a ranked `routes[]` array of additional swap builds.'
                properties:
                  buyCount:
                    description: Trades where base = output mint and quote = input mint (buy input).
                    format: int32
                    minimum: 0
                    type:
                    - integer
                    - 'null'
                  details:
                    $ref: '#/components/schemas/SwapDetails'
                  enrichment:
                    description: 'Print-ready enrichment (simulation + fees + USD + retention %) forwarded from ix-builder.

                      Loose passthrough so new display fields survive re-serialization.'
                  intermediateSwapNeeded:
                    description: Whether an intermediate swap leg must be signed/sent.
                    type:
                    - boolean
                    - 'null'
                  intermediateSwapTransaction:
                    description: Intermediate swap leg transaction for multi-step bridge routes.
                    type:
                    - string
                    - 'null'
                  liquidity:
                    description: Known USD pool liquidity from market discovery (ix-builder enrichment).
                    format: double
                    type:
                    - number
                    - 'null'
                  outcome:
                    description: '`multi` when Vybe router enumerated multiple pinned pool builds in one response.'
                    type:
                    - string
                    - 'null'
                  postSwapNeeded:
                    description: Whether a post-swap (bridge) leg must be signed/sent after the main leg.
                    type:
                    - boolean
                    - 'null'
                  postSwapTransaction:
                    description: Post-swap (bridge) leg transaction for quote-bridge routes.
                    type:
                    - string
                    - 'null'
                  preSwapNeeded:
                    description: Whether a pre-swap (bridge) leg must be signed/sent before the main leg.
                    type:
                    - boolean
                    - 'null'
                  preSwapTransaction:
                    description: Pre-swap (bridge) leg transaction for quote-bridge routes.
                    type:
                    - string
                    - 'null'
                  provider:
                    description: Provider name
                    type: string
                  routes:
                    description: Additional enumerated route builds (same shape as the primary swap), ranked by output.
                    items: {}
                    type:
                    - array
                    - 'null'
                  sellCount:
                    description: Trades where base = input mint and quote = output mint (sell input).
                    format: int32
                    minimum: 0
                    type:
                    - integer
                    - 'null'
                  simulation:
                    description: Raw RPC simulation result (only present when ix-builder simulate mode is used).
                  slippage:
                    description: Slippage percentage
                    format: double
                    type: number
                  slippageSource:
                    description: Source of slippage (e.g., "manual", "auto")
                    type: string
                  source:
                    description: Discovery source tag (`trades`, `markets`, `rpc`).
                    type:
                    - string
                    - 'null'
                  tradeCount:
                    description: Recent trades on the selected pool for this pair (`buyCount + sellCount`).
                    format: int32
                    minimum: 0
                    type:
                    - integer
                    - 'null'
                  transaction:
                    description: Base64-encoded unsigned transaction
                    type: string
                required:
                - transaction
                - provider
                - details
                - slippage
                - slippageSource
                type: object
          description: Swap provided
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Invalid parameters — verify request inputs.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: No data matches provided query
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Internal server error
      summary: Build Swap
      tags:
      - Trading
  /v4/trading/swap-quote:
    get:
      description: Solana API endpoint for fetching Solana swap quotes. Returns expected output, price impact, slippage bounds, and full route plan for any token pair.
      operationId: get_swap_quote_proxy
      parameters:
      - description: Amount of input token to swap (in UI units, e.g., 0.1 for 0.1 SOL)
        in: query
        name: amount
        required: true
        schema:
          format: double
          type: number
      - description: Mint address of the input token
        in: query
        name: inputMintAddress
        required: true
        schema:
          $ref: '#/components/schemas/SolanaId'
      - description: Mint address of the output token
        in: query
        name: outputMintAddress
        required: true
        schema:
          $ref: '#/components/schemas/SolanaId'
      - description: Wallet address (used for personalized routing)
        in: query
        name: accountAddress
        required: false
        schema:
          type:
          - string
          - 'null'
      - description: 'Slippage tolerance in percentage (default: 0.5)'
        in: query
        name: slippage
        required: false
        schema:
          format: double
          type:
          - number
          - 'null'
      responses:
        '200':
          content:
            application/json:
              schema:
                description: 'Swap quote payload containing route options, expected amounts, and execution metadata.


                  When ix-builder returns enrichment on quote-bridge or enriched swap flows, optional

                  `enrichment` is preserved through re-serialization (passthrough JSON).'
                properties:
                  contextSlot:
                    description: Context slot
                    format: int64
                    minimum: 0
                    type:
                    - integer
                    - 'null'
                  enrichment:
                    description: 'Print-ready enrichment (simulation + fees + USD + retention %) forwarded from ix-builder.

                      Loose passthrough so new display fields survive re-serialization.'
                  inAmount:
                    description: Input amount in base units (lamports)
                    type: string
                  inputMintAddress:
                    description: Input mint address
                    type: string
                  instructionVersion:
                    description: Instruction version
                  loadedLongtailToken:
                    description: Whether longtail token was loaded
                    type:
                    - boolean
                    - 'null'
                  mostReliableAmmsQuoteReport:
                    allOf:
                    - $ref: '#/components/schemas/MostReliableAmmsQuoteReport'
                    description: Quote quality and reliability metrics for AMMs considered during route selection.
                  otherAmountThreshold:
                    description: Minimum output considering slippage (base units)
                    type: string
                  otherAmountThresholdUi:
                    description: Minimum output in UI units
                    format: double
                    type: number
                  otherRoutePlans:
                    description: Other route plans
                  outAmount:
                    description: Expected output amount in base units
                    type: string
                  outAmountUi:
                    description: Output amount in UI units (human-readable)
                    format: double
                    type: number
                  outputMintAddress:
                    description: Output mint address
                    type: string
                  platformFee:
                    description: Platform fee
                  priceImpactPct:
                    description: Price impact percentage
                    type: string
                  routePlan:
                    description: Route plan with swap information
                    items:
                      $ref: '#/components/schemas/RoutePlan'
                    type: array
                  simplerRouteUsed:
                    description: Whether simpler route was used
                    type:
                    - boolean
                    - 'null'
                  slippageBps:
                    description: Slippage in basis points
                    format: int32
                    type:
                    - integer
                    - 'null'
                  swapMode:
                    description: Swap mode (e.g., "ExactIn")
                    type: string
                  swapRate:
                    description: Exchange rate (output per 1 input token)
                    format: double
                    type: number
                  swapUsdValue:
                    description: USD value of the swap
                    type:
                    - string
                    - 'null'
                  timeTaken:
                    description: Time taken to compute quote
                    format: double
                    type:
                    - number
                    - 'null'
                  useIncurredSlippageForQuoting:
                    description: Use incurred slippage for quoting
                required:
                - inputMintAddress
                - inAmount
                - outputMintAddress
                - outAmount
                - otherAmountThreshold
                - swapMode
                - priceImpactPct
                - routePlan
                - outAmountUi
                - otherAmountThresholdUi
                - swapRate
                type: object
          description: Swap quote provided
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Invalid parameters — verify request inputs.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: No data matches provided query
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Internal server error
      summary: Swap Quote
      tags:
      - Trading
components:
  schemas:
    SwapQuoteDetails:
      description: Schema model for swap quote details fields used in this Solana API.
      properties:
        inAmount:
          description: Input amount in base units
          type: string
        outAmount:
          description: Output amount in base units
          type: string
        provider:
          description: Provider name for the quote
          type: string
      required:
      - inAmount
      - outAmount
      - provider
      type: object
    RoutePlan:
      description: Route plan model describing the swap path and liquidity venues used for execution.
      properties:
        bps:
          description: Basis points
          format: int32
          type:
          - integer
          - 'null'
        percent:
          description: Percentage of the swap
          format: int32
          type: integer
        swapInfo:
          $ref: '#/components/schemas/SwapInfo'
      required:
      - swapInfo
      - percent
      type: object
    SwapProxyRouter:
      description: Enumeration of supported swap proxy router values used by this API model.
      enum:
      - titan
      - jupiter
      - vybe
      type: string
    SwapProxyProtocol:
      description: Enumeration of supported swap proxy protocol values used by this API model.
      enum:
      - PUMPFUN
      - PUMPSWAP
      - RAYDIUMAMMV4
      - RAYDIUMCPMM
      - RAYDIUMCLMM
      - RAYDIUMLAUNCHLAB
      - METEORADBC
      - METEORADAMM2
      - METEORADLMM
      - SANCTUM
      type: string
    MostReliableAmmsQuoteReport:
      description: Quote reliability summary for AMM routes considered during swap quote evaluation.
      properties:
        info:
          additionalProperties:
            type: string
          description: Quote information from reliable AMMs
          type: object
      required:
      - info
      type: object
    SwapProxyParams:
      description: Request payload model for swap proxy params parameters used by this API endpoint.
      properties:
        accountAddress:
          $ref: '#/components/schemas/SolanaId'
        amount:
          description: Amount to swap (in UI units)
          format: double
          type: number
        autoCalculateSlippage:
          description: Auto-calculate optimal slippage
          type:
          - boolean
          - 'null'
        closeInputAta:
          description: When true, append closeAccount on input SPL ATA after a full-balance sell.
          type:
          - boolean
          - 'null'
        closeWsolAta:
          description: 'Ephemeral WSOL path on sell: create WSOL ATA, sync native, then close.'
          type:
          - boolean
          - 'null'
        createOutputAta:
          description: Create output SPL ATA idempotently before swap (buy when wallet has no output ATA).
          type:
          - boolean
          - 'null'
        enrich:
          description: 'When true, ix-builder attaches print-ready enrichment (simulation, fees, USD, retention %)

            on POST /v4/trading/swap responses. Forwarded verbatim to ix-builder; ignored by aggregators.'
          type:
          - boolean
          - 'null'
        enumerateRoutes:
          description: Build multiple route candidates (up to 10). Default on; set false to stop at first success.
          type:
          - boolean
          - 'null'
        gasless:
          description: Use Vybe fee payer for gas
          type:
          - boolean
          - 'null'
        inputBalanceExact:
          description: Exact input balance from wallet token-balance (UI units); used with closeInputAta.
          type:
          - string
          - 'null'
        inputDecimals:
          description: Input token decimals when paired with inputBalanceExact (optional; on-chain fetch otherwise).
          format: int32
          minimum: 0
          type:
          - integer
          - 'null'
        inputMintAddress:
          $ref: '#/components/schemas/SolanaId'
        inputMintDecimals:
          description: Input mint decimals from client cache.
          format: int32
          minimum: 0
          type:
          - integer
          - 'null'
        inputMintPrice:
          description: Client USD price for the input mint (skips backend price fetch when set).
          format: double
          type:
          - number
          - 'null'
        liquidity:
          description: 'Known USD pool liquidity from market discovery; forwarded to ix-builder as a hint for pinned swaps and route enrichment.

            Accepts legacy `marketScore` as an alias.'
          format: double
          type:
          - number
          - 'null'
        marketFetchMode:
          description: 'Market discovery mode for Vybe router: "full" | "trades" | "rpc".'
          type:
          - string
          - 'null'
        outputMintAddress:
          $ref: '#/components/schemas/SolanaId'
        outputMintDecimals:
          description: Output mint decimals from client cache.
          format: int32
          minimum: 0
          type:
          - integer
          - 'null'
        outputMintPrice:
          description: Client USD price for the output mint (skips backend price fetch when set).
          format: double
          type:
          - number
          - 'null'
        partner:
          description: Partner identifier for fee routing
          type:
          - string
          - 'null'
        poolAddress:
          allOf:
          - $ref: '#/components/schemas/SolanaId'
          description: The target liquidity pool address used when executing this swap request.
        postSwapNeeded:
          description: Caller indicates a post-swap bridge leg is required after the main swap.
          type:
          - boolean
          - 'null'
        preSwapNeeded:
          description: Caller indicates a pre-swap bridge leg is required before the main swap.
          type:
          - boolean
          - 'null'
        programAddress:
          allOf:
          - $ref: '#/components/schemas/SolanaId'
        protocol:
          allOf:
          - $ref: '#/components/schemas/SwapProxyProtocol'
          description: The swap protocol identifier used to route and execute this trade request.
        quoteBridge:
          description: Quote-bridge metadata for multi-hop routes (ix-builder).
        router:
          $ref: '#/components/schemas/SwapProxyRouter'
        simulate:
          description: Simulate transaction without building
          type:
          - boolean
          - 'null'
        slippage:
          description: 'Slippage tolerance in percentage (default: 0.5)'
          format: double
          type:
          - number
          - 'null'
        solPrice:
          description: Client USD SOL price when neither leg is SOL/WSOL (fee/rent USD).
          format: double
          type:
          - number
          - 'null'
        source:
          description: Discovery source for pinned pool (`trades`, `markets`, `rpc`, …).
          type:
          - string
          - 'null'
        swapFee:
          description: Service fee percentage (e.g., 1 for 1%)
          format: double
          type:
          - number
          - 'null'
      required:
      - accountAddress
      - amount
      - inputMintAddress
      - outputMintAddress
      type: object
    SwapDetails:
      description: Schema model for swap details fields used in this Solana API.
      properties:
        closeAccountIx:
          description: Whether close account instruction is included
          type: boolean
        inputAmount:
          description: Input amount in decimal units
          format: double
          type: number
        inputDecimals:
          description: Input token decimals
          format: int32
          minimum: 0
          type: integer
        inputMintAddress:
          description: Input token label/mint
          type: string
        outputDecimals:
          description: Output token decimals
          format: int32
          minimum: 0
          type: integer
        outputMintAddress:
          description: Output token label/mint
          type: string
        quote:
          $ref: '#/components/schemas/SwapQuoteDetails'
        swapFee:
          description: Swap fee amount
          format: int64
          minimum: 0
          type: integer
      required:
      - inputAmount
      - inputMintAddress
      - outputMintAddress
      - inputDecimals
      - outputDecimals
      - swapFee
      - quote
      - closeAccountIx
      type: object
    ConstraintViolation:
      description: Main structure to represent any kind of validation violation.
      properties:
        invalidValue:
          description: Provided value which leaded to the violation.
          type:
          - string
          - 'null'
        message:
          description: Message to the end user.
          type: string
        propertyPath:
          description: Property path to the field where violation occurred.
          type:
          - string
          - 'null'
      required:
      - message
      type: object
    SolanaId:
      description: Typed Solana public key identifier used across request parameters and response fields.
      format: pubkey
      type: string
    SwapInfo:
      description: Schema model for swap info fields used in this Solana API.
      properties:
        ammKey:
          description: AMM key identifier
          type: string
        feeAmount:
          description: Fee amount in base units
          type: string
        feeMintAddress:
          description: Fee token mint address
          type: string
        inAmount:
          description: Input amount in base units
          type: string
        inputMintAddress:
          description: Input token mint address
          type: string
        label:
          description: Label/name of the DEX
          type: string
        outAmount:
          description: Output amount in base units
          type: string
        outputMintAddress:
          description: Output token mint address
          type: string
      required:
      - ammKey
      - label
      - inputMintAddress
      - outputMintAddress
      - inAmount
      - outAmount
      - feeAmount
      - feeMintAddress
      type: object
    ApiError:
      description: Standard API error payload describing failed requests, including code, message, and traceable error metadata.
      properties:
        code:
          description: Code ID of the error, uniquely identifying the error type
          format: int32
          type: integer
        id:
          description: 'A unique identifier for the error, representing the error ID in Sentry.

            This should be submitted as a reference when contacting support.'
          type: string
        message:
          description: A human readable message describing the error that occurred.
          type: string
        violations:
          description: Optional collection of validation violations representations.
          items:
            $ref: '#/components/schemas/ConstraintViolation'
          type:
          - array
          - 'null'
      required:
      - code
      - message
      - id
      type: object
  securitySchemes:
    apiKey:
      description: Authorization header with X-API-KEY formatting. The API key value is 48 characters.
      in: header
      name: X-API-KEY
      type: apiKey
x-provenance:
  method: searched
  source: https://docs.vybenetwork.com/reference
  harvested: '2026-11-28'
  tool: harvest-readme-openapi.py
  note: Assembled verbatim from the OpenAPI definition ReadMe embeds in each operation page of the provider's developer portal; paths and components merged by API title, nothing authored.
  assembled_from:
  - https://docs.vybenetwork.com/reference/close_token_accounts.md
  - https://docs.vybenetwork.com/reference/do_swap_proxy.md
  - https://docs.vybenetwork.com/reference/get_defi_accounts_v4_proxy.md
  - https://docs.vybenetwork.com/reference/get_dust_accounts_many_v4.md
  - https://docs.vybenetwork.com/reference/get_empty_accounts_many_v4.md
  - https://docs.vybenetwork.com/reference/get_empty_accounts_v4.md
  - https://docs.vybenetwork.com/reference/get_known_accounts_v4.md
  - https://docs.vybenetwork.com/reference/get_known_program_accounts_v4.md
  - https://docs.vybenetwork.com/reference/get_market_filtered_ohlcv_v4.md
  - https://docs.vybenetwork.com/reference/get_market_v4.md
  - https://docs.vybenetwork.com/reference/get_markets_v4.md
  - https://docs.vybenetwork.com/reference/get_pnl_timeseries_v4.md
  - https://docs.vybenetwork.com/reference/get_programs_v4.md
  - https://docs.vybenetwork.com/reference/get_pyth_price_ohlc_v4.md
  - https://docs.vybenetwork.com/reference/get_pyth_price_product_pairs_v4.md
  - https://docs.vybenetwork.com/reference/get_pyth_price_ts_v4.md
  - https://docs.vybenetwork.com/reference/get_pyth_price_v4.md
  - https://docs.vybenetwork.com/reference/get_pyth_product_v4.md
  - https://docs.vybenetwork.com/reference/get_swap_quote_proxy.md
  - https://docs.vybenetwork.com/reference/get_token_details_v4.md
  - https://docs.vybenetwork.com/reference/get_token_holders_time_series_v4.md
  - https://docs.vybenetwork.com/reference/get_token_instruction_names_v4.md
  - https://docs.vybenetwork.com/reference/get_token_liquidity.md
  - https://docs.vybenetwork.com/reference/get_token_trade_ohlc_v4.md
  - https://docs.vybenetwork.com/reference/get_token_transfers_v4.md
  - https://docs.vybenetwork.com/reference/get_tokens_summary_v4.md
  - https://docs.vybenetwork.com/reference/get_top_holders_v4.md
  - https://docs.vybenetwork.com/reference/get_top_pnl_traders_by_token_v4.md
  - https://docs.vybenetwork.com/reference/get_top_traders_v4.md
  - https://docs.vybenetwork.com/reference/get_trade_aggregated_timeseries_v4.md
  - https://docs.vybenetwork.com/reference/get_trade_data_program_v4.md
  - https://docs.vybenetwork.com/reference/get_trades_tokens_activity_summary_v4.md
  - https://docs.vybenetwork.com/reference/get_transfer_volume_usd_v4.md
  - https://docs.vybenetwork.com/reference/get_wallet_counterparties_v4.md
  - https://docs.vybenetwork.com/reference/get_wallet_dust_accounts_v4.md
  - https://docs.vybenetwork.com/reference/get_wallet_pnl_v4.md
  - https://docs.vybenetwork.com/reference/get_wallet_tokens_ts_raw_v4.md
  - https://docs.vybenetwork.com/reference/get_wallet_tokens_ts_v4.md
  - https://docs.vybenetwork.com/reference/get_wallet_tokens_v4.md
  - https://docs.vybenetwork.com/reference/post_wallet_tokens_many_v4.md
  - https://docs.vybenetwork.com/reference/post_wallet_tokens_ts_many_v4.md
  - https://docs.vybenetwork.com/reference/post_wallet_tokens_ts_raw_many_v4.md
  - https://docs.vybenetwork.com/reference/withdraw_mev.md
  merge:
    pages: 43
    deduped: 183
    conflicts_kept_first: 0