From 4784b4bd3cbd140b4e4c470b758c6763fead3e32 Mon Sep 17 00:00:00 2001 From: alchemy-bot <80712764+alchemy-bot@users.noreply.github.com> Date: Thu, 25 Jun 2026 21:36:33 +0000 Subject: [PATCH] [docs-agent] Fix UTXO tickers/tickers-list paths, params, error schema 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 --- .../utxo-bitcoincash/utxo-bitcoincash.yaml | 39 +++++++++++++------ src/openapi/utxo-dogecoin/utxo-dogecoin.yaml | 39 +++++++++++++------ src/openapi/utxo-litecoin/utxo-litecoin.yaml | 39 +++++++++++++------ src/openapi/utxo/utxo.yaml | 39 +++++++++++++------ 4 files changed, 108 insertions(+), 48 deletions(-) diff --git a/src/openapi/utxo-bitcoincash/utxo-bitcoincash.yaml b/src/openapi/utxo-bitcoincash/utxo-bitcoincash.yaml index e12c7e9a1..d27a110aa 100644 --- a/src/openapi/utxo-bitcoincash/utxo-bitcoincash.yaml +++ b/src/openapi/utxo-bitcoincash/utxo-bitcoincash.yaml @@ -455,7 +455,7 @@ paths: "400": $ref: "#/components/responses/BadRequest" - "/{apiKey}/api/v2/tickers-list": + "/{apiKey}/api/v2/tickers-list/": get: operationId: getTickersList summary: Get Tickers List @@ -472,11 +472,17 @@ paths: - $ref: "#/components/parameters/apiKey" - in: query name: timestamp - required: false - description: Unix timestamp to query availability for. Defaults to the latest available. + required: true + description: Unix timestamp for the requested currency list. schema: type: integer example: 1578391200 + - in: query + name: token + required: false + description: Token symbol or contract/address key for token-specific rates. + schema: + type: string responses: "200": description: Available tickers. @@ -490,7 +496,7 @@ paths: "400": $ref: "#/components/responses/BadRequest" - "/{apiKey}/api/v2/tickers": + "/{apiKey}/api/v2/tickers/": get: operationId: getTickers summary: Get Tickers @@ -520,6 +526,18 @@ paths: schema: type: integer example: 1578391200 + - in: query + name: block + required: false + description: Block height or hash whose timestamp should be used for historical rates. + schema: + type: string + - in: query + name: token + required: false + description: Token symbol or contract/address key for token-specific rates. + schema: + type: string responses: "200": description: Currency rate response. @@ -643,8 +661,7 @@ components: schema: $ref: "#/components/schemas/Error" example: - error: - message: "invalid request" + error: "invalid request" NotFound: description: Resource not found on the requested network. content: @@ -652,17 +669,15 @@ components: schema: $ref: "#/components/schemas/Error" example: - error: - message: "not found" + error: "not found" schemas: Error: type: object + required: [error] properties: error: - type: object - properties: - message: - type: string + type: string + description: Human-readable error message. BlockIndexResponse: type: object required: [blockHash] diff --git a/src/openapi/utxo-dogecoin/utxo-dogecoin.yaml b/src/openapi/utxo-dogecoin/utxo-dogecoin.yaml index 515af0992..be9cafeb1 100644 --- a/src/openapi/utxo-dogecoin/utxo-dogecoin.yaml +++ b/src/openapi/utxo-dogecoin/utxo-dogecoin.yaml @@ -452,7 +452,7 @@ paths: "400": $ref: "#/components/responses/BadRequest" - "/{apiKey}/api/v2/tickers-list": + "/{apiKey}/api/v2/tickers-list/": get: operationId: getTickersList summary: Get Tickers List @@ -469,11 +469,17 @@ paths: - $ref: "#/components/parameters/apiKey" - in: query name: timestamp - required: false - description: Unix timestamp to query availability for. Defaults to the latest available. + required: true + description: Unix timestamp for the requested currency list. schema: type: integer example: 1578391200 + - in: query + name: token + required: false + description: Token symbol or contract/address key for token-specific rates. + schema: + type: string responses: "200": description: Available tickers. @@ -487,7 +493,7 @@ paths: "400": $ref: "#/components/responses/BadRequest" - "/{apiKey}/api/v2/tickers": + "/{apiKey}/api/v2/tickers/": get: operationId: getTickers summary: Get Tickers @@ -517,6 +523,18 @@ paths: schema: type: integer example: 1578391200 + - in: query + name: block + required: false + description: Block height or hash whose timestamp should be used for historical rates. + schema: + type: string + - in: query + name: token + required: false + description: Token symbol or contract/address key for token-specific rates. + schema: + type: string responses: "200": description: Currency rate response. @@ -640,8 +658,7 @@ components: schema: $ref: "#/components/schemas/Error" example: - error: - message: "invalid request" + error: "invalid request" NotFound: description: Resource not found on the requested network. content: @@ -649,17 +666,15 @@ components: schema: $ref: "#/components/schemas/Error" example: - error: - message: "not found" + error: "not found" schemas: Error: type: object + required: [error] properties: error: - type: object - properties: - message: - type: string + type: string + description: Human-readable error message. BlockIndexResponse: type: object required: [blockHash] diff --git a/src/openapi/utxo-litecoin/utxo-litecoin.yaml b/src/openapi/utxo-litecoin/utxo-litecoin.yaml index cd1f6f380..759848426 100644 --- a/src/openapi/utxo-litecoin/utxo-litecoin.yaml +++ b/src/openapi/utxo-litecoin/utxo-litecoin.yaml @@ -460,7 +460,7 @@ paths: "400": $ref: "#/components/responses/BadRequest" - "/{apiKey}/api/v2/tickers-list": + "/{apiKey}/api/v2/tickers-list/": get: operationId: getTickersList summary: Get Tickers List @@ -477,11 +477,17 @@ paths: - $ref: "#/components/parameters/apiKey" - in: query name: timestamp - required: false - description: Unix timestamp to query availability for. Defaults to the latest available. + required: true + description: Unix timestamp for the requested currency list. schema: type: integer example: 1578391200 + - in: query + name: token + required: false + description: Token symbol or contract/address key for token-specific rates. + schema: + type: string responses: "200": description: Available tickers. @@ -495,7 +501,7 @@ paths: "400": $ref: "#/components/responses/BadRequest" - "/{apiKey}/api/v2/tickers": + "/{apiKey}/api/v2/tickers/": get: operationId: getTickers summary: Get Tickers @@ -525,6 +531,18 @@ paths: schema: type: integer example: 1578391200 + - in: query + name: block + required: false + description: Block height or hash whose timestamp should be used for historical rates. + schema: + type: string + - in: query + name: token + required: false + description: Token symbol or contract/address key for token-specific rates. + schema: + type: string responses: "200": description: Currency rate response. @@ -648,8 +666,7 @@ components: schema: $ref: "#/components/schemas/Error" example: - error: - message: "invalid request" + error: "invalid request" NotFound: description: Resource not found on the requested network. content: @@ -657,17 +674,15 @@ components: schema: $ref: "#/components/schemas/Error" example: - error: - message: "not found" + error: "not found" schemas: Error: type: object + required: [error] properties: error: - type: object - properties: - message: - type: string + type: string + description: Human-readable error message. BlockIndexResponse: type: object required: [blockHash] diff --git a/src/openapi/utxo/utxo.yaml b/src/openapi/utxo/utxo.yaml index c6b154615..843d5f7af 100644 --- a/src/openapi/utxo/utxo.yaml +++ b/src/openapi/utxo/utxo.yaml @@ -444,7 +444,7 @@ paths: "400": $ref: "#/components/responses/BadRequest" - "/{apiKey}/api/v2/tickers-list": + "/{apiKey}/api/v2/tickers-list/": get: operationId: getTickersList summary: Get Tickers List @@ -461,11 +461,17 @@ paths: - $ref: "#/components/parameters/apiKey" - in: query name: timestamp - required: false - description: Unix timestamp to query availability for. Defaults to the latest available. + required: true + description: Unix timestamp for the requested currency list. schema: type: integer example: 1574346615 + - in: query + name: token + required: false + description: Token symbol or contract/address key for token-specific rates. + schema: + type: string responses: "200": description: Available tickers. @@ -479,7 +485,7 @@ paths: "400": $ref: "#/components/responses/BadRequest" - "/{apiKey}/api/v2/tickers": + "/{apiKey}/api/v2/tickers/": get: operationId: getTickers summary: Get Tickers @@ -509,6 +515,18 @@ paths: schema: type: integer example: 1574346615 + - in: query + name: block + required: false + description: Block height or hash whose timestamp should be used for historical rates. + schema: + type: string + - in: query + name: token + required: false + description: Token symbol or contract/address key for token-specific rates. + schema: + type: string responses: "200": description: Currency rate response. @@ -632,8 +650,7 @@ components: schema: $ref: "#/components/schemas/Error" example: - error: - message: "invalid request" + error: "invalid request" NotFound: description: Resource not found on the requested network. content: @@ -641,17 +658,15 @@ components: schema: $ref: "#/components/schemas/Error" example: - error: - message: "not found" + error: "not found" schemas: Error: type: object + required: [error] properties: error: - type: object - properties: - message: - type: string + type: string + description: Human-readable error message. BlockIndexResponse: type: object required: [blockHash]