rectangle-terminalSwap API

API Reference

Dexlabarrow-up-right Swap API is completely free and offers a highly intuitive and secure REST API.

As a powerful aggregator integrating various DEXs (Decentralized Exchanges) within the Solana ecosystem, Dexlab partners with the trusted global exchange, OKXarrow-up-right, to provide a stable and efficient trading environment.

Developers and project teams can leverage Dexlab Swap API to easily access liquidity, optimize trading routes, and experience cost savings with high trading performance.

circle-check

API Endpoint

All APIs are free to use, but the Pro API requires an API key(Free) issuance.

  • Open API: https://open-api.dexlab.space/

    • There is a rate limit of 1 RPS. If you need more, get a free API key.

  • Pro API( API key required ): https://pro-api.dexlab.space/

    • The rate limit is increased and free.

Token Swap

circle-info

When using the Open API endpoint, the x-api-key is not required.

post
Body
userWalletAddressstringRequired

The wallet address of the user initiating the swap.

amountstringRequired

The amount to swap. Must include precision (e.g., 1.00 USDT -> 1000000, 1.00 SOL -> 1000000000).

fromTokenAddressstringRequired

The public key of the token to swap from.

toTokenAddressstringRequired

The public key of the token to swap to.

slippageBpsnumber Β· max: 10000Required

The maximum acceptable slippage in bps (basis points). Default is 500 (5%).

referrerWalletAddressstringOptional

Optional wallet address to receive referrer fees.

referrerFeeBpsnumber Β· max: 300Optional

Optional referrer fee in bps (basis points). Range: 0-300 for Open API, For Pro API, the limit varies depending on the contract.

Responses
chevron-right
200

200 response

application/json
post
/dex/swap

Last updated