Docs

Quote API reference

GET /api/quote and the JSON it returns.

Query

  • tokenIn and tokenOut. A symbol from the token list, or a 0x address. HYPE is the native token.
  • amount. A decimal string in whole tokens, such as 0.1. Zero and non-numeric values return 400.
  • slippageBps. Optional. Default 50. Range 0 to 1000.
  • deadlineMinutes. Optional. Default 20. Range 1 to 60.

Response

A 200 body includes amountInFormatted, amountOutFormatted, feeBps, feeAmountFormatted, minAmountOutFormatted, priceImpactBps, gasCostHype, executable, and routes. Each route has shareBps and hops. Each hop has venue, venueId, tokenInSymbol, tokenOutSymbol, fee, tickSpacing, and hooks. alternatives lists other quoted routes with label, amountOutFormatted, and chosen. transaction is present only when a router address is configured.

Example

curl -s "http://127.0.0.1:3090/api/quote?tokenIn=HYPE&tokenOut=USDC&amount=0.1&slippageBps=50"

Token list

GET /api/tokens returns the tokens indexed from venue factory events. The body has count, pools, updatedAt, and tokens. GET /api/tokens?address=0x... reads name, symbol, decimals, and totalSupply for that contract and stores the result. The index starts with the server and writes tokens.json under KNITX_DATA_DIR.