For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Contact SupportDiscordGo to dashboard
HomeDocsAPI ReferenceLiquidity IntegrationChangelog
HomeDocsAPI ReferenceLiquidity IntegrationChangelog
  • Introduction
    • Welcome
    • Supported Chains and Providers
    • Demo Apps
    • FAQ
    • API Issues & Error Codes
    • Need Help?
  • Swap API
    • Introduction
    • FAQ
  • Gasless API
    • Introduction
    • Gasless FAQ
  • Solana Swap API
    • Introduction
      • Get Started
      • Important Integration Notes
      • Integrator Byte Costs
    • Gasless FAQ
  • Cross-Chain API
    • Introduction
    • Learn More
  • Trade Analytics API
    • Introduction
    • Transaction Data
    • Trade Analytics FAQ
  • Core Concepts
    • Introduction to 0x
    • 0x Cheat Sheet
    • Contracts
    • Order Types
    • Glossary
    • White Paper
    • Transaction Data
  • Developer Resources
    • Bounties
    • Rate Limits
    • System Status
  • Upgrading
    • Overview
    • Upgrading to Swap v2
    • Upgrading to Gasless v2
  • Need Help?
    • FAQ
    • API Issues & Error Codes
    • Contact Support
    • Contact Sales
LogoLogo
Contact SupportDiscordGo to dashboard
On this page
  • Token Support
  • Instructions Grouping
  • Instruction Execution Assumptions
  • Byte Budgeting
Solana Swap APIGuides

Important Integration Notes

||View as Markdown|
Was this page helpful?
Edit this page
Previous

Get Started

Next

Integrator Byte Costs

Built with

The 0x Solana Swap API is available via priority access. Apply now to start building.

As part of our priority access release, we want to highlight some intentional differences in how our Solana API returns swap instructions, compared to other providers. These differences are important for integrators to be aware of, especially when composing and sending transactions manually.

Token Support

  • SPL Tokens Only (No Token-2022):
    During the alpha phase, our API supports only standard SPL tokens. We do not support Token-2022 extensions or any non-standard token types. If your integration requires Token-2022 features, please be aware this functionality is not yet available.

  • WSOL-Only for SOL:
    In the alpha release, only the wrapped SOL (WSOL) SPL token (So11111111111111111111111111111111111111112) is supported. Native SOL accounts (So11111111111111111111111111111111111111111) are explicitly rejected.

    All SOL inputs and outputs must use WSOL. Any response labeled “SOL” refers to WSOL. The API does not include unwrap or cleanup instructions—integrators are responsible for handling native SOL conversion if needed.

Instructions Grouping

We currently return a single flat array of instructions. Here’s what’s currently included:

✅ Included Instructions

  • Setup Instructions (N):
    • These create associated token accounts (ATAs) for the user as needed. This uses createIdempotent, so instructions won’t fail if an ATA already exists.
    • The number of instructions (N) depends on how many tokens the route involves, sometimes there may be 1 extra instruction for native SOL support (for certain DEXs).
  • Swap Instruction (1):
    • A single instruction on our Settler program to perform the actual swap.

We’re planning to return these in distinct arrays (setupInstructions, swapInstructions) in a future release.

🚫 Not Included (for Alpha)

  • Compute Budget Instructions:
    • You’ll need to manually add these if your transaction is complex and might exceed compute limits.
  • Cleanup Instructions:
    • In our alpha, we assume all SOL is already wrapped (WSOL). As a result, any output labeled as “SOL” will be returned as WSOL, and no cleanup step is needed.

Instruction Execution Assumptions

  • All instructions are returned in a single array, and must be executed in order. It is the responsibility of the integrator to:
    • Assemble the full transaction (e.g., using VersionedTransaction)
    • Add signers
    • Insert optional instructions (e.g., compute budget or priority fee) if needed

Byte Budgeting

Solana v0 transactions are limited to 1232 bytes.

Each 0x swap transaction reserves a fixed portion of that space. When you add instructions around the swap (compute budget, transfers, close account, referral logic, etc.), you must ensure your serialized transaction remains under the limit.

We provide a detailed Integrator Byte Costs guide to help you compute this.