Open appRead the docs
Docs

SDK, API, MCP

Read the price and plan positions from code, from a REST call, or from an agent.

REST

curl https://mintisium.xyz/api/v1/price
{ "mark": 31.2, "bid": 31.19, "ask": 31.21, "spreadBps": 6.4,
  "rate": 1.0021, "khypeUsd": 31.27, "evmBlock": 21500000, ... }

curl https://mintisium.xyz/api/v1/troves
{ "deployed": true, "chainId": 99901, "size": 1,
  "troves": [{ "id": "0x…", "coll": "5.0", "debt": "201.0", "ratio": 1.71 }], ... }

MCP server

JSON-RPC 2.0 over HTTP POST at /api/mcp, with three tools: health, redeem_quote, open_trove.

curl -X POST https://mintisium.xyz/api/mcp -H 'content-type: application/json' -d '{
  "jsonrpc":"2.0","id":1,"method":"tools/call",
  "params":{"name":"open_trove","arguments":{"khype":100,"ratio":1.8}}}'

Calling the contracts

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

// approve kHYPE to BorrowerOps, then:
await wallet.writeContract({
  address: BORROWER_OPS, abi: borrowerOpsAbi, functionName: "open",
  args: [parseUnits("100", 18), parseUnits("1500", 18), 50n /* max fee, bps */, ZERO, ZERO],
});

// liquidate everything under 110%:
await wallet.writeContract({ address: TROVE_MANAGER, abi, functionName: "liquidateMany", args: [ids] });

The addresses are on the overview: TroveManager 0x1605E741E7D791E40D3a86bF2B36331553d89325, BorrowerOps 0x81f51544eB2432Aa67a8f00f3F7f4f3e0ea40353, eUSD 0x648AaDa17a54a32b5A7DFAef052C6F536731Ef5C, all on Elysium (99901).