Skip to content

Commit 1e92120

Browse files
author
fireblocks_dx_team
committed
Generated SDK #6749
1 parent 1a7545e commit 1e92120

38 files changed

+1227
-49
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Auto Reply On New Issues
2+
on:
3+
issues:
4+
types: [opened]
5+
6+
jobs:
7+
auto-reply:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Check out repository code
11+
uses: actions/checkout@v4
12+
13+
- name: Choose random reply message
14+
id: choose_message
15+
run: |
16+
reply_messages=(
17+
"Thank you for raising this issue! We will look into it shortly."
18+
"We appreciate your feedback. Our team will investigate this issue shortly."
19+
"Your issue has been noted. We'll get back to you soon."
20+
"Thanks for raising this issue. We'll review it and provide updates soon."
21+
"Thank you for letting us know about this issue. We'll investigate and get back to you soon."
22+
"Acknowledged. We'll review the issue and respond soon."
23+
"Thanks for bringing this to our attention. We'll review it and provide updates soon."
24+
"We've received your issue. Thanks for your patience."
25+
"Noted. Expect updates on your issue shortly."
26+
"Your issue is important to us. We will look into it shortly."
27+
)
28+
random_index=$((RANDOM % ${#reply_messages[@]}))
29+
echo "::set-output name=message::${reply_messages[$random_index]}"
30+
31+
- name: Reply to issue
32+
run: |
33+
gh issue comment ${{ github.event.issue.number }} --body "${{ steps.choose_message.outputs.message }}"
34+
env:
35+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/auto-reply-pr.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Auto Reply On New Pull Requests
2+
on:
3+
pull_request:
4+
types: [opened]
5+
6+
jobs:
7+
auto-reply:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Check out repository code
11+
uses: actions/checkout@v4
12+
13+
- name: Choose random reply message
14+
id: choose_message
15+
run: |
16+
reply_messages=(
17+
"Thank you for raising this! We will review it shortly. (Note that this SDK code is auto generated)"
18+
"We appreciate your contribution. Our team will investigate this request shortly. (Note that this SDK code is auto generated)"
19+
"Your request has been noted. We'll get back to you soon. (Note that this SDK code is auto generated)"
20+
"Thanks for submitting this request. We'll review it and provide updates soon. (Note that this SDK code is auto generated)"
21+
"Thank you for letting us know about this request. We'll investigate and get back to you soon. (Note that this SDK code is auto generated)"
22+
"Acknowledged. We'll review and respond soon. (Note that this SDK code is auto generated)"
23+
"Thanks for bringing this request to our attention. We'll review and provide updates soon. (Note that this SDK code is auto generated)"
24+
"We've received your request. Thanks for your patience. (Note that this SDK code is auto generated)"
25+
"Noted. Expect updates shortly. (Note that this SDK code is auto generated)"
26+
"Your request is important to us. We will look into it shortly. (Note that this SDK code is auto generated)"
27+
)
28+
random_index=$((RANDOM % ${#reply_messages[@]}))
29+
echo "::set-output name=message::${reply_messages[$random_index]}"
30+
31+
- name: Reply to pull request
32+
if: (!contains(fromJSON('["github-actions"]'), github.event.pull_request.user.login))
33+
run: |
34+
gh pr comment ${{ github.event.number }} --body "${{ steps.choose_message.outputs.message }}"
35+
env:
36+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.openapi-generator/FILES

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ docs/AssetForbiddenErrorResponse.md
3333
docs/AssetInternalServerErrorResponse.md
3434
docs/AssetMetadataDto.md
3535
docs/AssetNotFoundErrorResponse.md
36+
docs/AssetPriceForbiddenErrorResponse.md
37+
docs/AssetPriceNotFoundErrorResponse.md
38+
docs/AssetPriceResponse.md
3639
docs/AssetResponse.md
3740
docs/AssetResponseMetadata.md
3841
docs/AssetResponseOnchain.md
@@ -322,6 +325,7 @@ docs/SessionDTO.md
322325
docs/SessionMetadata.md
323326
docs/SetAdminQuorumThresholdRequest.md
324327
docs/SetAdminQuorumThresholdResponse.md
328+
docs/SetAssetPriceRequest.md
325329
docs/SetAutoFuelRequest.md
326330
docs/SetConfirmationsThresholdRequest.md
327331
docs/SetConfirmationsThresholdResponse.md
@@ -556,6 +560,9 @@ fireblocks/models/asset_forbidden_error_response.py
556560
fireblocks/models/asset_internal_server_error_response.py
557561
fireblocks/models/asset_metadata_dto.py
558562
fireblocks/models/asset_not_found_error_response.py
563+
fireblocks/models/asset_price_forbidden_error_response.py
564+
fireblocks/models/asset_price_not_found_error_response.py
565+
fireblocks/models/asset_price_response.py
559566
fireblocks/models/asset_response.py
560567
fireblocks/models/asset_response_metadata.py
561568
fireblocks/models/asset_response_onchain.py
@@ -820,6 +827,7 @@ fireblocks/models/session_dto.py
820827
fireblocks/models/session_metadata.py
821828
fireblocks/models/set_admin_quorum_threshold_request.py
822829
fireblocks/models/set_admin_quorum_threshold_response.py
830+
fireblocks/models/set_asset_price_request.py
823831
fireblocks/models/set_auto_fuel_request.py
824832
fireblocks/models/set_confirmations_threshold_request.py
825833
fireblocks/models/set_confirmations_threshold_response.py
@@ -1016,6 +1024,9 @@ test/test_asset_forbidden_error_response.py
10161024
test/test_asset_internal_server_error_response.py
10171025
test/test_asset_metadata_dto.py
10181026
test/test_asset_not_found_error_response.py
1027+
test/test_asset_price_forbidden_error_response.py
1028+
test/test_asset_price_not_found_error_response.py
1029+
test/test_asset_price_response.py
10191030
test/test_asset_response.py
10201031
test/test_asset_response_metadata.py
10211032
test/test_asset_response_onchain.py
@@ -1305,6 +1316,7 @@ test/test_session_dto.py
13051316
test/test_session_metadata.py
13061317
test/test_set_admin_quorum_threshold_request.py
13071318
test/test_set_admin_quorum_threshold_response.py
1319+
test/test_set_asset_price_request.py
13081320
test/test_set_auto_fuel_request.py
13091321
test/test_set_confirmations_threshold_request.py
13101322
test/test_set_confirmations_threshold_response.py

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ Class | Method | HTTP request | Description
240240
*AuditLogsApi* | [**get_audits**](docs/AuditLogsApi.md#get_audits) | **GET** /audits | Get audit logs
241241
*BlockchainsAssetsApi* | [**get_supported_assets**](docs/BlockchainsAssetsApi.md#get_supported_assets) | **GET** /supported_assets | List all asset types supported by Fireblocks
242242
*BlockchainsAssetsApi* | [**register_new_asset**](docs/BlockchainsAssetsApi.md#register_new_asset) | **POST** /assets | Register an asset
243+
*BlockchainsAssetsApi* | [**set_asset_price**](docs/BlockchainsAssetsApi.md#set_asset_price) | **POST** /assets/prices/{id} | Set asset price
243244
*ComplianceApi* | [**get_aml_post_screening_policy**](docs/ComplianceApi.md#get_aml_post_screening_policy) | **GET** /screening/aml/post_screening_policy | AML - View Post-Screening Policy
244245
*ComplianceApi* | [**get_aml_screening_policy**](docs/ComplianceApi.md#get_aml_screening_policy) | **GET** /screening/aml/screening_policy | AML - View Screening Policy
245246
*ComplianceApi* | [**get_post_screening_policy**](docs/ComplianceApi.md#get_post_screening_policy) | **GET** /screening/travel_rule/post_screening_policy | Travel Rule - View Post-Screening Policy
@@ -481,6 +482,9 @@ Class | Method | HTTP request | Description
481482
- [AssetInternalServerErrorResponse](docs/AssetInternalServerErrorResponse.md)
482483
- [AssetMetadataDto](docs/AssetMetadataDto.md)
483484
- [AssetNotFoundErrorResponse](docs/AssetNotFoundErrorResponse.md)
485+
- [AssetPriceForbiddenErrorResponse](docs/AssetPriceForbiddenErrorResponse.md)
486+
- [AssetPriceNotFoundErrorResponse](docs/AssetPriceNotFoundErrorResponse.md)
487+
- [AssetPriceResponse](docs/AssetPriceResponse.md)
484488
- [AssetResponse](docs/AssetResponse.md)
485489
- [AssetResponseMetadata](docs/AssetResponseMetadata.md)
486490
- [AssetResponseOnchain](docs/AssetResponseOnchain.md)
@@ -745,6 +749,7 @@ Class | Method | HTTP request | Description
745749
- [SessionMetadata](docs/SessionMetadata.md)
746750
- [SetAdminQuorumThresholdRequest](docs/SetAdminQuorumThresholdRequest.md)
747751
- [SetAdminQuorumThresholdResponse](docs/SetAdminQuorumThresholdResponse.md)
752+
- [SetAssetPriceRequest](docs/SetAssetPriceRequest.md)
748753
- [SetAutoFuelRequest](docs/SetAutoFuelRequest.md)
749754
- [SetConfirmationsThresholdRequest](docs/SetConfirmationsThresholdRequest.md)
750755
- [SetConfirmationsThresholdResponse](docs/SetConfirmationsThresholdResponse.md)

docs/AbiFunction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**name** | **str** | The name of the contract function as it appears in the ABI | [optional]
99
**state_mutability** | **str** | The state mutability of the contract function as it appears in the ABI | [optional]
10-
**type** | **str** | The type if the function |
10+
**type** | **str** | The type of the function |
1111
**inputs** | [**List[Parameter]**](Parameter.md) | The parameters that this function/constructor posses |
1212
**outputs** | [**List[Parameter]**](Parameter.md) | The parameters that this 'read' function returns | [optional]
1313
**description** | **str** | The documentation of this function (if has any) | [optional]
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# AssetPriceForbiddenErrorResponse
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**message** | **str** | Forbidden error message |
9+
**code** | **str** | Error code |
10+
11+
## Example
12+
13+
```python
14+
from fireblocks.models.asset_price_forbidden_error_response import AssetPriceForbiddenErrorResponse
15+
16+
# TODO update the JSON string below
17+
json = "{}"
18+
# create an instance of AssetPriceForbiddenErrorResponse from a JSON string
19+
asset_price_forbidden_error_response_instance = AssetPriceForbiddenErrorResponse.from_json(json)
20+
# print the JSON string representation of the object
21+
print(AssetPriceForbiddenErrorResponse.to_json())
22+
23+
# convert the object into a dict
24+
asset_price_forbidden_error_response_dict = asset_price_forbidden_error_response_instance.to_dict()
25+
# create an instance of AssetPriceForbiddenErrorResponse from a dict
26+
asset_price_forbidden_error_response_from_dict = AssetPriceForbiddenErrorResponse.from_dict(asset_price_forbidden_error_response_dict)
27+
```
28+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
29+
30+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# AssetPriceNotFoundErrorResponse
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**message** | **str** | Not found error message |
9+
**code** | **str** | Error code |
10+
11+
## Example
12+
13+
```python
14+
from fireblocks.models.asset_price_not_found_error_response import AssetPriceNotFoundErrorResponse
15+
16+
# TODO update the JSON string below
17+
json = "{}"
18+
# create an instance of AssetPriceNotFoundErrorResponse from a JSON string
19+
asset_price_not_found_error_response_instance = AssetPriceNotFoundErrorResponse.from_json(json)
20+
# print the JSON string representation of the object
21+
print(AssetPriceNotFoundErrorResponse.to_json())
22+
23+
# convert the object into a dict
24+
asset_price_not_found_error_response_dict = asset_price_not_found_error_response_instance.to_dict()
25+
# create an instance of AssetPriceNotFoundErrorResponse from a dict
26+
asset_price_not_found_error_response_from_dict = AssetPriceNotFoundErrorResponse.from_dict(asset_price_not_found_error_response_dict)
27+
```
28+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
29+
30+

docs/AssetPriceResponse.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# AssetPriceResponse
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**legacy_id** | **str** | The ID of the asset |
9+
**last_update_at** | **float** | Time of last price update |
10+
**currency** | **str** | Currency (according to ISO 4217 currency codes) |
11+
**price** | **float** | Price in currency |
12+
**source** | **str** | Source of the price data |
13+
14+
## Example
15+
16+
```python
17+
from fireblocks.models.asset_price_response import AssetPriceResponse
18+
19+
# TODO update the JSON string below
20+
json = "{}"
21+
# create an instance of AssetPriceResponse from a JSON string
22+
asset_price_response_instance = AssetPriceResponse.from_json(json)
23+
# print the JSON string representation of the object
24+
print(AssetPriceResponse.to_json())
25+
26+
# convert the object into a dict
27+
asset_price_response_dict = asset_price_response_instance.to_dict()
28+
# create an instance of AssetPriceResponse from a dict
29+
asset_price_response_from_dict = AssetPriceResponse.from_dict(asset_price_response_dict)
30+
```
31+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
32+
33+

docs/BlockchainsAssetsApi.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**get_supported_assets**](BlockchainsAssetsApi.md#get_supported_assets) | **GET** /supported_assets | List all asset types supported by Fireblocks
88
[**register_new_asset**](BlockchainsAssetsApi.md#register_new_asset) | **POST** /assets | Register an asset
9+
[**set_asset_price**](BlockchainsAssetsApi.md#set_asset_price) | **POST** /assets/prices/{id} | Set asset price
910

1011

1112
# **get_supported_assets**
@@ -159,3 +160,84 @@ No authorization required
159160

160161
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
161162

163+
# **set_asset_price**
164+
> AssetPriceResponse set_asset_price(id, idempotency_key=idempotency_key, set_asset_price_request=set_asset_price_request)
165+
166+
Set asset price
167+
168+
Set asset price for the given asset id. Returns the asset price response.
169+
170+
### Example
171+
172+
173+
```python
174+
from fireblocks.models.asset_price_response import AssetPriceResponse
175+
from fireblocks.models.set_asset_price_request import SetAssetPriceRequest
176+
from fireblocks.client import Fireblocks
177+
from fireblocks.client_configuration import ClientConfiguration
178+
from fireblocks.exceptions import ApiException
179+
from fireblocks.base_path import BasePath
180+
from pprint import pprint
181+
182+
# load the secret key content from a file
183+
with open('your_secret_key_file_path', 'r') as file:
184+
secret_key_value = file.read()
185+
186+
# build the configuration
187+
configuration = ClientConfiguration(
188+
api_key="your_api_key",
189+
secret_key=secret_key_value,
190+
base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1"
191+
)
192+
193+
194+
# Enter a context with an instance of the API client
195+
with Fireblocks(configuration) as fireblocks:
196+
id = 'ETH' # str | The ID of the asset
197+
idempotency_key = 'idempotency_key_example' # str | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional)
198+
set_asset_price_request = fireblocks.SetAssetPriceRequest() # SetAssetPriceRequest | (optional)
199+
200+
try:
201+
# Set asset price
202+
api_response = fireblocks.blockchains_assets.set_asset_price(id, idempotency_key=idempotency_key, set_asset_price_request=set_asset_price_request).result()
203+
print("The response of BlockchainsAssetsApi->set_asset_price:\n")
204+
pprint(api_response)
205+
except Exception as e:
206+
print("Exception when calling BlockchainsAssetsApi->set_asset_price: %s\n" % e)
207+
```
208+
209+
210+
211+
### Parameters
212+
213+
214+
Name | Type | Description | Notes
215+
------------- | ------------- | ------------- | -------------
216+
**id** | **str**| The ID of the asset |
217+
**idempotency_key** | **str**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional]
218+
**set_asset_price_request** | [**SetAssetPriceRequest**](SetAssetPriceRequest.md)| | [optional]
219+
220+
### Return type
221+
222+
[**AssetPriceResponse**](AssetPriceResponse.md)
223+
224+
### Authorization
225+
226+
No authorization required
227+
228+
### HTTP request headers
229+
230+
- **Content-Type**: application/json
231+
- **Accept**: application/json
232+
233+
### HTTP response details
234+
235+
| Status code | Description | Response headers |
236+
|-------------|-------------|------------------|
237+
**200** | Asset price has been set successfully. | - |
238+
**403** | - Tenant is not allowed to set rate. Error code: 1002. | - |
239+
**404** | - Currency not found. Error code 1001 | - |
240+
**0** | Error Response | * X-Request-ID - <br> |
241+
242+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
243+

docs/NetworkIdResponse.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8-
**id** | **str** | |
9-
**name** | **str** | |
108
**routing_policy** | [**Dict[str, NetworkIdRoutingPolicyValue]**](NetworkIdRoutingPolicyValue.md) | | [optional]
119
**is_discoverable** | **bool** | The specific network is discoverable. | [optional]
10+
**id** | **str** | The specific network id | [optional]
11+
**name** | **str** | The specific network name | [optional]
1212

1313
## Example
1414

0 commit comments

Comments
 (0)