Docs / Build

SDK, API, MCP

Quotes and backing are served over a REST endpoint and an MCP server, from the same reads the contracts use.

REST

curl https://hip3shares.xyz/api/v1/shares

{ "shares": [ { "share": "NVDA-3", "market": "xyz:NVDA",
    "perpIndex": 10002, "orderAsset": 110002,
    "mark": 153.86, "oracle": 153.86, "gapBps": 0,
    "fundingPerHour": 0.00000625, "redeemable": true,
    "mintPerUsdc": 0.0064864, "redeemUsdcPerShare": 153.552 } ] }

MCP

Point an MCP client at /api/mcp (streamable HTTP). Two tools: share_quote takes a ticker and returns the quote above; backing returns the HyperEVM block and each market's status.

{ "jsonrpc": "2.0", "id": 1, "method": "tools/call",
  "params": { "name": "share_quote", "arguments": { "share": "GOLD" } } }

Calling the contracts

import { createWalletClient, custom, parseUnits } from "viem";

await wallet.writeContract({ address: USDC, abi: erc20, functionName: "approve",
  args: [QUEUE, parseUnits("1000", 6)] });
await wallet.writeContract({ address: QUEUE, abi: mintQueue, functionName: "deposit",
  args: [10002, parseUnits("1000", 6)] });

USDC on Elysium is 0xb47c4C8F73F009CC0C0d3f92B388d13E293F0B65 (6 decimals). $SHRS is 0x7f1d6b84183e3f056dc4a99520867481e776e263 (18 decimals). Contract addresses are on the backing page.