Skip to main content

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.

Build unsigned transactions for token swaps.

Get Buy Transaction

Build an unsigned transaction for buying tokens. Endpoint: /svm/buy/transaction
ParameterTypeRequiredDescription
chainstringYesAlways sol
tokenstringYesToken mint address
swapModestringYesExactIn or ExactOut
amountInstringYesAmount of SOL in lamports
walletstringYesWallet public key
slippageBpsnumberNoSlippage tolerance (default: 100 = 1%)
feeBpsnumberNoFee in basis points (0-175)
feeRecipientstringNoWallet to receive fees
sendRoutestringNoPublic, PublicWithNonce, Antimev, or AntimevWithNonce
prioFeesstringNoPriority fees (see below)
bribeFeesstringBased on sendRoutebribe fees (see below)
nonceAccountstringBased on sendRouteNonce account for transaction exclusivity
poolstringNoWhen supplied, this parameter restricts quoting to the specified pool, subject to liquidity and compatibility requirements.
Example:
socket.emit("/svm/buy/transaction", {
  chain: "sol",
  token: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
  swapMode: "ExactIn",
  amountIn: "1000000000",
  wallet: "YourSolanaWalletPublicKey",
  slippageBps: 100,
  prioFees: "100000",
  pool: "PoolAddress", // Optional: specific pool address
});

Get Sell Transaction

Endpoint: /svm/sell/transaction Same parameters as buy transaction.