Builders: SDK, MCP and API
SDK
One ES module served by this site. Reads go through the public API; writes return calldata for your own wallet.
import { PerpHook } from "https://<this site>/sdk/elyperps.js";
const ph = new ElyPerps("https://<this site>");
const { markets } = await ph.markets();
const q = await ph.quote({ engine: markets[0].engine, isLong: false, lev: 2, margin: "1" });
const tx = ph.openCalldata({ engine: markets[0].engine, isLong: false, lev: 2, margin: "1" });
// tx = { to, data, value }: sign it with your walletMCP server
Keyless, Streamable HTTP, JSON-RPC 2.0 at /mcp. Six tools: markets, market_state, quote_open, open_calldata, close_calldata, liquidatable.
curl -s -X POST https://<this site>/mcp -H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"markets","arguments":{}}}'API
| Route | Returns |
|---|---|
/api/markets | Every market: mark, spot, depth, OI, caps, funding rate, queue, state; plus the chain head |
/api/positions?account=0x… | Open positions of an account, with a liquidatable flag |
/api/funding | Current rate per market and recent Funding events |
/api/liquidations | Recent liquidations with keeper reward and what insurance paid |
/api/insurance | Vault HYPE, skew capacity, staked, covered, slashed, burned |
/api/stats?w=24h|7d|all | Totals for the markets page |
/api/chain | Chain head, block age, whether the chain is stalled |
skill.md
/skill.md is a single file an agent can read to trade, keep or LP on ElyPerps.