Build on the Vextaris DEX infrastructure. All endpoints are available via JSON-RPC at https://testnet.vextaris.io. Use our JavaScript SDK for a higher-level interface.
RPC vex_quoteSwap
Get a swap quote without executing. Returns expected output, price impact, and fee.
Get the spot price between any two tokens: the ratio of the pool's RAW reserves, scaled by 1e18. To get a human price, divide by 1e18 and multiply by 10^(decimals of the first token − decimals of the second).
Every trade must be signed by the trader. Unsigned submissions are rejected by the network. To turn natural language into a trade, have the node parse it into a structured goal, then ask the user's wallet to sign that goal. The wallet shows the user exactly what they are signing.
// 1. Parse (read-only)
curl -X POST https://testnet.vextaris.io \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"vex_parseIntent","params":["swap 1 VXS for USDC"],"id":1}'
// → { "goal": { "kind": "Swap", "fromToken": "0x…", "toToken": "0x…", "amount": "1000000000" },
// "constraints": { "maxSlippage": 1, … } }
// 2. Sign + submit with the user's VexSpark wallet (popup, postMessage)
popup.postMessage({ type: 'vexspark:signBundle', requestId,
operations: [{ type: 'Intent', goal, constraints, originalText: 'swap 1 VXS for USDC' }],
maxGas: 120000 }, 'https://wallet.vexspark.com');
// Amounts in operations are RAW base units (e.g. 1 VXS = "1000000000").
// Display amounts like "1.5" are refused by the wallet.
JavaScript SDK Quick Start
Install the SDK and start trading programmatically.
import { RpcClient } from '@vexidus/sdk';
const sdk = new RpcClient('https://testnet.vextaris.io');
// Get a swap quote
const quote = await sdk.rpc.quoteSwap(VXS, USDC, '1000000000');
console.log('Output:', quote.amount_out);
// List all pools
const pools = await sdk.rpc.listPools(50);
// Get token metadata
const info = await sdk.rpc.getTokenInfo(mintAddress);