diff --git a/api-spec-v2.yaml b/api-spec-v2.yaml index 14da2f9..ff4d47e 100644 --- a/api-spec-v2.yaml +++ b/api-spec-v2.yaml @@ -4288,6 +4288,57 @@ paths: application/json: schema: $ref: '#/components/schemas/RegisterNewAssetRequest' + /assets/prices/{id}: + post: + operationId: setAssetPrice + summary: Set asset price + description: | + Set asset price for the given asset id. Returns the asset price response. + tags: + - Blockchains & Assets + x-readme: + code-samples: + - language: python + code: supportedAssets = fireblocks.set_asset_price(id, currency, price) + name: Fireblocks SDK Python example + - language: javascript + code: const supportedAssets = await fireblocks.setAssetPrice(id, currency, price); + name: Fireblocks SDK Javascript example + parameters: + - name: id + in: path + required: true + description: The ID of the asset + schema: + type: string + example: ETH + - $ref: "#/components/parameters/X-Idempotency-Key" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SetAssetPriceRequest" + responses: + "200": + description: Asset price has been set successfully. + content: + application/json: + schema: + $ref: "#/components/schemas/AssetPriceResponse" + "403": + description: | + - Tenant is not allowed to set rate. Error code: 1002. + content: + application/json: + schema: + $ref: "#/components/schemas/AssetPriceForbiddenErrorResponse" + "404": + description: | + - Currency not found. Error code 1001 + content: + application/json: + schema: + $ref: "#/components/schemas/AssetPriceNotFoundErrorResponse" /transactions: get: summary: Get transaction history @@ -12691,6 +12742,80 @@ components: required: - message - code + SetAssetPriceRequest: + type: object + properties: + currency: + type: string + description: Currency (according to ISO 4217 currency codes) + example: USD + price: + type: number + description: Price in currency + example: 3100 + required: + - currency + - price + AssetPriceResponse: + type: object + properties: + legacyId: + type: string + description: The ID of the asset + example: ETH + lastUpdateAt: + type: number + description: Time of last price update + example: 1716898542 + currency: + type: string + description: Currency (according to ISO 4217 currency codes) + example: USD + price: + type: number + description: Price in currency + example: 3500 + source: + type: string + description: Source of the price data + example: PRIVATE + enum: + - PUBLIC + - PRIVATE + required: + - legacyId + - lastUpdateAt + - currency + - price + - source + AssetPriceForbiddenErrorResponse: + type: object + properties: + message: + type: string + description: Forbidden error message + example: Tenant is not allowed to update asset + code: + type: string + description: Error code + example: 3002 + required: + - message + - code + AssetPriceNotFoundErrorResponse: + type: object + properties: + message: + type: string + description: Not found error message + example: Currency not found + code: + type: string + description: Error code + example: 3001 + required: + - message + - code TransactionStatus: type: string description: |