Provisioning: 5 Lines
Autonomous corporate rebalancing (USDC to CETES) on mainnet, invite-only while legal review concludes.
import { Agent } from "nirium";
const agent = new Agent({
apiKey: process.env.NIRIUM_API_KEY,
baseUrl: "https://nirium-agent.fly.dev",
});
// Live market data - rates attributed to their source
const market = await agent.getMarket();
// The node catalog: what runs, on which network
const nodes = await agent.getNodes();
// Anchor evidence to IPFS and get a verifiable CID back
const { cid } = await agent.anchorAuditRecord({ hash: "<sha256>" });B2B Micropayments for Agents
x402 for API-level atomic payments. MPP Charge (experimental, not available on mainnet) for per-request settlement without an external facilitator.
x402 - Atomic Per-call Payment
Linux Foundation Standard
import { Agent } from "nirium";
const agent = new Agent({ baseUrl: "https://nirium-agent-mainnet.fly.dev" });
// PAY for someone else's API. The 402, the signature and the retry
// happen underneath - you just await a fetch.
agent.initX402({
secretKey: process.env.STELLAR_SECRET_KEY, // or { signer } from a wallet
network: "stellar:pubnet",
});
const res = await agent.x402Fetch(
"https://nirium-agent-mainnet.fly.dev/api/v1/premium/market", // $0.05 USDC
);
const data = await res.json();
// ─────────────────────────────────────────────────────────────
// CHARGE for YOUR OWN API. Same rail, other side of the counter.
// Funds go payer → you. They never touch Nirium.
// Third-party facilitator use is invite-only while legal review closes -
// same gate as Treasury and Payouts. Request access before integrating.
import { x402Serve } from "nirium";
app.use("/premium", x402Serve({
payTo: "G...", // your Stellar address
routes: { "GET /signals": "$0.02" },
facilitatorApiKey: process.env.X402_FACILITATOR_API_KEY,
}));Known limitation: x402Serve() verifies and settles the payment; it does not deduplicate a payment proof across requests or rate-limit callers. Add your own protection if you need either. issue #91
Pay per request
The same wallet that signed you in can pay for an API call. $0.02 USDC, no card, no subscription - and no XLM: Pollar sponsors the account reserve and the x402 facilitator sponsors the network fee.
MPP - Corporate Settlement
Stripe/Tempo Spec
import { Agent } from "nirium";
// MPP Charge client (experimental): the server answers 402 with a challenge,
// the client signs a full USDC transfer and retries. No external facilitator.
// Nirium's hosted testnet endpoint accepts MPP Charge (verified 15 Oct 2026).
// Mainnet is not tested; for paid access on mainnet, use x402.
const agent = new Agent({ apiKey: "unused" });
agent.initMpp({ secretKey: process.env.STELLAR_SECRET_KEY, mode: "pull" }); // testnet key with USDC
const res = await agent.mppFetch("https://nirium-agent.fly.dev/api/v1/mpp/signals");
| Endpoint | Price | Network |
|---|---|---|
| GET /api/v1/premium/signals | $0.02 | Testnet onlyneeds the autonomous loop, disabled on the mainnet box |
| GET /api/v1/premium/market | $0.05 | Mainnet + testnet |
| POST /api/v1/premium/execute | $0.25 | Testnet onlyneeds a signing key the mainnet box deliberately does not hold |
| GET /api/v1/mpp/signals | $0.02 | testnet: verified 15 Oct 2026 · mainnet: not testedsettled payments on Horizon testnet; for paid access on mainnet, use x402 |
| GET /api/v1/mpp/market | $0.05 | testnet: verified 15 Oct 2026 · mainnet: not testedsettled payments on Horizon testnet; for paid access on mainnet, use x402 |
| POST /api/v1/mpp/execute | $0.25 | implemented, not testedno MPP payment has been sent to this route yet; use x402 |
| Feature | x402 | MPP Charge | MPP Channel |
|---|---|---|---|
| On-chain tx per call | ✓ | ✓ | ✗ |
| Requires SaaS facilitator | ✓ | ✗ | ✗ |
| Institution needs XLM | ✗ | Opt. | ✓ |
| Optimized for | Rapid Integration | Native B2B P2P | High-Freq Settlement |
The table compares the three protocols. Nirium runs x402 today, on testnet and mainnet; MPP Charge is experimental: verified on testnet (15 Oct 2026). MPP Channel requires a funded on-chain channel contract, so it stays behind the same external-audit gate as the treasury vault - the endpoints exist and report channel mode as disabled.
MCP Server
Claude & Cursor
Connect your Claude Desktop or Cursor instance to your infrastructure in 2 minutes. Enable your node to manage corporate capital securely and auditably.
// Claude Desktop config (~/.claude/claude_desktop_config.json)
{
"mcpServers": {
"nirium": {
"command": "npx",
"args": ["-y", "nirium-mcp"],
"env": {
"NIRIUM_API_KEY": "your_key_here"
}
}
}
}11 Base Operations
get_market_stateGet live tickers: XLM/USDC price, base fee, Blend supply rate
get_loop_statusCheck autonomous loop status, scan count, and uptime
start_loopStart the autonomous market scanning loop (Auth)
stop_loopStop the autonomous market scanning loop (Auth)
execute_demoSimulate a strategy via Soroban dry-run (Free)
get_premium_signalsMarket signals from the autonomous loop, testnet only - factual data, not a recommendation ($0.02 USDC)
get_premium_marketMarket state with reference rates attributed to their source, via x402 ($0.05 USDC)
execute_paid_strategyExecute strategy on-chain via x402, testnet only - needs a signing key the mainnet box does not hold ($0.25 USDC)
Telemetry Hub
86 Endpoints architected strictly for institutional autonomous routing and forensic export (for operators subject to Fintech Law).
Core B2B Infrastructure
/healthLiveness probe
/api/infoAgent metadata, network and version
/api/tickersCETES + Blend reference rates
/api/nodesExecution Node catalog (status + custody)
/api/loop/statusAutonomous loop state + last decision
/api/execute-demoRun a demo rebalance - no key required
/api/auth/tokenExchange credentials for a JWT
/api/auth/keysIssue an API key (also GET / DELETE)
Compliance Explorer
Auth & Security
/api/auth/token/api/auth/keys/api/health/api/authenticateTreasury Engine
/api/loop/start/api/loop/stop/api/execute/api/loop/statusCompliance & IPFS
/api/audit/log/api/audit/info/api/reporting/summary/api/reporting/exportMarket Intelligence
/api/market/api/tickers/api/strategies/api/signals/recentDisbursement & Nodes
/api/nodes/api/payroll/run/api/payroll/submit/api/payroll/onboard+18 Modular subsystems for Institutional Orchestration
Hardened Execution Nodes
Non-custodial Soroban smart contracts deployed on Stellar Testnet.
CARTJIASVFHS4JJ24GVRO3XFQD37JCJEAXVPS7SPIWB3HLBXAYQ5SICVCBKCTMTCCZQIPEESLHHEZKXYSPWNO24NEG33T2XSAAAHPISBND5CNSXXCC72F57YTPX76HAA64JQOEGHQAPSADQWSY5DWVBR66JINPFDLNCQYHICCBIELTK6YBZJU5UP2WWQEUCYKLPU6AUNZ2BQ4WWFEIE3USCIHMXQDAMAThe same endpoint the stats page calls
Behind nirium.xyz/stats is one public, unauthenticated endpoint. Nothing about it is internal - call it directly and it returns the exact same JSON the page renders.
curl https://nirium.xyz/api/statsServer-rendered, cached 5 minutes (Cache-Control: s-maxage=300) - this is only to keep GitHub’s search rate limit off real traffic, not to mask staleness; generatedAt is a real per-request timestamp.
Top-level fields
x402SettlementsMainnet payments - totals, distinct payers, each labeled internal/externaltreasuryRebalancesTreasury Node rebalance() calls, mainnetauditTrailAnchorsIPFS anchor count from our own reporting APInpm / pypiDownload counts, read live from npmjs.org / pypistats.orgexternalMergedPRsPRs merged by maintainers we don’t controlbuiltWithNiriumThird-party services selling over x402Serve(), independently checkedEvery metric object carries its own source URL - the exact query that produced it, not a claim.