# How to Get BUFF163 Price History with an API

> BUFF163 price history via `GET /v1/prices/buff163/history` — daily for multi-year trends, hourly for intraday charts — plus free interactive charts on every [skin detail page](/apps/browseskins).

## What CSPriceAPI provides

| | |
|---|---|
| **Endpoint** | `GET /v1/prices/buff163/history` |
| **Granularity** | `resolution=daily` (multi-year) or `resolution=hourly` (up to ~100 days) |
| **Currency** | CNY |
| **Live companion** | `GET /v1/prices/latest?markets=buff163` |
| **Coverage line** |  |
| **Web charts** | Built into Browse Skins skin pages — no API key required for viewing |

BUFF163 (NetEase) is the second-largest CN marketplace. Prices track YouPin closely; **divergence** between BUFF and YouPin history often signals arb windows.

## Quick start

```bash
curl -s "https://api.cspriceapi.com/v1/prices/buff163/history?market_hash_name=AK-47%20%7C%20Redline%20(Field-Tested)" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Compare BUFF vs YouPin on the same item:

```bash
curl -s "https://api.cspriceapi.com/v1/prices/youpin/history?market_hash_name=AK-47%20%7C%20Redline%20(Field-Tested)" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Hourly (intraday, max ~100 days):

```bash
curl -s "https://api.cspriceapi.com/v1/prices/buff163/history?market_hash_name=AK-47%20%7C%20Redline%20(Field-Tested)&resolution=hourly" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Current snapshot alongside history pull:

```bash
curl -s -X POST "https://api.cspriceapi.com/v1/prices/latest" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"items":["AK-47 | Redline (Field-Tested)"],"markets":"buff163,youpin"}'
```

## Reading history correctly

**Hourly vs daily.** Use `resolution=hourly` for short-range intraday charts (max ~100 days per request). Use `resolution=daily` (default) for multi-year backtests and trend analysis. Listing prices are sampled roughly every hour and rolled into daily closes.

**Listing history ≠ sales.** History tracks listing-price snapshots over time, not every completed trade. Confirm big moves with [market sales](/sales-data).

**Doppler:** Request history per `market_hash_name`. Phase-specific items may need phase-aware names or separate handling — see [Doppler guide](/resources/how-to-get-doppler-phase-price-data).

**Missing days:** Gaps mean no snapshot stored — interpolate carefully in ML models.

## Cross-market CN analysis

Plot BUFF and YouPin on the same chart (convert to one currency):

1. Align dates.
2. `spread = buff_price - youpin_price` in CNY.
3. When spread exceeds historical 90th percentile → [arbitrage bot](/resources/how-to-build-cs2-skin-arbitrage-bot) candidate.

## No-code charts

1. Open [Browse Skins](/apps/browseskins)
2. Search item → open skin detail
3. View multi-market history chart (BUFF, YouPin, Western markets)

Faster than building matplotlib for ad-hoc research.

## Backtest sketch

```python
# Load buff + youpin history JSON arrays
# For each day: signal = buff_close - youpin_close
# Simulate: buy cheap market, sell expensive (minus fees)
# Requires: fee model, FX if reporting USD
```

Pair with [historical CS2 guide](/resources/how-to-get-historical-cs2-skin-prices) for other markets.

## Related

- [Current BUFF prices](/resources/how-to-get-buff-prices)
- [BUFF API landing](/buff-api)
- [简体中文 BUFF 页面](/zh-cn/buff-api)
