Legacy OptionFactory API — retired

This page preserves the retired API format. Use the current V4 indexer for new integrations.

Retired host: of-indexer.thetanuts.finance

Retired on 10 October 2026

The legacy Worker and its custom domain have been decommissioned. The current service has a different response format; do not reuse the examples below unchanged.

Current RFQ indexer · V4 RFQ integration guide

Overview

Purpose

Indexes and tracks events from OptionFactory and related contracts, providing API access to RFQs, offers, and options data.

Network

Base Mainnet (Chain ID: 8453)

Contracts

OptionFactory: 0x1df869899C1F0f88CE2397B6770C7dCb0C249b27

Features

RFQ tracking, offer management, option lifecycle monitoring, and user activity analytics.

API Endpoints

GET /api/rfqs Get all active RFQs
Response
{ "rfqs": [ { "quotationId": "123", "requester": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6", "requesterPublicKey": "0xabcd...", "timestamp": 1704067200, "blockNumber": 29517665, "txHash": "0x1234...", "status": "active", "offers": 3, "settled": false } ], "totalRFQs": 50, "activeRFQs": 25, "lastUpdate": "2024-01-01T00:00:00.000Z" }
200 OK
GET /api/rfq/{quotationId} Get specific RFQ details
Path Parameters
Parameter Type Required Description
quotationId string Required RFQ quotation ID
Response
{ "quotationId": "123", "requester": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6", "requesterPublicKey": "0xabcd...", "timestamp": 1704067200, "blockNumber": 29517665, "txHash": "0x1234...", "status": "active", "offers": [ { "offeror": "0x9876...", "signature": "0xefgh...", "signingKey": "0xijkl...", "signedOfferForRequester": "0xmnop...", "timestamp": 1704067300, "revealed": false, "amount": null } ], "totalOffers": 3, "settled": false, "winner": null, "optionAddress": null }
200 OK 404 Not Found
GET /api/offers Get all offers
Response
{ "offers": [ { "quotationId": "123", "offeror": "0x9876...", "signature": "0xefgh...", "signingKey": "0xijkl...", "signedOfferForRequester": "0xmnop...", "timestamp": 1704067300, "blockNumber": 29517666, "txHash": "0x5678...", "revealed": false, "amount": null, "rfqStatus": "active" } ], "totalOffers": 150, "revealedOffers": 75, "lastUpdate": "2024-01-01T00:00:00.000Z" }
200 OK
GET /api/offers/{quotationId} Get offers for a specific RFQ
Path Parameters
Parameter Type Required Description
quotationId string Required RFQ quotation ID
Response
{ "quotationId": "123", "offers": [ { "offeror": "0x9876...", "signature": "0xefgh...", "signingKey": "0xijkl...", "signedOfferForRequester": "0xmnop...", "timestamp": 1704067300, "blockNumber": 29517666, "txHash": "0x5678...", "revealed": true, "amount": "50000", "amountUSD": 50.00 } ], "totalOffers": 3, "revealedOffers": 2, "lowestAmount": "50000", "lowestAmountUSD": 50.00 }
200 OK 404 Not Found
GET /api/options Get all options
Response
{ "options": [ { "optionAddress": "0xabcd...", "buyer": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6", "seller": "0x9876...", "createdBy": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6", "optionType": "0x0101", "collateralToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "priceFeed": "0x71041dddad3595F9CEd3DcCFBe3D1F4b0a16Bb70", "strikes": [2000000000], "expiryTimestamp": 1704067200, "numContracts": 1, "collateralAmount": "1000000", "extraOptionData": "0x", "timestamp": 1704067200, "blockNumber": 29517665, "txHash": "0x1234...", "status": "active" } ], "totalOptions": 100, "activeOptions": 75, "expiredOptions": 25, "lastUpdate": "2024-01-01T00:00:00.000Z" }
200 OK
GET /api/options/{address} Get specific option details
Path Parameters
Parameter Type Required Description
address string Required Option contract address
Response
{ "optionAddress": "0xabcd...", "buyer": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6", "seller": "0x9876...", "createdBy": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6", "optionType": "0x0101", "collateralToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "priceFeed": "0x71041dddad3595F9CEd3DcCFBe3D1F4b0a16Bb70", "strikes": [2000000000], "expiryTimestamp": 1704067200, "numContracts": 1, "collateralAmount": "1000000", "extraOptionData": "0x", "timestamp": 1704067200, "blockNumber": 29517665, "txHash": "0x1234...", "status": "active", "expired": false, "settlementPrice": null, "payoutAmount": null, "collateralReturned": null }
200 OK 404 Not Found
GET /api/user/{address} Get user-specific data (RFQs, offers, options)
Path Parameters
Parameter Type Required Description
address string Required User's Ethereum address
Response
{ "user": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6", "rfqs": { "active": ["123", "124"], "settled": ["125"], "cancelled": ["126"] }, "offers": { "active": ["127", "128"], "revealed": ["129"], "cancelled": ["130"] }, "options": { "active": ["0xabcd...", "0xefgh..."], "expired": ["0xijkl..."], "closed": ["0xmnop..."] }, "totalRFQs": 3, "totalOffers": 4, "totalOptions": 4, "lastUpdate": "2024-01-01T00:00:00.000Z" }
200 OK 404 Not Found
GET /api/state Get current cached state (debug)
Response
{ "lastProcessedBlock": 29517665, "totalEvents": 2000, "totalRFQs": 50, "totalOffers": 150, "totalOptions": 100, "cacheTimestamp": "2024-01-01T00:00:00.000Z", "stateSize": "5.2MB" }
200 OK
POST /api/update Trigger manual state update
Response
{ "status": "success", "message": "State update completed", "blocksProcessed": 1000, "eventsProcessed": 100, "processingTime": "3.2s", "lastProcessedBlock": 29518665, "timestamp": "2024-01-01T00:00:00.000Z" }
200 OK 500 Internal Error

CORS Configuration

The following origins are whitelisted for CORS access: