Bitstamp APIbitstamp.net ↗
Get live Bitstamp crypto prices, percent changes across 7 timeframes, and OHLCV candle data for any trading pair via two simple endpoints.
What is the Bitstamp API?
The Bitstamp API exposes 2 endpoints that return live market data for cryptocurrency trading pairs listed on Bitstamp. The get_ticker endpoint delivers the current price alongside percentage changes across seven timeframes — hourly, daily, weekly, monthly, yearly, year-to-date, and all-time. The get_candles endpoint returns configurable OHLCV candlestick data, letting you set both the candle resolution and how many periods to retrieve.
curl -X GET 'https://api.parse.bot/scraper/b02428bb-a41a-4e87-a39f-f7c763aaa57f/get_ticker?pair=btcusd' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace bitstamp-net-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Bitstamp SDK — real-time crypto market data."""
from parse_apis.bitstamp_net_api import Bitstamp, Ticker, InvalidInput
client = Bitstamp()
# Fetch the current BTC/USD ticker snapshot.
ticker = client.tickers.get(pair="btcusd")
print(f"BTC/USD price: {ticker.price}, 24h change: {ticker.percent_change_day}%")
# Get hourly candle data for BTC/USD (most recent 5 candles).
for candle in client.candle_datas.get(pair="btcusd", resolution="60", limit=5):
print(f" {candle.time} O:{candle.open} H:{candle.high} L:{candle.low} C:{candle.close} V:{candle.volume}")
# Constructible pattern: build a Ticker from its key and refresh it.
eth_ticker = client.ticker(pair="ethusd")
eth_ticker = eth_ticker.refresh()
print(f"ETH/USD price: {eth_ticker.price}, weekly change: {eth_ticker.percent_change_week}%")
# Typed error handling for invalid input.
try:
client.candle_datas.get(pair="btcusd", resolution="invalid")
except InvalidInput as exc:
print(f"Invalid input caught: {exc}")
print("exercised: tickers.get / candle_datas.get / ticker.refresh / InvalidInput")
Retrieve the current price and percentage changes (hourly, daily, weekly, monthly, yearly, YTD, all-time) for a trading pair. Returns a single snapshot of the latest market state.
| Param | Type | Description |
|---|---|---|
| pair | string | Trading pair identifier (e.g. btcusd, ethusd, xrpusd). Case-insensitive; slashes and hyphens are stripped. |
{
"type": "object",
"fields": {
"pair": "string",
"price": "string (decimal)",
"percent_change_all": "number",
"percent_change_day": "number",
"percent_change_ytd": "number",
"percent_change_hour": "number",
"percent_change_week": "number",
"percent_change_year": "number",
"percent_change_month": "number"
},
"sample": {
"data": {
"pair": "btcusd",
"price": "62717.10",
"percent_change_all": -1.666525295308044,
"percent_change_day": -0.0394314224766121,
"percent_change_ytd": -1.6101416521789058,
"percent_change_hour": -0.028851426312500796,
"percent_change_week": -0.0394314224766121,
"percent_change_year": -1.6101416521789058,
"percent_change_month": -0.06318045469212476
},
"status": "success"
}
}About the Bitstamp API
Ticker Data
The get_ticker endpoint accepts a pair parameter such as btcusd, ethusd, or xrpusd (case-insensitive; slashes and hyphens are stripped automatically). It returns a single snapshot containing the current price as a decimal string alongside nine percent-change fields: percent_change_hour, percent_change_day, percent_change_week, percent_change_month, percent_change_year, percent_change_ytd, and percent_change_all. This gives you a broad sweep of relative performance across every meaningful timeframe in one call.
Candle (OHLCV) Data
The get_candles endpoint returns an array of candle objects, each containing time, timestamp, open, high, low, close, and volume. You control the window through two parameters: resolution (candle width in minutes — e.g. 60 for 1-hour candles, 1440 for daily) and limit (number of candles to return). The returned time range is computed as now − (resolution × limit) to now, so you can back-calculate exactly which period each request covers. The resolution_minutes field in the response confirms the interval used.
Supported Pairs
Both endpoints operate on the same pair parameter format. Bitstamp officially lists dozens of pairs spanning BTC, ETH, XRP, LTC, and other assets against USD, EUR, GBP, and additional quote currencies. Any valid Bitstamp market identifier can be passed to either endpoint.
The Bitstamp API is a managed, monitored endpoint for bitstamp.net — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when bitstamp.net changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official bitstamp.net API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Display a live BTC/USD price ticker with multi-timeframe percent changes on a portfolio dashboard.
- Alert users when
percent_change_dayorpercent_change_hourcrosses a threshold for any watched pair. - Plot ETH/USD daily candlestick charts by requesting
get_candleswithresolution=1440. - Backfill short-term OHLCV history for a trading signal model using
limitandresolutionparameters. - Compare year-to-date and all-time performance across multiple pairs by calling
get_tickerfor each. - Calculate intraday volatility using
highandlowfields from 1-hour or 15-minute candles. - Monitor volume trends for XRP/USD by aggregating the
volumefield across consecutive candle responses.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Bitstamp have an official developer API?+
What timeframes does get_ticker cover for percent changes?+
percent_change_hour, percent_change_day, percent_change_week, percent_change_month, percent_change_year, percent_change_ytd (year-to-date), and percent_change_all (all-time). These are pre-computed values from Bitstamp's market data — the endpoint does not accept a timeframe parameter.Can I request candles for a specific historical date range rather than a rolling window?+
get_candles endpoint computes the window as now minus (resolution × limit), so you always get the most recent N candles. Arbitrary start/end timestamps are not supported. You can fork this API on Parse and revise it to add explicit date-range parameters if your use case requires historical back-testing over fixed periods.Does the API expose order book depth or trade history?+
How fresh is the price data returned by get_ticker?+
get_ticker response reflects Bitstamp's current market state at the time of the request — it is a point-in-time snapshot, not a streaming feed. For applications requiring sub-second updates, you would need to poll the endpoint repeatedly or use Bitstamp's official WebSocket API alongside this REST endpoint.