Analytics Rail
Analytics Rail
Section titled “Analytics Rail”Real-time analytics and insights endpoints.
Overview
Section titled “Overview”The Analytics rail provides:
- Real-time metrics
- Historical analysis
- Custom queries
- Dashboard data
Powered by our analytics engine for high-performance analytics.
Endpoints
Section titled “Endpoints”Query Metrics
Section titled “Query Metrics”POST /v1/analytics/queryconst metrics = await iof.analytics.query({ metric: "contract_volume", dimensions: ["type", "jurisdiction"], period: { start: "2024-01-01", end: "2024-01-31", }, granularity: "daily",});Response:
{ "data": [ { "date": "2024-01-15", "type": "MURABAHA", "jurisdiction": "MY", "value": 150, "amount": 5000000 } ], "summary": { "total": 450, "totalAmount": 15000000 }}Get Dashboard
Section titled “Get Dashboard”GET /v1/analytics/dashboardconst dashboard = await iof.analytics.getDashboard({ workspaceId: "ws_123", period: "30d",});Response:
{ "overview": { "totalContracts": 450, "activeContracts": 380, "totalVolume": 15000000, "monthlyGrowth": 0.12 }, "charts": { "volumeByDay": [...], "contractsByType": [...], "topCounterparties": [...] }}Create Report
Section titled “Create Report”POST /v1/analytics/reportsconst report = await iof.analytics.createReport({ type: "monthly_summary", period: { start: "2024-01-01", end: "2024-01-31", }, format: "pdf",});Get Trends
Section titled “Get Trends”GET /v1/analytics/trendsconst trends = await iof.analytics.getTrends({ metric: "transaction_volume", comparison: "mom", // month-over-month});Available Metrics
Section titled “Available Metrics”| Metric | Description |
|---|---|
contract_volume | Number of contracts |
contract_value | Total contract value |
transaction_volume | Transaction count |
transaction_value | Transaction value |
kyc_completion_rate | KYC success rate |
average_processing_time | Processing time |
Dimensions
Section titled “Dimensions”| Dimension | Description |
|---|---|
type | Contract type |
jurisdiction | Geographic region |
counterparty | Counterparty ID |
status | Resource status |
currency | Currency code |
Granularity
Section titled “Granularity”| Value | Description |
|---|---|
hourly | Per hour |
daily | Per day |
weekly | Per week |
monthly | Per month |
Next Steps
Section titled “Next Steps”- Reporting Rail - Regulatory reports
- Search Rail - Data queries