TheBTC Portal

The BTC Portal API and machine-readable resources

The BTC Portal publishes European crypto and digital-asset news, and exposes euro-denominated market data through a small public REST API. No API key is required for the read endpoints. Everything on this page is also available as a machine-readable specification at /openapi.json, which is the document to load if you are wiring these endpoints into a tool or function-calling schema.

REST API

get/api/prices

operationId: listPrices

Up to 100 crypto assets priced in euros, ordered by market relevance, each with the 24-hour percentage change and a seven-point daily series. Refreshed at most once per minute; do not poll faster.

curl https://thebtcportal.com/api/prices

get/api/history?date=YYYY-MM-DD

operationId: getHistoricalPrice

The BTC/EUR daily close for one calendar date, from Binance daily candles with CoinGecko as a fallback for recent dates. The series starts on 2020-01-01; earlier dates are rejected rather than approximated.

curl "https://thebtcportal.com/api/history?date=2021-11-09"

post/api/subscribe

operationId: subscribeToNewsletter

Registers an email address for the newsletter of one language edition. Idempotent. Only call it when the owner of the address has asked to subscribe: consent is recorded with the request, so a subscription made without the reader asking for it is a false consent record.

Errors

Every error is JSON, never an HTML page, and carries a stable code, a human-readable message and a hint describing what to do next. Unknown paths under /api answer 404 in the same shape, and a wrong method answers 405 with an Allow header.

{
  "error": "fora_da_serie",
  "code": "fora_da_serie",
  "message": "The BTC/EUR series starts on 2020-01-01.",
  "hint": "Retry with a date on or after 2020-01-01.",
  "status": 400,
  "docs": "https://thebtcportal.com/openapi.json"
}

Content, not data

Articles are not exposed through the REST API. They are published as HTML pages, and as Markdown on the same URLs through content negotiation: send Accept: text/markdown and any page answers text/markdown instead of HTML, with Vary: Accept so intermediaries keep the two apart.

curl -H "Accept: text/markdown" https://thebtcportal.com/en

Reuse and attribution

Market data is provided as-is, for informational purposes, and is not investment advice. Article text is copyright The BTC Portal; quoting with a link to the article URL is welcome, wholesale reproduction is not. When citing, prefer the language edition matching the reader and link to the article rather than to the index.