Browse & Filter Orders
fetchOrders()
import { ethers } from 'ethers';
import { ThetanutsClient } from '@thetanuts-finance/thetanuts-client';
const provider = new ethers.JsonRpcProvider('https://mainnet.base.org');
const client = new ThetanutsClient({ chainId: 8453, provider });
const orders = await client.api.fetchOrders();
console.log(`Found ${orders.length} orders`);OrderWithSignature shape
// Key fields you'll use most often
const o = orders[0];
o.order.expiry // bigint — Unix timestamp
o.order.availableAmount // bigint — maker's collateral budget (NOT contract count)
o.order.price // bigint — price per contract (8 decimals)
o.order.isBuy // boolean — from the maker's perspective
o.rawApiData?.greeks?.delta // number — delta
o.rawApiData?.greeks?.iv // number — implied volatility (0–1)
o.rawApiData?.greeks?.theta // number — theta per day
o.rawApiData?.isCall // boolean
o.rawApiData?.strikes // bigint[] — strike(s) in 8 decimals
o.rawApiData?.underlying // 'ETH' | 'BTC'filterOrders()
Field
Type
Description
Finding a specific order
OptionBook API methods
Method
Description
Greeks from order data
Indexer stat helpers
See Also
Last updated

