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 price api #186

Merged
merged 3 commits into from
Aug 7, 2024
Merged
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
16 changes: 16 additions & 0 deletions fireblocks_sdk/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -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: float):
"""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
):
Expand Down
Loading