Add QuantOracle action provider#1179
Open
fel123 wants to merge 1 commit intocoinbase:mainfrom
Open
Conversation
Adds a new action provider exposing 5 curated actions for autonomous
trading and finance agents:
- price_option (free) Black-Scholes + full Greeks
- calculate_kelly (free) Kelly Criterion optimal sizing
- simulate_portfolio (free) Monte Carlo simulation
- assess_portfolio_risk ($0.04) Composite Sharpe/Sortino/Calmar/
maxDD/VaR/CVaR/Kelly/Hurst audit
- recommend_hedge ($0.04) Ranked hedge structures (collar,
protective put, partial put, inverse)
Why deterministic finance math matters for agents:
LLMs trying to compute Black-Scholes prices, Kelly fractions, or Monte
Carlo simulations in-context drift. The numbers are wrong, the Greeks
are hallucinated, and the agent can't tell. QuantOracle's API is tested
against published textbook values (Hull, Wilmott, Lopez de Prado) with
120 accuracy benchmarks passing.
Why this fits AgentKit specifically:
The two paid composites settle automatically via the agent's wallet
using x402 micropayments on Base or Solana. No API key, no signup,
no billing infrastructure required. Free tier covers the calculator
endpoints up to 1,000 calls/IP/day.
Implementation:
- Follows the existing action-provider pattern (modeled on messari/pyth)
- Zod schemas for all 5 actions with rich descriptions for the LLM
- 9 jest tests covering happy-path, error-handling, and negative-edge
Kelly recommendations — all passing
- README.md following the directory convention
- Changeset entry as 'patch' (new feature)
API: https://api.quantoracle.dev (73 endpoints total; this provider
exposes a curated subset)
Docs: https://api.quantoracle.dev/openapi.json
Source: https://github.com/QuantOracledev/quantoracle
🟡 Heimdall Review Status
|
|
I’m interested in you help with this project skygrid thanks for your time 🤙Sent from my iPhoneOn May 8, 2026, at 7:56 PM, Heimdall ***@***.***> wrote:cb-heimdall left a comment (coinbase/agentkit#1179)
🟡 Heimdall Review Status
Requirement
Status
More Info
Reviews
🟡
0/1
Denominator calculation
Show calculation
1 if user is bot
0
1 if user is external
0
2 if repo is sensitive
0
From .codeflow.yml
1
Additional review requirements
Show calculation
Max
0
0
From CODEOWNERS
0
Global minimum
0
Max
1
1
1 if commit is unverified
1
Sum
2
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new action provider giving AgentKit agents access to deterministic quant finance math — Black-Scholes pricing, Kelly Criterion sizing, Monte Carlo simulation, full risk audits, and hedge recommendations.
The two paid composite actions (
assess_portfolio_risk,recommend_hedge) settle automatically via the agent's wallet using x402 micropayments on Base or Solana — no API key, no signup, no billing infrastructure required. This is the structural fit with AgentKit: the framework's USDC-native wallets unlock paid endpoints that traditional API-key services can't reach as cleanly.What's new
5 curated actions covering the financial decisions an autonomous trading or finance agent typically faces:
price_optioncalculate_kellysimulate_portfolioassess_portfolio_riskrecommend_hedgeFree tier: 1,000 calls/IP/day with no signup or API key, covers all three calculator actions.
Why deterministic finance math matters for agents
LLMs trying to compute Black-Scholes prices, Kelly fractions, or Monte Carlo simulations in-context drift — the numbers are wrong, the Greeks are hallucinated, and the agent can't tell. QuantOracle's API is tested against published textbook values (Hull, Wilmott, Lopez de Prado) with 120 accuracy benchmarks passing.
For agents making financial decisions, this matters: a bad Black-Scholes price is the difference between a profitable trade and a losing one.
Implementation
Follows the existing action-provider pattern (modeled on
messariandpyth):quantoracleActionProvider.ts— main class with@CreateAction-decorated methods for each actionschemas.ts— Zod schemas with rich.describe()strings for the LLMconstants.ts— API base URL (override viaQUANTORACLE_API_URLenv var)index.ts— re-exportsREADME.md— follows the directory documentation convention (Getting Started, Actions, Rate Limiting, Usage)quantoracleActionProvider.test.ts— 9 jest tests covering happy-path, error-handling, and negative-edge KellyAlso exports the new provider from
src/action-providers/index.ts(placed alphabetically afterpyth) and adds a changeset entry.Validation
pnpm run lint— cleanpnpm run build— cleanpnpm test -- quantoracle— 9/9 passingDemo
Sample agent prompts the LLM can satisfy via this provider:
price_optioncalculate_kellysimulate_portfolioassess_portfolio_risk(paid)recommend_hedge(paid)Resources
Happy to adjust scope, copy, or implementation based on review feedback.