Rate Limits
Each SDK call or direct REST call counts as one API request.
Limits
| Tier | Requests/second | Requests/minute |
|---|---|---|
| Anonymous IP | 40 | 1200 |
X-Yfin-Contact / SDK contact= | 200 | 6000 |
| API key | 2000 | 30000 |
Anonymous usage works without signup. For scripts, services, notebooks, and agents, declare a contact identity to use the higher free tier:
curl "https://api.yfin.dev/v1/quote?symbols=AAPL,MSFT" \
-H "X-Yfin-Contact: you@example.com"
import yfin
client = yfin.Client(contact="you@example.com")
High-volume users can email sam@yfin.dev for an API key.
429 Shape
{
"ok": false,
"error": {
"code": "rate_limited",
"message": "Request limit exceeded."
},
"rate_limit": {
"tier": "anonymous",
"retry_after_seconds": 42,
"upgrade": "Email sam@yfin.dev for an API key."
}
}
429 responses also include a Retry-After header.
For SDK exceptions and retry guidance across all status codes, see Errors.