Example AI agents that consume x402-enabled financial APIs from Financial Oracles Gateway.
These examples show how to build agents that pay for data using the x402 protocol (USDC on Base).
Fetches stock quotes, analyst ratings, and news using the /bundle/market_snapshot endpoint.
Screens names, addresses, and countries against OFAC lists using /bundle/sanctions_screen.
Pulls company profiles, financials, insider trades, and events using /bundle/sec_snapshot.
# Install dependencies
bun install
# Set your wallet private key (for x402 payments)
export PRIVATE_KEY=0x...
# Run the free demo (no payment needed)
bun run demo.ts
# Run a paid example
bun run market-agent.ts AAPL- Request → Agent calls an endpoint (e.g.,
GET /stocks/quote/AAPL) - 402 Response → Server returns pricing info and payment address
- Payment → Agent sends USDC on Base to the payment address
- Retry → Agent retries with
X-Payment: <tx_hash>header - Data → Server verifies payment and returns the data
The @x402/fetch SDK handles steps 2-4 automatically.
- @x402/fetch — x402 payment-aware HTTP client
- viem — Ethereum/Base wallet interactions
- Base URL:
https://agents.krumpybot.com - Free demo:
GET /demo/quote - Pricing:
GET /pricing - Discovery:
GET /.well-known/x402 - Network: Base (Chain ID 8453)
- Currency: USDC (
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)
MIT