From f20c27ee56458134c764c90740e3af0a94103591 Mon Sep 17 00:00:00 2001 From: vsiskin Date: Thu, 4 Jul 2024 15:49:47 +0200 Subject: [PATCH] add set asset price api --- fireblocks_sdk/sdk.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/fireblocks_sdk/sdk.py b/fireblocks_sdk/sdk.py index ee55310..9b5ff64 100644 --- a/fireblocks_sdk/sdk.py +++ b/fireblocks_sdk/sdk.py @@ -404,6 +404,22 @@ def get_supported_assets(self): return self._get_request("/v1/supported_assets") + def set_asset_price(self, id: str, currency: str, price: int): + """Set asset price + + Args: + id (str): The asset ID + currency (str): The currency (according to ISO 4217 currency codes) + price (str): The price in currency + """ + + body = { + "currency": currency, + "price": price, + } + + return self._post_request(f"/v1/assets/prices/${id}", body) + def get_vault_accounts_with_page_info( self, paged_vault_accounts_request_filters: PagedVaultAccountsRequestFilters ):