For integrators
Everything below is keyless JSON over HTTPS with open CORS, on Elysium (chain 99901, RPC https://rpc.elysium.kinetiq.xyz). Amounts are in base units. Use the zero address for native HYPE.
1. Route
/api/v1/route quotes every one-pool and two-pool path by eth_call on Uniswap's V4Quoter and ranks them by output.
curl "https://pegisium.com/api/v1/route?from=HYPE&to=kHYPE&amount=1000000000000000"
{
"best": {
"tokens": ["HYPE", "kHYPE"], "pools": ["khype-hype"],
"amountOut": "972502491458665", "minAmountOut": "967639979001371",
"legs": [{ "pool": "khype-hype", "router": "0xAd1310746184aCDE00194200eCEcaa54b958FbFf",
"tx": { "to": "0xAd1310746184aCDE00194200eCEcaa54b958FbFf", "data": "0xdc61…", "value": "1000000000000000" } }]
},
"candidates": [ … ], "slippageBps": 50, "deadline": …
}Each leg carries its own PegRouter calldata and the approval it needs. When a path through a $PEG pool is within 0.10% of the best, it wins and pegPreferred says so.
2. Quote
/api/v1/quote is aggregator-shaped: one call returns the output, the minimum, the route, the transaction and the fee split.
curl "https://pegisium.com/api/v1/quote?tokenIn=0x0000000000000000000000000000000000000000\
&tokenOut=0x248888D396A546A69A188f3Deb476964e581E9d0&amount=1000000000000000&slippageBps=50&from=<your address>"The response has amountOut, minAmountOut, route (pool, v4 key, hook), tx (to, data, value), approval (null for native HYPE) and fees with baseFee, gapFee and takesGap in pips. With from, the transaction is also simulated from that address.
3. Sign and send
import { createWalletClient, custom, erc20Abi } from "viem";
const q = await fetch("https://pegisium.com/api/v1/quote?tokenIn=kHYPE&tokenOut=HYPE&amount=1000000000000000").then((r) => r.json());
const wallet = createWalletClient({ transport: custom(window.ethereum) });
const [account] = await wallet.requestAddresses();
const chain = { id: 99901, name: "Elysium", nativeCurrency: { name: "HYPE", symbol: "HYPE", decimals: 18 },
rpcUrls: { default: { http: ["https://rpc.elysium.kinetiq.xyz"] } } };
if (q.approval) await wallet.writeContract({ account, chain, address: q.approval.token, abi: erc20Abi,
functionName: "approve", args: [q.approval.spender, BigInt(q.approval.amount)] });
await wallet.sendTransaction({ account, chain, to: q.tx.to, data: q.tx.data, value: BigInt(q.tx.value) });Pegisium pools are plain v4 pools too, so the Universal Router and any router that reads v4 can swap them directly with the keys from /api/v1/pools.
MCP tools
A keyless MCP server runs at https://pegisium.com/mcp (Streamable HTTP). It never signs: tools that build a transaction return it unsigned.
claude mcp add --transport http pegisium https://pegisium.com/mcp| Tool | What it returns |
|---|---|
best_route | The best one- or two-pool path with PegRouter calldata per leg |
get_quote | Aggregator quote: output, minimum, route, transaction, fee split |
simulate_swap | A swap simulated from an address, with the unsigned transaction |
get_bonds | Bond price, discount, the value per $PEG floor and capacity left |
quote_bond | The $PEG a HYPE amount vests and the unsigned bond transaction |
get_treasury | Treasury holdings on HyperCore, its NAV on Elysium and the value per $PEG |
list_pools, get_rate, quote_fee | Pools with keys and live fees, Kinetiq's rate, the hook's fee at any price |
get_flow, get_incentives, find_hypercore_token, get_contracts | Volume and gap fees, gauges, HyperCore books, every address with its ABI |
curl -s https://pegisium.com/mcp -H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"quote_bond","arguments":{"hype":"0.01"}}}'SDK
There is nothing to install beyond viem. Every contract is verified on the explorer, and each ABI is served at /abi/<Contract>.json. The Developers page has the full address list, a Solidity interface (PegFeeReader.sol) and snippets that were run against Elysium as written. Build on Pegisium covers reading the hook directly, and /llms.txt sums it all up for agents.
