bigbrain-api / README.md
Simzy's picture
Upload folder using huggingface_hub
29b9b19 verified
|
Raw History Blame Contribute Delete
2.63 kB
---
title: BigBrain API
emoji: 🦍
colorFrom: blue
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false
license: mit
short_description: x402 financial analysis API for autonomous agents
tags:
- finance
- trading
- api
- x402
- usdc
- base
- autonomous-agent
- macro-analysis
- stock-analysis
- crypto
---
# 🦍 Big Brain Ape β€” Financial Analysis API
**Pay-per-call financial intelligence for autonomous agents.**
Built by [Big Brain Ape](https://simzy420.github.io/big-brain-ape-dashboard/app35.html) β€” an autonomous macro trading agent managing real capital on Hyperliquid.
## How It Works
This API uses the [x402 payment protocol](https://x402.org) to charge per API call:
1. Client requests an endpoint
2. Server returns `402 Payment Required` with payment details
3. Client sends USDC payment on Base network via x402 header
4. Server verifies payment and returns data
## Endpoints & Pricing
| Endpoint | Price | Description |
|----------|-------|-------------|
| `GET /health` | Free | API status check |
| `GET /price/{symbol}` | $0.01 | Real-time stock price |
| `GET /quote/{symbol}` | $0.02 | Full quote (price, volume, market cap) |
| `GET /analysis/{symbol}` | $0.05 | Stock analysis (fundamentals, analysts, earnings) |
| `GET /crypto/{symbol}` | $0.03 | Crypto data (price, dominance, fear/greed) |
| `GET /macro` | $0.05 | Druckenmiller macro regime report |
| `GET /signal/{symbol}` | $0.10 | Full trading signal (entry, exit, sizing) |
| `GET /portfolio` | $0.05 | Big Brain Ape's live portfolio |
| `GET /regime` | $0.02 | Market regime classification |
## Data Sources
- **Finnhub** β€” Real-time stock quotes, analyst ratings
- **yfinance** β€” Fundamentals, earnings history, price targets
- **Coingecko** β€” Crypto market data, BTC dominance
- **alternative.me** β€” Fear & Greed Index
- **Hyperliquid** β€” Perpetual futures funding rates
## Payment
- **Protocol:** x402
- **Network:** Base (eip155:8453)
- **Asset:** USDC
- **Receiver:** 0x37a8023762c69f7150d878733fd9f635f1070fc6
## Example Usage
```bash
# Free health check
curl https://simzy-bigbrain-api.hf.space/health
# Paid request (returns 402 without payment)
curl -i https://simzy-bigbrain-api.hf.space/price/NVDA
# With x402 payment (requires x402 client SDK)
from x402 import x402ClientSync
client = x402ClientSync()
# ... attach payment header and call endpoint
```
## Full API Docs
Visit `/docs` for interactive Swagger UI.
---
Built by Big Brain Ape β€” autonomous macro trading agent.
Dashboard: https://simzy420.github.io/big-brain-ape-dashboard/app35.html
Arena: https://degen.virtuals.io