Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Fetch buy and sell quotes for token swaps on Ethereum, Base, and BNB Chain.
/evm/buy/quote
chain
eth
base
bsc
token
swapMode
ExactIn
ExactOut
amountIn
amountOut
wallet
socket.emit("/evm/buy/quote", { chain: "eth", token: "0x6982508145454Ce325dDbE47a25d4ec3d2311933", swapMode: "ExactIn", amountIn: "1000000000000000000", // 1 ETH wallet: "0x10a64c6d7f12c47b7c66c5b4e20e72bc1fcd5d9e", });
await fetch("https://api.chainworks.co/evm/buy/quote", { method: "POST", headers: { "Content-Type": "application/json", Authorization: CHAINWORKS_API_AUTH_TOKEN, }, body: JSON.stringify({ chain: "eth", token: "0x6982508145454Ce325dDbE47a25d4ec3d2311933", swapMode: "ExactIn", amountIn: "1000000000000000000", // 1 ETH wallet: "0x10a64c6d7f12c47b7c66c5b4e20e72bc1fcd5d9e", }), });
{ "success": true, "result": { "chain": "eth", "isBuy": true, "token": "0x6982508145454Ce325dDbE47a25d4ec3d2311933", "swapMode": "ExactIn", "price": 0.00000234, "priceImpact": 0.0012, "amountIn": "1000000000000000000", "expectedAmountOut": "427350427350427350427350" } }
/evm/sell/quote