Discover the deployment
Send requests to https://obeliskamm.xyz/api. Read the configuration on startup to obtain the chain ID, native gas symbol, public wallet RPC, factory (protocol), canonical pool and token metadata. The hosted release exposes one executable market. Both quote endpoints select its direct Obelisk pool.
curl -fsS 'https://obeliskamm.xyz/api/config'
curl -fsS 'https://obeliskamm.xyz/api/liquidity/pool'
| Read | Result |
|---|---|
/config | Settlement network, contract addresses, feature availability, base and quote decimals. |
/liquidity/pools | An object with a pools array of supported Obelisk books. |
/liquidity/pool | One block-pinned snapshot. Omit pool for the canonical pool or pass its settlement contract address. |
Read referenceAtoms, activeStep, feeBps and the 20 bins from the same snapshot. Array index i corresponds to step = i − 10. Token atom counts and share supplies are decimal strings. Parse them with arbitrary-precision integer arithmetic. Live deployment configuration ↗
Request and validate a quote
For one whole six-decimal tUSDC, request input=quote and amount=1000000. To sell WHYPE, set input=base and express the amount in 18-decimal atoms. Both /liquidity/quote and /swap/order accept the optional canonical pool address and an optional slippageBps value.
curl -fsS 'https://obeliskamm.xyz/api/liquidity/quote?input=quote&amount=1000000&slippageBps=50'
| Response field | Consumer interpretation |
|---|---|
inAmount, outAmount | Gross input and quoted output. Each amount uses its own token’s precision. |
otherAmountThreshold | Minimum output in output-token atoms after the requested tolerance. |
expectedPrice | Reviewed oracle reference passed as the fourth argument of the pool swap. |
blockNumber, expiresAt | Settlement height of the preview and Unix time in seconds for expiry of the client review. |
Verify chainId, pool, input and output token addresses, the requested gross amount and the threshold. Passing an optional matching wallet address adds an ordered transactions array of unsigned requests with from, to, data, value and chainId. The wallet submits each required transaction on the settlement chain.
Read observations and activity
| Endpoint | Provenance and units |
|---|---|
/market/reference | Most recent indexed Uniswap sample. block is an Elysium height, time is Unix milliseconds and price is human-readable USDC per HYPE. |
/market/candles | Reference-market OHLCV bars. Use interval=1h, limit=48 for up to 48 hourly bars. Page older history with before=nextBefore. Candle timestamps are Unix seconds. |
/market/activity | Aggregates of finalized Obelisk fills. volume24h and fees24h use quote atoms. The latter measures LP fees. |
A candle can have partialVolume: true when sampled prices cover a period for which traded volume is incomplete. Keep that flag when aggregating bars. To reconstruct Obelisk execution volume, read settlement events or the activity endpoint. Current source observation ↗
Inspect balances, positions and receipts
/wallet/balances?address=… returns native gas, WHYPE and tUSDC atom balances at blockNumber. /liquidity/positions?address=… returns the open position IDs, occupied steps and current pro-rata base and quote amounts at its sampled height. A position’s identity includes its pool, owner and 64-bit nonce.
Query /swap/status?hash=… with a full transaction hash. A null status means the reader has no canonical receipt for that hash. Once included, inspect status.err for success and status.confirmationStatus for confirmed or finalized. The response also supplies block height, hash and confirmations.
Interpret an unsuccessful response
Unsuccessful reads return a non-2xx HTTP status and an error string. A missing preview carries no executable amounts.
| HTTP | Typical condition and response |
|---|---|
| 400 | Malformed address, atom quantity or out-of-range tolerance. Correct the request parameters. |
| 404 | Unknown pool or position. Resolve the pool from the deployment and check the owner and nonce. |
| 409 | Reviewed reference moved during a price-sensitive operation. Request a new preview. |
| 422 | Insufficient directional inventory, dust output or a rejected contract precondition. Inspect the requested input and current pool state. |
| 503 | Oracle or chain data unavailable. Obtain a fresh observation and quote before execution. |