Build unsigned transactions for token swaps.Documentation Index
Fetch the complete documentation index at: https://docs.chainworks.co/llms.txt
Use this file to discover all available pages before exploring further.
Get Buy Transaction
Build an unsigned transaction for buying tokens. Endpoint:/svm/buy/transaction
| Parameter | Type | Required | Description |
|---|---|---|---|
chain | string | Yes | Always sol |
token | string | Yes | Token mint address |
swapMode | string | Yes | ExactIn or ExactOut |
amountIn | string | Yes | Amount of SOL in lamports |
wallet | string | Yes | Wallet public key |
slippageBps | number | No | Slippage tolerance (default: 100 = 1%) |
feeBps | number | No | Fee in basis points (0-175) |
feeRecipient | string | No | Wallet to receive fees |
sendRoute | string | No | Public, PublicWithNonce, Antimev, or AntimevWithNonce |
prioFees | string | No | Priority fees (see below) |
bribeFees | string | Based on sendRoute | bribe fees (see below) |
nonceAccount | string | Based on sendRoute | Nonce account for transaction exclusivity |
pool | string | No | When supplied, this parameter restricts quoting to the specified pool, subject to liquidity and compatibility requirements. |
Get Sell Transaction
Endpoint:/svm/sell/transaction
Same parameters as buy transaction.
