feat: add QuantOracle — 9 quant finance actions for composite workflows#558
feat: add QuantOracle — 9 quant finance actions for composite workflows#558fel123 wants to merge 1 commit into
Conversation
Adds QuantOracle to packages/plugin-misc. QuantOracle is a deterministic quantitative finance API with 63 calculators + 10 composite workflows, offering a 1000 free calls/IP/day tier and x402 USDC payments on Base or Solana for paid endpoints. This PR surfaces 9 high-value actions (8 composites + Black-Scholes) rather than exposing all 73 endpoints to keep scope reviewable: - QUANTORACLE_PRICE_OPTION: Black-Scholes pricing + 10 Greeks - QUANTORACLE_FULL_RISK_ANALYSIS: Complete risk tearsheet in one call - QUANTORACLE_BACKTEST_STRATEGY: SMA/RSI/momentum/Bollinger backtests - QUANTORACLE_OPTIONS_STRATEGY_OPTIMIZER: Rank options strategies by outlook + vol view - QUANTORACLE_RECOMMEND_HEDGE: Compare cheapest hedges for a position - QUANTORACLE_REBALANCE_PLAN: Generate rebalance trades + cost estimate - QUANTORACLE_MONTE_CARLO_SIM: GBM portfolio simulation - QUANTORACLE_IMPERMANENT_LOSS: Uniswap v2/v3 IL calculator - QUANTORACLE_LIQUIDATION_PRICE: Leveraged position liquidation price Notes: - No new dependencies required (uses native fetch). - Follows the same file layout as packages/plugin-misc/src/coingecko/. - 402 responses surface a clear payment-required error with x402 payment instructions (Base + Solana); the plugin itself does not auto-pay — downstream x402 clients can handle that. API: https://api.quantoracle.dev Repo: https://github.com/QuantOracledev/quantoracle
|
Friendly check-in — this PR has been open for ~13 days with no reviews yet. Happy to address any feedback whenever a maintainer has bandwidth. Quick status update since opening:
Scope kept deliberately small (9 high-leverage actions wrapping composite workflows, not all 73 raw endpoints) so the review is tractable. The free tier (1,000 calls/IP/day, no API key) means anyone reviewing this can run the actions end-to-end without paying anything. Let me know if you'd like me to adjust the action surface, split the PR, or anything else. |
|
Quick update since the May 1 check-in: Solana-native example shipped today at integrations/agentkit/example-agent-solana.ts — uses Mainnet usage: QuantOracle's x402 endpoints have now processed 171 settled transactions ($2.50 USDC) across Base and Solana, including confirmed Solana mainnet settlements via the Coinbase facilitator. The Solana facilitator route has noticeably lower per-call overhead than Base (sub-second settlement vs ~2s), which makes Solana the better fit for high-frequency agent workflows — exactly the audience solana-agent-kit serves. Happy to address any feedback whenever a maintainer has bandwidth. Nothing in the PR requires changes from your side; just wanted to flag the new Solana-specific work in case it's helpful context. |
Summary
Adds QuantOracle to
packages/plugin-misc— a deterministic quantitative finance API with 63 underlying calculators + 10 composite workflows. This PR surfaces 9 high-value actions (rather than exposing all 73 endpoints) to keep the scope reviewable.QuantOracle offers a 1,000 free calls/IP/day tier (no API key, no signup), so the actions work out-of-the-box. Past the free tier, paid endpoints return HTTP 402 with x402 payment requirements (USDC on Base or Solana) — the plugin surfaces a clear error; downstream x402-capable clients can auto-pay if desired.
Actions
QUANTORACLE_PRICE_OPTIONQUANTORACLE_FULL_RISK_ANALYSISQUANTORACLE_BACKTEST_STRATEGYQUANTORACLE_OPTIONS_STRATEGY_OPTIMIZERQUANTORACLE_RECOMMEND_HEDGEQUANTORACLE_REBALANCE_PLANQUANTORACLE_MONTE_CARLO_SIMQUANTORACLE_IMPERMANENT_LOSSQUANTORACLE_LIQUIDATION_PRICEFile layout
Mirrors `packages/plugin-misc/src/coingecko/`:
```
packages/plugin-misc/src/quantoracle/
├── actions/
│ ├── backtestStrategy.ts
│ ├── computeImpermanentLoss.ts
│ ├── computeLiquidationPrice.ts
│ ├── optimizeOptionsStrategy.ts
│ ├── planRebalance.ts
│ ├── priceOption.ts
│ ├── recommendHedge.ts
│ ├── runFullRiskAnalysis.ts
│ └── runMonteCarlo.ts
└── tools/
└── index.ts # shared fetch helper + per-endpoint methods
```
Plus wiring in `packages/plugin-misc/src/index.ts` (9 action imports + 9 method entries).
Notes
Links