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:/evm/buy/transaction
| Parameter | Type | Required | Description |
|---|---|---|---|
chain | string | Yes | Chain identifier |
token | string | Yes | Token contract address |
swapMode | string | Yes | ExactIn or ExactOut |
amountIn | string | Yes | Amount of native currency in wei |
wallet | string | Yes | Wallet address |
slippageBps | number | No | Slippage tolerance in basis points (default: 100 = 1%) |
feeBps | number | No | Fee in basis points (0-175) |
feeRecipient | string | No | Wallet to receive fees |
sendRoute | string | No | Public, Private, or Both for MEV protection |
Get Sell Transaction
Endpoint:/evm/sell/transaction
Same parameters as buy transaction. May require a permit for V3 pools.
Get Approve Transaction
Build a transaction to approve token spending. Endpoint:/evm/approve/transaction
| Parameter | Type | Required | Description |
|---|---|---|---|
chain | string | Yes | Chain identifier |
token | string | Yes | Token contract address |
wallet | string | Yes | Wallet granting approval |
spender | string | Yes | Contract address to approve |

