Skip to content

[docs-agent] Fix UTXO tickers/tickers-list paths, params, error schema#1410

Open
alchemy-bot wants to merge 1 commit into
mainfrom
docs/utxo-tickers-fixes
Open

[docs-agent] Fix UTXO tickers/tickers-list paths, params, error schema#1410
alchemy-bot wants to merge 1 commit into
mainfrom
docs/utxo-tickers-fixes

Conversation

@alchemy-bot

Copy link
Copy Markdown
Contributor

Summary

Fixes the bugs flagged on the Bitcoin UTXO tickers and tickers-list endpoint pages, applied uniformly across all four UTXO specs (Bitcoin, Bitcoin Cash, Litecoin, Dogecoin) so the same fix lands on every UTXO chain page.

Source of truth: trezor/blockbook openapi.yaml/api/v2/tickers/ and /api/v2/tickers-list/ path definitions.

Path fixes (trailing slashes)

  • /api/v2/tickers/api/v2/tickers/
  • /api/v2/tickers-list/api/v2/tickers-list/

no-path-trailing-slash is already disabled globally in redocly.yaml (precedent: DOCS-71 POST sendtx), so the trailing slashes pass validation.

getTickers params

Added two missing optional query params per Blockbook spec:

  • block (string) — block height or hash whose timestamp should be used for historical rates.
  • token (string) — token symbol or contract/address key for token-specific rates.

getTickersList params

  • timestamp (integer) — flipped from optional to required per Blockbook spec (the previous "defaults to latest available" wording was wrong).
  • token (string, optional) — added per Blockbook spec.

Error response schema

Previously the shared Error schema across all four UTXO specs documented errors as {"error": {"message": "..."}}, but Blockbook actually returns {"error": "string"}. Updated:

  • The Error schema (now {error: string} with required: [error]).
  • The BadRequest and NotFound response examples (now use the flat string form).

Because the Error schema is shared across all 12 endpoints in each spec, this fix corrects the documented error shape on every UTXO endpoint page (not just the two tickers pages) — that's the correct behavior because the same bug was present everywhere; the source-of-truth schema is the same for all Blockbook endpoints.

Validation

  • pnpm run validate:rest passes for all four updated specs (0 errors).
  • npx prettier --check clean on changed files.

Linear

DOCS-127

Per Trezor Blockbook openapi.yaml (source of truth):

* /api/v2/tickers and /api/v2/tickers-list paths require a trailing
  slash; updated all 4 utxo* specs (bitcoin, bitcoincash, dogecoin,
  litecoin).
* get-tickers: add missing block (string, optional) and token (string,
  optional) query params.
* get-tickers-list: mark timestamp as required (per spec) and add
  missing token (string, optional) param.
* Error response schema: Blockbook returns {error: string}, not
  {error: {message: string}}. Updated the shared Error schema and the
  BadRequest/NotFound response examples in all 4 utxo* specs.

Refs DOCS-127
@alchemy-bot alchemy-bot requested a review from a team as a code owner June 25, 2026 21:36
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown

🔗 Preview Mode

Name Status Preview Updated (UTC)
Alchemy Docs ✅ Ready 🔗 Visit Preview Jun 25, 2026, 9:37 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant