[docs-agent] Fix UTXO tickers/tickers-list paths, params, error schema#1410
Open
alchemy-bot wants to merge 1 commit into
Open
[docs-agent] Fix UTXO tickers/tickers-list paths, params, error schema#1410alchemy-bot wants to merge 1 commit into
alchemy-bot wants to merge 1 commit into
Conversation
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
🔗 Preview Mode
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-slashis already disabled globally inredocly.yaml(precedent: DOCS-71 POSTsendtx), so the trailing slashes pass validation.getTickersparamsAdded 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.getTickersListparamstimestamp(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
Errorschema across all four UTXO specs documented errors as{"error": {"message": "..."}}, but Blockbook actually returns{"error": "string"}. Updated:Errorschema (now{error: string}withrequired: [error]).BadRequestandNotFoundresponse examples (now use the flat string form).Because the
Errorschema 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:restpasses for all four updated specs (0 errors).npx prettier --checkclean on changed files.Linear
DOCS-127