HOOZ

API

The site routes and the upstream NEAR Intents and Relay calls behind them, with request and response shapes.

The site serves four routes. Anyone may call them. Amounts come back as strings; do arithmetic on the wei fields.

GET /api/quote?amountZec=0.1

{
  "zecIn": "0.1",
  "route": "direct",
  "ethOnHood": "0.054283358232221438",
  "ethOnHoodWei": "54283358232221438",
  "viaArbitrum": { "ethOnArb": "0.054011853017851908", "ethOnHood": "0.053970198610548618" },
  "feeBps": 50,
  "feeApplies": false,
  "feeEth": "0",
  "ethToCurve": "0.054283358232221438",
  "usdIn": "149.88",
  "usdOut": "149.70",
  "timeEstimateSeconds": 454,
  "at": "2026-09-21T16:41:30.989Z"
}

feeApplies turns true once the Sorter and $WHOZ exist. The site caches each amount for thirty seconds.

GET /api/rails

Direct rail, Arbitrum rail and Relay availability, plus the Robinhood Chain block and gas price. Cached for sixty seconds.

POST /api/orders

Body {"amountZec":"0.1","beneficiary":"0x…","refundTo":"t1…"}. Returns the order with depositAddress, recipient, mode (eth before launch, whoz after), ethOut and deadline. Errors: 400 with {error} on validation, 503 when the direct rail refuses and no courier is configured.

GET /api/orders/:depositAddress

Reads NEAR Intents status and maps it to the tracker's states. POST with {"txHash":"…"} forwards your Zcash transaction id to NEAR Intents.

GET /api/ledger

Sorter totals (null until deployed) and the rails.

Upstream: NEAR Intents 1Click

Base https://1click.chaindefuser.com.

POST /v0/quote
{
  "dry": false,
  "swapType": "EXACT_INPUT",
  "slippageTolerance": 100,
  "originAsset": "nep141:zec.omft.near",
  "depositType": "ORIGIN_CHAIN",
  "destinationAsset": "nep141:hood.omft.near",
  "amount": "10000000",
  "refundTo": "t1…",
  "refundType": "ORIGIN_CHAIN",
  "recipient": "0x… beneficiary or envelope",
  "recipientType": "DESTINATION_CHAIN",
  "deadline": "…"
}

Then GET /v0/status?depositAddress=… until SUCCESS, REFUNDED or FAILED. Without a partner key 1Click adds 25 bps. Set ONECLICK_JWT to use a partner key.

Upstream: Relay

POST https://api.relay.link/quote with origin chain 42161, destination chain 4663, native ETH on both sides, recipient = envelope. The courier sends steps[0].items[0].data on Arbitrum One and polls GET /intents/status?requestId=….

Reading the chain yourself

RPC https://rpc.mainnet.chain.robinhood.com, chain id 4663, explorer robinhoodchain.blockscout.com. The Sorter ABI lives in src/lib/abi.ts.