Skip to main content

Greek Options API

HTTP API for listing Greek.fi option markets on Ethereum mainnet, reading indicative prices, preparing wallet approvals, and requesting firm executable RFQ quotes backed by Bebop settlement.

Using an AI coding agent? Point your agent directly at the plain-text and machine-readable files served from this site: llms.txt (index), llms-full.txt (complete guide in Markdown), reference.md (Markdown alias), and openapi.json (OpenAPI 3.1 schema).

  • Base URL: https://api00.greek.fi
  • Chain: Ethereum mainnet (chainId: 1)
  • Auth: None required to start. Optional X-Api-Key header for server-to-server integrators.
  • Custody: Non-custodial. Every executable endpoint returns an unsigned transaction (tx: { to, data, value }) that the taker wallet signs and broadcasts directly.

Paths under /options/ethereum/v1/... mirror the Bebop Options API 1:1. Paths under /greek/v1/... add wallet-scoped positions and on-chain readiness checks with unsigned setup transactions.

Quickstart​

Every trade follows the same sequence: browse markets and indicative prices from cached public endpoints, run /greek/v1/readiness to send any missing wrap/approval/permission transactions, request a firm /quote, and broadcast the returned tx before expiry (at most 60 seconds).

1. Discover markets and indicative prices (no wallet required)​

Fetch active instruments and indicative quotes without connecting a wallet or spending quote budget:

curl "https://api00.greek.fi/options/ethereum/v1/instruments?option_type=call&limit=10"
curl "https://api00.greek.fi/options/ethereum/v1/assets/ETH/summary"

Use /assets/{underlying}/summary (edge-cached 3 seconds) for UI pricing, APRs, implied volatility, and polling. Only call /quote when a funded wallet is ready to execute.

2. Prepare and execute a sell-to-open trade (TypeScript + viem)​

import { createPublicClient, createWalletClient, http, type Address, type Hex } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { mainnet } from "viem/chains";

const API = "https://api00.greek.fi";
const HEADERS: Record<string, string> = {
// Optional: add your integrator key for server-side backends.
// "X-Api-Key": process.env.GREEK_API_KEY!,
};

const account = privateKeyToAccount(process.env.TAKER_PRIVATE_KEY as Hex);
const publicClient = createPublicClient({ chain: mainnet, transport: http(process.env.RPC_URL) });
const walletClient = createWalletClient({ account, chain: mainnet, transport: http(process.env.RPC_URL) });

async function getJson<T>(path: string): Promise<T> {
const res = await fetch(`${API}${path}`, { headers: HEADERS });
const body = await res.json();
if (!res.ok) throw new Error(`${res.status} ${body?.error?.code}: ${body?.error?.message}`);
return body as T;
}

async function openShortCall(instrument: Address, amountWei: string) {
// 1. Check collateral, allowance, factory permissions, and existing option balance.
const readiness = await getJson<{
ready: boolean;
issues: string[];
steps: { kind: string; description: string; tx: { to: Address; data: Hex; value: string } }[];
}>(`/greek/v1/readiness?trade=open&wallet=${account.address}&instrument=${instrument}&amount=${amountWei}`);

// 2. Execute any required wrap, ERC20 approve, or Factory.addPermissions transactions.
for (const step of readiness.steps) {
const hash = await walletClient.sendTransaction({
to: step.tx.to,
data: step.tx.data,
value: BigInt(step.tx.value),
});
await publicClient.waitForTransactionReceipt({ hash });
}

// 3. Request a firm quote (requires collateral token balance >= amountWei on-chain).
const quote = await getJson<{
quoteId: string;
positionId: string;
premium: string;
expiry: number;
tx: { to: Address; data: Hex; value: string };
}>(`/options/ethereum/v1/quote?instrument=${instrument}&amount=${amountWei}&taker_address=${account.address}`);

// 4. Broadcast the settlement transaction directly from taker_address before quote.expiry.
const fillHash = await walletClient.sendTransaction({
to: quote.tx.to,
data: quote.tx.data,
value: BigInt(quote.tx.value),
});
await publicClient.waitForTransactionReceipt({ hash: fillHash });
return { quoteId: quote.quoteId, positionId: quote.positionId, fillHash };
}

3. List, close, or roll a position​

  1. Fetch the wallet's open positions via GET /greek/v1/wallets/{wallet}/positions.
  2. Call GET /greek/v1/readiness?trade=close&wallet={wallet}&position_id={positionId} (or trade=roll&instrument={newInstrument}) and send any returned steps (USDC approval to settlement, BURN or ROLL factory permission).
  3. Request GET /options/ethereum/v1/positions/{positionId}/quote (buy to close) or GET /options/ethereum/v1/positions/{positionId}/roll (atomic close + open) and broadcast tx from the position's wallet before expiry.

Conventions and access​

  • Units: Token amounts are raw integer units encoded as decimal strings (e.g. 10000000000000000 for 0.01 WETH, 1000000 for 1 USDC). Timestamps are Unix seconds.
  • Parameters: Query parameters use snake_case, except Bebop's includeExpired and includeRetiredFactories. JSON response fields use camelCase.
  • Addresses: Accepted in any case; returned lowercased or as provided by Bebop.
  • Response headers: Every response includes X-Request-Id (gk-<uuid>) and Cache-Control (no-store on quotes and positions; public, max-age=..., s-maxage=..., stale-while-revalidate=... on public catalogue endpoints). 429 and 503 responses include Retry-After in seconds.
  • Client Authorization header: Ignored and never forwarded upstream.

Authentication tiers​

TierHeaderIntended callerRate limit scope
AnonymousNoneBrowsers (greek.fi), quick tests, single-wallet scriptsPer IP + per taker wallet
IntegratorX-Api-Key: gk_live_...Backend aggregators, vaults, trading botsPer integrator RPM (quote_rpm, close_rpm, read_rpm) + per taker wallet (bypasses per-IP caps)

Contact the Greek team to request an X-Api-Key with custom per-minute quotas.

Asset-aware gating and rate limits​

Firm quote endpoints enforce on-chain readiness and abuse controls before spending upstream maker capacity:

  1. Geo-blocking (451 GeoBlocked): Applied on firm quote endpoints (/quote, close, roll) for restricted jurisdictions (US, CA, SG, CN, CU, IR, KP, SY, T1). Public catalogue, summary, status, readiness, and position read endpoints are not geo-blocked.
  2. Sanctions check (403 Sanctioned): Checked against the Chainalysis sanctions oracle on Ethereum mainnet (0x40C57923924B5c5c5455c48D93317139ADDaC8fb).
  3. Asset check (409 NotReady): Open quotes require collateralBalance >= amount (and optionBalance == 0 so Bebop does not reject with ExistingOptionBalance). Close and roll quotes require receiptBalance > 0. Unwrapped ETH does not satisfy a WETH collateral check; wrap first via /greek/v1/readiness.
  4. Funded vs. unfunded limits:
    • Public cached data (/instruments, /summary, /status): 240/min per IP (or per integrator).
    • Funded open quotes: 120/min per taker, 120/min and 30/10s burst per anonymous IP (no IP cap with X-Api-Key), bounded by the shared upstream pool (45 / 3s).
    • Funded close/roll quotes: 30/min per taker, bounded by the shared close pool (8 / 10s).
    • Position reads and readiness: 60/min per anonymous IP (or integrator read_rpm).
    • Unfunded throttle: Wallets that fail the asset check repeatedly are throttled with 429 RateLimited before calling RPC. Funding the wallet clears the throttle on the next successful check.
    • Duplicate quote dedupe: Repeating the exact same (taker, instrument, amount) within 5s returns 429 RateLimited.
    • Zero-fill guardrail: Takers with more than 30 resolved open quotes in 24 hours and 0 on-chain fills drop to 1 quote/min until fills resume.

Contracts and permissions​

ContractMainnet addressRole
BebopSettlement0xbbbbbBB520d69a9775E85b458C58c648259FAD5Ftx.to target for all executable quotes; operator for factory permissions and USDC close-premium allowance
WETH0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2Call collateral (18 decimals)
USDC0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48Put collateral and option premium token (6 decimals)
Greek FactoryReturned per instrument in factorySpender for open collateral allowance (approve(factory, amount)) and target for addPermissions(BebopSettlement, mask)

Factory permission bitmasks (always pass to addPermissions, never setPermissions, to avoid overwriting existing bits):

TradeRequired bitsDecimal mask
Open (sell to open)TRANSFER (1) | MINT (2)3
Close (buy to close)BURN (4)4
Roll (close + open)TRANSFER (1) | MINT (2) | BURN (4)7

Public data endpoints​

GET /options/ethereum/v1/instruments​

Lists Greek option instruments. Edge-cached for 60 seconds (stale-while-revalidate=60).

ParamTypeRequiredNotes
instrumentaddressnoFilter by option token address
underlyingaddressnoFilter by underlying token address
quoteaddressnoFilter by quote token address
option_typecall | putnoFilter by option type
expiration_fromintegernoMinimum expiration (Unix seconds)
expiration_tointegernoMaximum expiration (Unix seconds)
includeExpiredbooleannoDefault false
includeRetiredFactoriesbooleannoDefault false
limitintegerno1 to 200, default 50
cursorstringnoOpaque nextCursor from previous page
{
"instruments": [
{
"instrument": "0xf4ef7ba1eb4a8781f2137c732630969e9eebbb22",
"receipt": "0x16870687ae254ca4f326c9a77929072b68dcc1e2",
"name": "OPTE-C-WETH-USDC-1700-2026-11-27",
"symbol": "OPTE-C-WETH-USDC-1700-2026-11-27",
"receiptSymbol": "RCTE-C-WETH-USDC-1700-2026-11-27",
"underlying": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"quote": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"collateral": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"settlement": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"collateralSymbol": "WETH",
"settlementSymbol": "USDC",
"decimals": 18,
"collateralDecimals": 18,
"settlementDecimals": 6,
"optionType": "call",
"exerciseStyle": "european",
"strike": "1700",
"strikeRaw": "1700000000000000000000",
"expiration": 1795766400,
"exerciseDeadline": 1795770000,
"exerciseWindowSeconds": 3600,
"canSell": true,
"canBuy": true,
"factory": "0x9999999999906a9a5b3cfb1151ac6812b3042191",
"exercisedTotal": "0",
"maxUnderlyingAmount": "350000000000000000000",
"lastExerciseAt": null
}
],
"nextCursor": null
}

GET /options/ethereum/v1/assets/{underlying}/summary​

Returns indicative pricing, Greeks, and open interest across all active expiries for an underlying. Edge-cached for 3 seconds (stale-while-revalidate=10). Indicative only, never executable.

ParamTypeRequiredNotes
underlyingpathyesSymbol (ETH, cbBTC) or underlying token address
{
"asset": "ETH",
"underlying": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"quote": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"schemaVersion": 5,
"indicativeOnly": true,
"sequence": 1234,
"spot": 1697.07,
"computedAt": 1795493810,
"expiries": [
{
"expiration": 1795766400,
"forward": 1697.14,
"atmIv": 0.6449,
"timeToExpiry": 0.0087,
"instruments": [
{
"instrument": "0xa48ad6a262774f2b217215b1933d4975d4ae29d1",
"strike": "1400",
"optionType": "put",
"canSell": true,
"canBuy": true,
"pricingStatus": "available",
"pricing": {
"markIv": 1.1627,
"bidPremiumUsd": 2.2543,
"markPremiumUsd": 2.4951,
"askPremiumUsd": 2.7502,
"netPremiumUsd": 2.0852,
"sellToOpenApr": 0.1701,
"forwardDelta": -0.0333,
"impliedItmProbability": 0.03,
"vegaPerVolPoint": 0.05
},
"statistics": { "openInterest": {}, "lastTrade": null }
}
]
}
]
}

GET /options/ethereum/v1/status​

Returns upstream venue availability ({ "status": "available" } or "unavailable"). Edge-cached for 10 seconds.

Firm quote endpoints​

Firm quotes are never cached (Cache-Control: no-store). Only the specified taker wallet can execute the returned tx.

GET /options/ethereum/v1/quote​

Requests a firm sell-to-open quote and unsigned settlement transaction.

ParamTypeRequiredNotes
instrumentaddressyesOption token address from /instruments
amountstringyesRaw collateral units (>= 0.001 WETH for WETH calls, >= 0.00003 cbBTC for cbBTC calls, >= 1 USDC for puts)
taker_addressaddressyesWallet that will sign and broadcast tx
validatebooleannoHandled locally from the proxy's on-chain check; populates issues without burning Bebop's strict validation limit
{
"requestId": "0e5ad13e-3cd4-44de-ae40-8f4107096fd9",
"quoteId": "opt-89460930558919916945084727734426678678",
"positionId": "pos-1-0x8bba85212763d59038b1e717db7a67e4b727f70e-0xf4ef7ba1eb4a8781f2137c732630969e9eebbb22",
"chainId": 1,
"instrument": "0xf4ef7ba1eb4a8781f2137c732630969e9eebbb22",
"side": "sell",
"amount": "10000000000000000",
"premium": "485203",
"fee": "39340",
"expiry": 1795438930,
"issues": null,
"tx": {
"to": "0xbbbbbBB520d69a9775E85b458C58c648259FAD5F",
"data": "0x4dcebcba...",
"value": "0"
},
"iv": 0.623,
"delta": 0.5884,
"spotPrice": 1721.04,
"display": {
"isItm": true,
"intrinsicUsd": 20.24,
"grossTimeValueUsd": 32.21,
"feeUsd": 3.93,
"netTimeValueUsd": 28.28,
"yieldApr": 1.565,
"collateralUsd": 1720.42,
"riskLevel": "caution",
"impliedItmProbability": 0.561
}
}

premium is the net amount the taker receives after fee. Broadcast tx before expiry (at most 60 seconds).

GET /options/ethereum/v1/positions/{positionId}/quote​

Requests a firm buy-to-close quote for an open position.

ParamTypeRequiredNotes
positionIdpathyesFormat pos-1-<wallet>-<instrument>
amountstringnoRaw receipt/option units for a partial close; omit for full close
validatebooleannoPopulates issues locally using the returned premium (USDC balance, USDC allowance to settlement, BURN permission)

Response matches /quote with side: "buy". premium is the amount the taker pays, including fee.

GET /options/ethereum/v1/positions/{positionId}/roll​

Requests an atomic roll quote closing positionId and opening instrument in a single transaction.

ParamTypeRequiredNotes
positionIdpathyesExisting position (pos-1-<wallet>-<instrument>)
instrumentaddressyesTarget option token (same underlying, option type, collateral, quote token, and factory)
validatebooleannoPopulates issues locally (close premium + roll collateral allowance + mask 7)
{
"requestId": "...",
"rollId": "...",
"chainId": 1,
"close": { "quoteId": "...", "positionId": "...", "instrument": "0xOLD", "side": "buy", "amount": "...", "premium": "...", "fee": "0", "iv": 0.6 },
"open": { "quoteId": "...", "positionId": "...", "instrument": "0xNEW", "side": "sell", "amount": "...", "premium": "...", "fee": "3000", "iv": 0.6 },
"netPremium": "...",
"collateralDelta": "...",
"fee": "3000",
"expiry": 1795438930,
"issues": null,
"tx": { "to": "0xbbbbbBB520d69a9775E85b458C58c648259FAD5F", "data": "0x...", "value": "0" },
"display": {},
"assignmentRisk": { "old": 0.56, "new": 0.31 }
}

netPremium equals open premium minus close premium (negative when the taker pays net USDC).

Position endpoints​

GET /greek/v1/wallets/{wallet}/positions​

Returns positions opened through this API filtered to a single wallet, newest first. Calling unfiltered GET /options/ethereum/v1/positions returns 400 InvalidRequest pointing here.

ParamTypeRequiredNotes
walletpathyesTaker wallet address
limitintegerno1 to 50, default 20
cursorstringnoOpaque cursor from previous page

Response: { "positions": [ ... ], "nextCursor": null }.

GET /options/ethereum/v1/positions/{positionId}​

Returns a single position by ID. Bebop indexes mined fills after roughly 30 seconds (404 NotFound until indexed).

{
"positionId": "pos-1-0xwallet-0xinstrument",
"openingQuoteId": "opt-...",
"chainId": 1,
"instrument": "0x...",
"takerAddress": "0xwallet",
"openedAmount": "10000000000000000",
"closedAmount": "0",
"remainingAmount": "10000000000000000",
"premiumReceived": "485203",
"premiumPaid": "0",
"status": "open",
"openingTransactionHash": "0x...",
"openedAt": 1795438900,
"updatedAt": 1795438930,
"rtBalance": "10000000000000000",
"phase": "...",
"redeemable": null,
"pnl": { "currency": "USDC", "realized": null, "unrealized": "...", "total": "..." },
"yield": {}
}

status values: open, closed, expired_pending_exercise, exercised, expired_unexercised, redeemed.

GET /options/ethereum/v1/positions/{positionId}/transactions​

Returns fill history for a position (type: sell_to_open or buy_to_close).

{
"positionId": "pos-1-0xwallet-0xinstrument",
"transactions": [
{
"type": "sell_to_open",
"amount": "10000000000000000",
"premium": "485203",
"txHash": "0x...",
"timestamp": 1795438900,
"rollId": null
}
]
}

Readiness and health​

GET /greek/v1/readiness​

Inspects on-chain wallet state in a single multicall and returns exact unsigned setup transactions (steps) needed before quoting. Reads Ethereum mainnet directly and never calls Bebop.

ParamTypeRequiredNotes
walletaddressyesTaker wallet address
tradeopen | close | rollyesTrade flow to evaluate
instrumentaddressfor open and rollTarget option token address
amountstringfor openRaw collateral units
position_idstringfor close and rollMust belong to wallet
premiumstringnoExpected close premium in raw USDC; omit to check permissions only
{
"wallet": "0x8bba85212763d59038b1e717db7a67e4b727f70e",
"trade": "open",
"instrument": "0xf4ef7ba1eb4a8781f2137c732630969e9eebbb22",
"amount": "10000000000000000",
"ready": false,
"canSell": true,
"issues": ["insufficient_collateral_allowance", "missing_factory_permissions"],
"checks": {
"sanctioned": false,
"collateral": {
"token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"balance": "50000000000000000",
"required": "10000000000000000",
"ethBalance": "1000000000000000000"
},
"allowance": {
"spender": "0x9999999999906a9a5b3cfb1151ac6812b3042191",
"current": "0",
"required": "10000000000000000"
},
"permissions": {
"operator": "0xbbbbbBB520d69a9775E85b458C58c648259FAD5F",
"current": 0,
"required": 3
},
"existingOptionBalance": "0"
},
"steps": [
{
"kind": "approve",
"description": "Allow the Greek Factory to pull 0.01 WETH",
"tx": { "to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "data": "0x095ea7b3...", "value": "0" }
},
{
"kind": "addPermissions",
"description": "Let Bebop settlement transfer and mint option tokens (mask 3)",
"tx": { "to": "0x9999999999906a9a5b3cfb1151ac6812b3042191", "data": "0x...", "value": "0" }
}
],
"blockNumber": 23812345
}

Possible steps[].kind values:

  • wrap: Included when WETH collateral is short and the wallet's native ETH covers the shortfall (WETH.deposit() with value set to the exact shortfall).
  • approve: Exact ERC20 approve(spender, amount).
  • addPermissions: Calls Factory.addPermissions(BebopSettlement, missingBits) with only the missing bits.

Possible issues values: missing_factory_permissions, insufficient_collateral_balance, insufficient_collateral_allowance, insufficient_premium_balance, insufficient_premium_allowance.

GET /health​

Returns proxy health, version, circuit-breaker state, and count of currently throttled zero-fill takers:

{
"ok": true,
"version": "0.1.0",
"upstream": {
"lastStatus": 200,
"lastSuccessAt": 1795493810,
"breaker": "closed",
"throttledTakers": 0
}
}

Errors​

All errors share one JSON shape:

{
"requestId": "gk-3f1c2a8e-...",
"error": {
"code": "NotReady",
"message": "wallet holds less WETH than amount; see /greek/v1/readiness"
},
"upstreamRequestId": null
}

When an error originates from Bebop, upstreamRequestId carries Bebop's requestId for support tracing.

HTTPCodeMeaning
400InvalidRequest, InvalidAddress, InvalidAmountMissing or malformed parameter
400InstrumentNotSellableInstrument has canSell: false
400MinNotional, MaxSize, InstrumentExpired, InvalidRoll, TakerIsMakerTrade violates instrument or venue bounds
401InvalidApiKeyX-Api-Key header is malformed or unknown
403ApiKeyRevokedX-Api-Key has been revoked
403SanctionedTaker wallet is flagged by the Chainalysis sanctions oracle
404UnknownInstrument, NotFound, PositionNotFoundInstrument or position not found
409NotReadyWallet lacks collateral for open or receipt balance for close/roll
409ExistingOptionBalanceWallet already holds option tokens of the instrument
429RateLimitedCaller exceeded IP, taker, integrator, unfunded, or 5s dedupe limit; check Retry-After
451GeoBlockedRequest originated from a restricted jurisdiction
502ChainUnavailable, UpstreamUnavailable, UpstreamErrorRPC or upstream venue failure
503NoValidMakerQuoteNo maker returned a valid quote for this instrument and size
503UpstreamBusyShared upstream budget exhausted or circuit breaker open; check Retry-After