File size: 2,630 Bytes
8d75e0c
29b9b19
 
 
 
8d75e0c
29b9b19
8d75e0c
29b9b19
 
 
 
 
 
 
 
 
 
 
 
 
8d75e0c
 
29b9b19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
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