Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add set asset prices api to docs #67

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 125 additions & 0 deletions api-spec-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand Down