docs: Document TLD price consistency strategy in README
This commit is contained in:
22
README.md
22
README.md
@ -254,6 +254,28 @@ npm run dev
|
|||||||
| GET | `/api/v1/tld-prices/{tld}/history` | Get price history |
|
| GET | `/api/v1/tld-prices/{tld}/history` | Get price history |
|
||||||
| GET | `/api/v1/tld-prices/{tld}/compare` | Compare registrar prices |
|
| GET | `/api/v1/tld-prices/{tld}/compare` | Compare registrar prices |
|
||||||
|
|
||||||
|
#### Price Data Consistency
|
||||||
|
|
||||||
|
All TLD price endpoints use a unified pricing strategy:
|
||||||
|
|
||||||
|
1. **Static TLDs (18 popular)**: Rich multi-registrar data (5+ registrars per TLD)
|
||||||
|
- .com, .net, .org, .io, .ai, .dev, .app, .xyz, .tech, .online, .store, .me, .info, .biz, .ch, .de, .uk, .co
|
||||||
|
|
||||||
|
2. **Database TLDs (869+)**: Scraped from Porkbun API (single registrar)
|
||||||
|
|
||||||
|
**Price Calculation** (consistent across all endpoints):
|
||||||
|
```
|
||||||
|
avg_price = sum(registrar_prices) / count(registrars)
|
||||||
|
min_price = min(registrar_prices)
|
||||||
|
max_price = max(registrar_prices)
|
||||||
|
```
|
||||||
|
|
||||||
|
This ensures identical prices on:
|
||||||
|
- Overview table (`/overview`)
|
||||||
|
- Detail page (`/{tld}`)
|
||||||
|
- Compare page (`/{tld}/compare`)
|
||||||
|
- Trending cards (`/trending`)
|
||||||
|
|
||||||
### Subscription
|
### Subscription
|
||||||
| Method | Endpoint | Description |
|
| Method | Endpoint | Description |
|
||||||
|--------|----------|-------------|
|
|--------|----------|-------------|
|
||||||
|
|||||||
Reference in New Issue
Block a user