Create Swap Transaction CLMM
Creates an unsigned transaction for the best possible swap through the Raydium CLMM pool.
This endpoint does not submit the transaction to the network.
The endpoint allows you to specify priority fees and tips to later control the transaction inclusion and propagation. Refer to the Transaction Submission & Front-Running Protection & Transaction Bundle page for additional information about these parameters.
This swap is using CLMM Pools on Raydium. All of these swaps are using program ID
Request
Method:
POST ./api/v2/raydium/clmm-swap
Parameters:
Parameter | Type | Description |
---|---|---|
| string | Solana address which is placing swap. |
| string | Symbol or token program address of the swap-in token for the current step. |
| string | Symbol or token program address of the swap-out token. |
| double | The amount of swap-in token to be converted to the swap-out token. |
| double | The maximum slippage tolerance in percentage. |
| string | poolID of the pool you are trading on |
| uint32 | OPTIONAL. Specifies total compute limit to be allocated for all instructions within the created tx |
| uint64 | OPTIONAL. Specifies compute price in Lamport (0.000001 SOL = 1,000 Lamport) to be included as a part of instruction, known as priority fee. |
| unit64 | OPTIONAL. Specifies a tip amount that will be used to pay for front-running protection or bundle submission services. What is |
Request example:
Response:
Fields:
Field | Type | Description |
---|---|---|
|
| See |
| double | Amount of tokens expected from the swap |
| double | Minimum amount of tokens allowed from swap given slippage |
TransactionMessage
Parameter | Description | |
---|---|---|
| string | Raw bytes of signed transaction (should be in base64) |
Example:
Last updated