Getting Started

InsurChain Developer Quickstart

Start querying verified solvency metrics, parametric loss events, and underwriter reserve vaults in under two minutes. InsurChain provides high-throughput endpoints with sub-second data freshness.

1. Install the SDK

npm i @insurchain/sdk
pip install insurchain

2. Initialize and Query Solvency

import { InsurChain } from '@insurchain/sdk';

// Initialize client with your API key
const client = new InsurChain({ apiKey: 'YOUR_API_KEY' });

const solvency = await client.protocols.getSolvency('nexus-mutual');
console.log(\`Capital Adequacy Ratio: \${solvency.car * 100}%\`);
Endpoint Reference

REST API Reference (v1)

All requests require an Authorization: Bearer <API_KEY> header. Responses are returned in standard UTF-8 JSON.

GET https://api.insurchain.io/v1/protocols

Fetches the list of all indexed decentralized insurance protocols, current active underwritten capacity, and Solvency II status tier.

Parameters: limit (int, default 50), chain (string, optional), min_car (float, optional)
GET https://api.insurchain.io/v1/protocols/{id}/solvency

Calculates live Solvency Margins, 99.5% Value-at-Risk, Minimum Capital Requirement (MCR), and historical payout ratios for a given protocol ID.

Parameters: id (string, required), lookback_days (int, default 365)
POST https://api.insurchain.io/v1/webhooks/subscribe

Subscribes an HTTPS callback URL to trigger upon solvency breach events (e.g. CAR dropping below 140%) or verified parametric claim disbursements.

Infrastructure Specifications

Rate Limits & Status Codes

Status Code Reason Remediation
200 OK Request succeeded Standard JSON response body provided.
401 Unauthorized Missing or invalid Bearer token Verify your API key in the Authorization header.
429 Rate Limited Quota exceeded for active tier Back off requests or upgrade to Pro / Institutional.
503 Sync In Progress Chain reorganization handling Node is re-verifying block logs. Retry after 2 seconds.