From 013007625e6682b43a7b0aa0e54f05b2120cfb87 Mon Sep 17 00:00:00 2001 From: fireblocks_dx_team Date: Tue, 10 Nov 2026 12:10:06 +0000 Subject: [PATCH] Generated SDK #3049470904 --- .openapi-generator/FILES | 21 +- CHANGELOG.md | 239 ------- README.md | 24 +- api/openapi.yaml | 676 ++++++++++++++++-- build.gradle | 2 +- docs/FeeInfo.md | 2 + docs/RoleFeeInfo.md | 15 + docs/TradeClass.md | 29 + docs/TradingApi.md | 111 +++ docs/TradingPair.md | 26 + docs/TradingPairSide.md | 15 + docs/TradingPairsListPage.md | 15 + docs/TransactionResponse.md | 2 +- docs/UtxoInputSelection.md | 2 +- ...agementBetaApi.md => UtxoManagementApi.md} | 62 +- docs/UtxoSelectionFilters.md | 2 +- docs/UtxoSelectionParams.md | 2 +- docs/VaultsApi.md | 24 +- pom.xml | 2 +- .../com/fireblocks/sdk/Configuration.java | 2 +- .../java/com/fireblocks/sdk/Fireblocks.java | 10 +- .../com/fireblocks/sdk/api/TradingApi.java | 216 ++++++ ...entBetaApi.java => UtxoManagementApi.java} | 31 +- .../com/fireblocks/sdk/api/VaultsApi.java | 16 +- .../com/fireblocks/sdk/model/FeeInfo.java | 76 +- .../com/fireblocks/sdk/model/RoleFeeInfo.java | 203 ++++++ .../com/fireblocks/sdk/model/TradeClass.java | 96 +++ .../com/fireblocks/sdk/model/TradingPair.java | 654 +++++++++++++++++ .../fireblocks/sdk/model/TradingPairSide.java | 69 ++ .../sdk/model/TradingPairsListPage.java | 250 +++++++ .../sdk/model/TransactionResponse.java | 69 +- .../sdk/model/UtxoInputSelection.java | 5 +- .../sdk/model/UtxoSelectionFilters.java | 5 +- .../sdk/model/UtxoSelectionParams.java | 3 +- .../com/fireblocks/sdk/FireblocksTest.java | 8 +- .../fireblocks/sdk/api/TradingApiTest.java | 58 ++ ...piTest.java => UtxoManagementApiTest.java} | 30 +- .../com/fireblocks/sdk/model/FeeInfoTest.java | 12 + .../fireblocks/sdk/model/RoleFeeInfoTest.java | 39 + .../fireblocks/sdk/model/TradeClassTest.java | 25 + .../sdk/model/TradingPairSideTest.java | 25 + .../fireblocks/sdk/model/TradingPairTest.java | 105 +++ .../sdk/model/TradingPairsListPageTest.java | 45 ++ 43 files changed, 2893 insertions(+), 430 deletions(-) delete mode 100644 CHANGELOG.md create mode 100644 docs/RoleFeeInfo.md create mode 100644 docs/TradeClass.md create mode 100644 docs/TradingPair.md create mode 100644 docs/TradingPairSide.md create mode 100644 docs/TradingPairsListPage.md rename docs/{UtxoManagementBetaApi.md => UtxoManagementApi.md} (86%) rename src/main/java/com/fireblocks/sdk/api/{UtxoManagementBetaApi.java => UtxoManagementApi.java} (97%) create mode 100644 src/main/java/com/fireblocks/sdk/model/RoleFeeInfo.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TradeClass.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TradingPair.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TradingPairSide.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TradingPairsListPage.java rename src/test/java/com/fireblocks/sdk/api/{UtxoManagementBetaApiTest.java => UtxoManagementApiTest.java} (86%) create mode 100644 src/test/java/com/fireblocks/sdk/model/RoleFeeInfoTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TradeClassTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TradingPairSideTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TradingPairTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TradingPairsListPageTest.java diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index a2864c7a..894e6e08 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -907,6 +907,7 @@ docs/RewardsInfo.md docs/RiskLevelEnum.md docs/RoleDetails.md docs/RoleDetails2.md +docs/RoleFeeInfo.md docs/RoleGrantee.md docs/Rule.md docs/RuleActionEnum.md @@ -1184,9 +1185,13 @@ docs/TotalSupplyItemDto.md docs/TotalSupplyPagedResponse.md docs/TotalSupplyPagedResponse2.md docs/TrLinkApi.md +docs/TradeClass.md docs/TradingAccountType.md docs/TradingApi.md docs/TradingErrorSchema.md +docs/TradingPair.md +docs/TradingPairSide.md +docs/TradingPairsListPage.md docs/TradingProvider.md docs/Transaction.md docs/TransactionConfigurations.md @@ -1334,7 +1339,7 @@ docs/UtxoInput2.md docs/UtxoInputSelection.md docs/UtxoLabelFailure.md docs/UtxoLabelsErrorResponse.md -docs/UtxoManagementBetaApi.md +docs/UtxoManagementApi.md docs/UtxoOutput.md docs/UtxoSelectionConfigEntry.md docs/UtxoSelectionConfigResponse.md @@ -1466,7 +1471,7 @@ src/main/java/com/fireblocks/sdk/api/TransactionsApi.java src/main/java/com/fireblocks/sdk/api/TravelRuleApi.java src/main/java/com/fireblocks/sdk/api/UserGroupsBetaApi.java src/main/java/com/fireblocks/sdk/api/UsersApi.java -src/main/java/com/fireblocks/sdk/api/UtxoManagementBetaApi.java +src/main/java/com/fireblocks/sdk/api/UtxoManagementApi.java src/main/java/com/fireblocks/sdk/api/VaultsApi.java src/main/java/com/fireblocks/sdk/api/Web3ConnectionsApi.java src/main/java/com/fireblocks/sdk/api/WebhooksApi.java @@ -2336,6 +2341,7 @@ src/main/java/com/fireblocks/sdk/model/RewardsInfo.java src/main/java/com/fireblocks/sdk/model/RiskLevelEnum.java src/main/java/com/fireblocks/sdk/model/RoleDetails.java src/main/java/com/fireblocks/sdk/model/RoleDetails2.java +src/main/java/com/fireblocks/sdk/model/RoleFeeInfo.java src/main/java/com/fireblocks/sdk/model/RoleGrantee.java src/main/java/com/fireblocks/sdk/model/Rule.java src/main/java/com/fireblocks/sdk/model/RuleActionEnum.java @@ -2606,8 +2612,12 @@ src/main/java/com/fireblocks/sdk/model/TokensPaginatedResponse.java src/main/java/com/fireblocks/sdk/model/TotalSupplyItemDto.java src/main/java/com/fireblocks/sdk/model/TotalSupplyPagedResponse.java src/main/java/com/fireblocks/sdk/model/TotalSupplyPagedResponse2.java +src/main/java/com/fireblocks/sdk/model/TradeClass.java src/main/java/com/fireblocks/sdk/model/TradingAccountType.java src/main/java/com/fireblocks/sdk/model/TradingErrorSchema.java +src/main/java/com/fireblocks/sdk/model/TradingPair.java +src/main/java/com/fireblocks/sdk/model/TradingPairSide.java +src/main/java/com/fireblocks/sdk/model/TradingPairsListPage.java src/main/java/com/fireblocks/sdk/model/TradingProvider.java src/main/java/com/fireblocks/sdk/model/Transaction.java src/main/java/com/fireblocks/sdk/model/TransactionConfigurations.java @@ -2854,7 +2864,7 @@ src/test/java/com/fireblocks/sdk/api/TransactionsApiTest.java src/test/java/com/fireblocks/sdk/api/TravelRuleApiTest.java src/test/java/com/fireblocks/sdk/api/UserGroupsBetaApiTest.java src/test/java/com/fireblocks/sdk/api/UsersApiTest.java -src/test/java/com/fireblocks/sdk/api/UtxoManagementBetaApiTest.java +src/test/java/com/fireblocks/sdk/api/UtxoManagementApiTest.java src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java src/test/java/com/fireblocks/sdk/api/Web3ConnectionsApiTest.java src/test/java/com/fireblocks/sdk/api/WebhooksApiTest.java @@ -3723,6 +3733,7 @@ src/test/java/com/fireblocks/sdk/model/RewardsInfoTest.java src/test/java/com/fireblocks/sdk/model/RiskLevelEnumTest.java src/test/java/com/fireblocks/sdk/model/RoleDetails2Test.java src/test/java/com/fireblocks/sdk/model/RoleDetailsTest.java +src/test/java/com/fireblocks/sdk/model/RoleFeeInfoTest.java src/test/java/com/fireblocks/sdk/model/RoleGranteeTest.java src/test/java/com/fireblocks/sdk/model/RuleActionEnumTest.java src/test/java/com/fireblocks/sdk/model/RuleConditionOperatorEnumTest.java @@ -3993,8 +4004,12 @@ src/test/java/com/fireblocks/sdk/model/TokensPaginatedResponseTest.java src/test/java/com/fireblocks/sdk/model/TotalSupplyItemDtoTest.java src/test/java/com/fireblocks/sdk/model/TotalSupplyPagedResponse2Test.java src/test/java/com/fireblocks/sdk/model/TotalSupplyPagedResponseTest.java +src/test/java/com/fireblocks/sdk/model/TradeClassTest.java src/test/java/com/fireblocks/sdk/model/TradingAccountTypeTest.java src/test/java/com/fireblocks/sdk/model/TradingErrorSchemaTest.java +src/test/java/com/fireblocks/sdk/model/TradingPairSideTest.java +src/test/java/com/fireblocks/sdk/model/TradingPairTest.java +src/test/java/com/fireblocks/sdk/model/TradingPairsListPageTest.java src/test/java/com/fireblocks/sdk/model/TradingProviderTest.java src/test/java/com/fireblocks/sdk/model/TransactionConfigurationsTest.java src/test/java/com/fireblocks/sdk/model/TransactionDirectionTest.java diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 0df30960..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,239 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v36.0.0](https://github.com/fireblocks/java-sdk/compare/v15.0.0...v36.0.0) - 2026-11-04 - -### Merged - -- Generated SDK #3026276285 [`#164`](https://github.com/fireblocks/java-sdk/pull/164) - -## [v15.0.0](https://github.com/fireblocks/java-sdk/compare/v14.1.0...v15.0.0) - 2026-03-15 - -### Merged - -- Generated SDK #3733 (major) [`#128`](https://github.com/fireblocks/java-sdk/pull/128) - -## [v14.1.0](https://github.com/fireblocks/java-sdk/compare/v14.0.0...v14.1.0) - 2026-02-26 - -### Merged - -- Generated SDK #2167 [`#126`](https://github.com/fireblocks/java-sdk/pull/126) - -## [v14.0.0](https://github.com/fireblocks/java-sdk/compare/v13.0.0...v14.0.0) - 2026-02-03 - -### Merged - -- Generated SDK #4746 [`#121`](https://github.com/fireblocks/java-sdk/pull/121) - -## [v13.0.0](https://github.com/fireblocks/java-sdk/compare/v12.1.3...v13.0.0) - 2025-11-13 - -### Merged - -- Generated SDK #5834 [`#116`](https://github.com/fireblocks/java-sdk/pull/116) - -## [v12.1.3](https://github.com/fireblocks/java-sdk/compare/v12.1.2...v12.1.3) - 2025-10-22 - -### Merged - -- Generated SDK #8293 [`#115`](https://github.com/fireblocks/java-sdk/pull/115) - -## [v12.1.2](https://github.com/fireblocks/java-sdk/compare/v12.1.1...v12.1.2) - 2025-09-29 - -### Merged - -- Generated SDK #6061 [`#113`](https://github.com/fireblocks/java-sdk/pull/113) - -## [v12.1.1](https://github.com/fireblocks/java-sdk/compare/v12.1.0...v12.1.1) - 2025-09-10 - -### Merged - -- Generated SDK #1410 [`#111`](https://github.com/fireblocks/java-sdk/pull/111) - -## [v12.1.0](https://github.com/fireblocks/java-sdk/compare/v12.0.0...v12.1.0) - 2025-09-09 - -### Merged - -- Generated SDK #4521 [`#109`](https://github.com/fireblocks/java-sdk/pull/109) - -## [v12.0.0](https://github.com/fireblocks/java-sdk/compare/v11.2.0...v12.0.0) - 2025-09-01 - -### Merged - -- Generated SDK #7741 [`#108`](https://github.com/fireblocks/java-sdk/pull/108) - -## [v11.2.0](https://github.com/fireblocks/java-sdk/compare/v11.1.0...v11.2.0) - 2025-08-21 - -### Merged - -- Generated SDK #3302 [`#107`](https://github.com/fireblocks/java-sdk/pull/107) - -## [v11.1.0](https://github.com/fireblocks/java-sdk/compare/v11.0.0...v11.1.0) - 2025-08-11 - -### Merged - -- Generated SDK #1782 [`#105`](https://github.com/fireblocks/java-sdk/pull/105) - -## [v11.0.0](https://github.com/fireblocks/java-sdk/compare/v10.4.0...v11.0.0) - 2025-07-15 - -### Merged - -- Generated SDK #5610 [`#103`](https://github.com/fireblocks/java-sdk/pull/103) - -## [v10.4.0](https://github.com/fireblocks/java-sdk/compare/v10.3.0...v10.4.0) - 2025-06-29 - -### Merged - -- Generated SDK #1492 [`#101`](https://github.com/fireblocks/java-sdk/pull/101) - -## [v10.3.0](https://github.com/fireblocks/java-sdk/compare/v10.2.0...v10.3.0) - 2025-06-18 - -### Merged - -- Generated SDK #4009 [`#99`](https://github.com/fireblocks/java-sdk/pull/99) - -## [v10.2.0](https://github.com/fireblocks/java-sdk/compare/v10.1.1...v10.2.0) - 2025-06-04 - -### Merged - -- Generated SDK #8912 [`#98`](https://github.com/fireblocks/java-sdk/pull/98) - -## [v10.1.1](https://github.com/fireblocks/java-sdk/compare/v10.1.0...v10.1.1) - 2025-05-18 - -### Merged - -- Generated SDK #5019 [`#97`](https://github.com/fireblocks/java-sdk/pull/97) - -## [v10.1.0](https://github.com/fireblocks/java-sdk/compare/v10.0.2...v10.1.0) - 2025-05-07 - -### Merged - -- Generated SDK #7076 [`#95`](https://github.com/fireblocks/java-sdk/pull/95) - -## [v10.0.2](https://github.com/fireblocks/java-sdk/compare/v10.0.1...v10.0.2) - 2025-04-20 - -### Merged - -- Generated SDK #4794 [`#94`](https://github.com/fireblocks/java-sdk/pull/94) - -## [v10.0.1](https://github.com/fireblocks/java-sdk/compare/v10.0.0...v10.0.1) - 2025-04-07 - -### Merged - -- Generated SDK #3065 [`#93`](https://github.com/fireblocks/java-sdk/pull/93) - -## [v10.0.0](https://github.com/fireblocks/java-sdk/compare/v9.0.0...v10.0.0) - 2025-03-30 - -### Merged - -- Generated SDK #619 [`#90`](https://github.com/fireblocks/java-sdk/pull/90) - -## [v9.0.0](https://github.com/fireblocks/java-sdk/compare/v8.1.0...v9.0.0) - 2025-03-17 - -### Merged - -- Generated SDK #645 [`#89`](https://github.com/fireblocks/java-sdk/pull/89) - -## [v8.1.0](https://github.com/fireblocks/java-sdk/compare/v8.0.1...v8.1.0) - 2025-02-24 - -### Merged - -- Generated SDK #9833 [`#84`](https://github.com/fireblocks/java-sdk/pull/84) - -## [v8.0.1](https://github.com/fireblocks/java-sdk/compare/v8.0.0...v8.0.1) - 2025-02-12 - -### Merged - -- Generated SDK #4262 [`#82`](https://github.com/fireblocks/java-sdk/pull/82) - -## [v8.0.0](https://github.com/fireblocks/java-sdk/compare/v7.0.0...v8.0.0) - 2025-02-02 - -### Merged - -- Generated SDK #538 [`#80`](https://github.com/fireblocks/java-sdk/pull/80) - -## [v7.0.0](https://github.com/fireblocks/java-sdk/compare/v6.0.0...v7.0.0) - 2025-01-08 - -### Merged - -- Generated SDK #8699 [`#77`](https://github.com/fireblocks/java-sdk/pull/77) - -## [v6.0.0](https://github.com/fireblocks/java-sdk/compare/v5.0.0...v6.0.0) - 2024-12-05 - -### Merged - -- Generated SDK #1430 [`#73`](https://github.com/fireblocks/java-sdk/pull/73) - -## [v5.0.0](https://github.com/fireblocks/java-sdk/compare/v4.0.0...v5.0.0) - 2024-10-31 - -### Merged - -- Generated SDK #5184 [`#71`](https://github.com/fireblocks/java-sdk/pull/71) - -## [v4.0.0](https://github.com/fireblocks/java-sdk/compare/v3.1.0...v4.0.0) - 2024-09-17 - -### Merged - -- Generated SDK #237 [`#70`](https://github.com/fireblocks/java-sdk/pull/70) - -## [v3.1.0](https://github.com/fireblocks/java-sdk/compare/v3.0.0...v3.1.0) - 2024-07-25 - -### Merged - -- Generated SDK #6749 [`#67`](https://github.com/fireblocks/java-sdk/pull/67) - -## [v3.0.0](https://github.com/fireblocks/java-sdk/compare/v2.1.0...v3.0.0) - 2024-07-17 - -### Merged - -- Generated SDK #6152 [`#65`](https://github.com/fireblocks/java-sdk/pull/65) -- Generated SDK #7984 [`#62`](https://github.com/fireblocks/java-sdk/pull/62) -- Generated SDK #2873 [`#61`](https://github.com/fireblocks/java-sdk/pull/61) - -## [v2.1.0](https://github.com/fireblocks/java-sdk/compare/v2.0.1...v2.1.0) - 2024-06-04 - -### Merged - -- Generated SDK for version COR-46191/fix_pipelines [`#24`](https://github.com/fireblocks/java-sdk/pull/24) -- Generated SDK for version COR-46191/fix_pipelines [`#23`](https://github.com/fireblocks/java-sdk/pull/23) -- Generated SDK for version COR-46191/fix_pipelines [`#22`](https://github.com/fireblocks/java-sdk/pull/22) -- Generated SDK for version COR-46191/fix_pipelines [`#21`](https://github.com/fireblocks/java-sdk/pull/21) - -## [v2.0.1](https://github.com/fireblocks/java-sdk/compare/v2.0.0...v2.0.1) - 2024-06-04 - -### Merged - -- Generated SDK for version COR-46191/fix_pipelines [`#20`](https://github.com/fireblocks/java-sdk/pull/20) - -## [v2.0.0](https://github.com/fireblocks/java-sdk/compare/v1.1.0...v2.0.0) - 2024-05-08 - -### Merged - -- feat: add tokenization api [`#12`](https://github.com/fireblocks/java-sdk/pull/12) - -## [v1.1.0](https://github.com/fireblocks/java-sdk/compare/v1.0.1...v1.1.0) - 2024-04-17 - -### Merged - -- feat: add cosigners beta api [`#11`](https://github.com/fireblocks/java-sdk/pull/11) -- fix: fix readme doc headline [`#10`](https://github.com/fireblocks/java-sdk/pull/10) - -## [v1.0.1](https://github.com/fireblocks/java-sdk/compare/v1.0.0...v1.0.1) - 2024-04-07 - -### Merged - -- Generated SDK for version v1.0.1 [`#9`](https://github.com/fireblocks/java-sdk/pull/9) - -## v1.0.0 - 2024-04-07 - -### Merged - -- Generated SDK for version v1.0.0 GA [`#8`](https://github.com/fireblocks/java-sdk/pull/8) -- v0.0.1-beta [`#6`](https://github.com/fireblocks/java-sdk/pull/6) -- Update GitHub Actions workflows [`#5`](https://github.com/fireblocks/java-sdk/pull/5) -- Generated #1189972817 [`#3`](https://github.com/fireblocks/java-sdk/pull/3) -- Add installation instructions [`#2`](https://github.com/fireblocks/java-sdk/pull/2) -- Added Idempotency & NCW headers support #6 [`#1`](https://github.com/fireblocks/java-sdk/pull/1) diff --git a/README.md b/README.md index aa4deb85..f5401cd1 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add this dependency to your project's POM: com.fireblocks.sdk fireblocks-sdk - 36.0.0 + 0.0.0 compile ``` @@ -42,7 +42,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.fireblocks.sdk:fireblocks-sdk:36.0.0" +compile "com.fireblocks.sdk:fireblocks-sdk:0.0.0" ``` ### Others @@ -55,7 +55,7 @@ mvn clean package Then manually install the following JARs: -- `target/fireblocks-sdk-36.0.0.jar` +- `target/fireblocks-sdk-0.0.0.jar` - `target/lib/*.jar` ## Versioning @@ -570,6 +570,7 @@ Class | Method | HTTP request | Description *TradingApi* | [**getOrder**](docs/TradingApi.md#getOrder) | **GET** /trading/orders/{orderId} | Get order details *TradingApi* | [**getOrderRequirements**](docs/TradingApi.md#getOrderRequirements) | **GET** /trading/orders/{orderId}/requirement | Get order requirement details for an order *TradingApi* | [**getOrders**](docs/TradingApi.md#getOrders) | **GET** /trading/orders | Get orders +*TradingApi* | [**getTradingPairs**](docs/TradingApi.md#getTradingPairs) | **GET** /trading/pairs | Get trading pairs *TradingApi* | [**getTradingProviderById**](docs/TradingApi.md#getTradingProviderById) | **GET** /trading/providers/{providerId} | Get trading provider by ID *TradingApi* | [**getTradingProviders**](docs/TradingApi.md#getTradingProviders) | **GET** /trading/providers | Get providers *TradingApi* | [**submitOrderRequirements**](docs/TradingApi.md#submitOrderRequirements) | **POST** /trading/orders/{orderId}/requirement/data | Submit a response to an order requirement @@ -601,12 +602,12 @@ Class | Method | HTTP request | Description *UserGroupsBetaApi* | [**getUserGroups**](docs/UserGroupsBetaApi.md#getUserGroups) | **GET** /management/user_groups | List user groups *UserGroupsBetaApi* | [**updateUserGroup**](docs/UserGroupsBetaApi.md#updateUserGroup) | **PUT** /management/user_groups/{groupId} | Update user group *UsersApi* | [**getUsers**](docs/UsersApi.md#getUsers) | **GET** /users | List users -*UtxoManagementBetaApi* | [**getUtxoSelectionConfig**](docs/UtxoManagementBetaApi.md#getUtxoSelectionConfig) | **GET** /utxo_management/selection_config | Get UTXO selection config -*UtxoManagementBetaApi* | [**getUtxos**](docs/UtxoManagementBetaApi.md#getUtxos) | **GET** /utxo_management/{vaultAccountId}/{assetId}/unspent_outputs | List unspent outputs (UTXOs) -*UtxoManagementBetaApi* | [**getVaultAssetUtxoSelectionConfig**](docs/UtxoManagementBetaApi.md#getVaultAssetUtxoSelectionConfig) | **GET** /utxo_management/{vaultAccountId}/{assetId}/selection_config | Get vault and asset UTXO selection config -*UtxoManagementBetaApi* | [**updateUtxoLabels**](docs/UtxoManagementBetaApi.md#updateUtxoLabels) | **PATCH** /utxo_management/{vaultAccountId}/{assetId}/labels | Attach or detach labels to/from UTXOs -*UtxoManagementBetaApi* | [**upsertUtxoSelectionConfig**](docs/UtxoManagementBetaApi.md#upsertUtxoSelectionConfig) | **PUT** /utxo_management/selection_config | Upsert UTXO selection config -*UtxoManagementBetaApi* | [**upsertVaultAssetUtxoSelectionConfig**](docs/UtxoManagementBetaApi.md#upsertVaultAssetUtxoSelectionConfig) | **PUT** /utxo_management/{vaultAccountId}/{assetId}/selection_config | Upsert vault and asset UTXO selection config +*UtxoManagementApi* | [**getUtxoSelectionConfig**](docs/UtxoManagementApi.md#getUtxoSelectionConfig) | **GET** /utxo_management/selection_config | Get UTXO selection config +*UtxoManagementApi* | [**getUtxos**](docs/UtxoManagementApi.md#getUtxos) | **GET** /utxo_management/{vaultAccountId}/{assetId}/unspent_outputs | List unspent outputs (UTXOs) +*UtxoManagementApi* | [**getVaultAssetUtxoSelectionConfig**](docs/UtxoManagementApi.md#getVaultAssetUtxoSelectionConfig) | **GET** /utxo_management/{vaultAccountId}/{assetId}/selection_config | Get vault and asset UTXO selection config +*UtxoManagementApi* | [**updateUtxoLabels**](docs/UtxoManagementApi.md#updateUtxoLabels) | **PATCH** /utxo_management/{vaultAccountId}/{assetId}/labels | Attach or detach labels to/from UTXOs +*UtxoManagementApi* | [**upsertUtxoSelectionConfig**](docs/UtxoManagementApi.md#upsertUtxoSelectionConfig) | **PUT** /utxo_management/selection_config | Upsert UTXO selection config +*UtxoManagementApi* | [**upsertVaultAssetUtxoSelectionConfig**](docs/UtxoManagementApi.md#upsertVaultAssetUtxoSelectionConfig) | **PUT** /utxo_management/{vaultAccountId}/{assetId}/selection_config | Upsert vault and asset UTXO selection config *VaultsApi* | [**activateAssetForVaultAccount**](docs/VaultsApi.md#activateAssetForVaultAccount) | **POST** /vault/accounts/{vaultAccountId}/{assetId}/activate | Activate a wallet in a vault account *VaultsApi* | [**activateUsdcGatewayWalletBeta**](docs/VaultsApi.md#activateUsdcGatewayWalletBeta) | **POST** /vault/accounts/{vaultAccountId}/usdc_gateway/activate | Activate a USDC Gateway wallet *VaultsApi* | [**attachOrDetachTagsFromVaultAccounts**](docs/VaultsApi.md#attachOrDetachTagsFromVaultAccounts) | **POST** /vault/accounts/attached_tags | Attach or detach tags from vault accounts @@ -1545,6 +1546,7 @@ Class | Method | HTTP request | Description - [RiskLevelEnum](docs/RiskLevelEnum.md) - [RoleDetails](docs/RoleDetails.md) - [RoleDetails2](docs/RoleDetails2.md) + - [RoleFeeInfo](docs/RoleFeeInfo.md) - [RoleGrantee](docs/RoleGrantee.md) - [Rule](docs/Rule.md) - [RuleActionEnum](docs/RuleActionEnum.md) @@ -1815,8 +1817,12 @@ Class | Method | HTTP request | Description - [TotalSupplyItemDto](docs/TotalSupplyItemDto.md) - [TotalSupplyPagedResponse](docs/TotalSupplyPagedResponse.md) - [TotalSupplyPagedResponse2](docs/TotalSupplyPagedResponse2.md) + - [TradeClass](docs/TradeClass.md) - [TradingAccountType](docs/TradingAccountType.md) - [TradingErrorSchema](docs/TradingErrorSchema.md) + - [TradingPair](docs/TradingPair.md) + - [TradingPairSide](docs/TradingPairSide.md) + - [TradingPairsListPage](docs/TradingPairsListPage.md) - [TradingProvider](docs/TradingProvider.md) - [Transaction](docs/Transaction.md) - [TransactionConfigurations](docs/TransactionConfigurations.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 5bdd433b..4a18f75c 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -30221,6 +30221,268 @@ paths: x-content-type: multipart/form-data x-accepts: - application/json + /trading/pairs: + get: + description: | + Retrieve the base/quote trading pairs supported by the tenant's trading providers. All filters are optional and combined with AND. + + A provider can return several rows for one pair, one per side and per connected account, each with its own `tradeClass`. Rows may use the wildcard `*` asset ID or the `BOTH` side and are returned unexpanded (see the `baseAsset`, `side` and `baseChain` filters for how they match). + + **Examples** + - Which providers support ETH/USDC: `?baseAsset=ETH"eAsset=USDC`. Add `providerId` to check one provider; an empty `data` array means it does not support the pair. + - All pairs of one account: `?providerId=ACME&accountId=`. Page through large results with `pageSize` and `pageCursor`. + - Everything you can buy with euro: `?baseAsset=EUR&tradeClass=ON_RAMP`. + + **Endpoint Permission:** Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + + For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). + operationId: getTradingPairs + parameters: + - description: Filter by base asset ID. Also matches `*` rows on the chain of + this asset. + explode: true + in: query + name: baseAsset + required: false + schema: + minLength: 1 + type: string + style: form + - description: Filter by quote asset ID. Also matches `*` rows on the chain + of this asset. + explode: true + in: query + name: quoteAsset + required: false + schema: + minLength: 1 + type: string + style: form + - description: "Filter by base asset blockchain `legacyId` (e.g. `ETH`, `BASECHAIN_ETH`,\ + \ `SOL`). Matches both concrete-asset rows and `*` rows on that chain." + explode: true + in: query + name: baseChain + required: false + schema: + minLength: 1 + type: string + style: form + - description: "Filter by quote asset blockchain `legacyId` (e.g. `ETH`, `BASECHAIN_ETH`,\ + \ `SOL`). Matches both concrete-asset rows and `*` rows on that chain." + explode: true + in: query + name: quoteChain + required: false + schema: + minLength: 1 + type: string + style: form + - description: Filter by base asset transfer rail. + explode: true + in: query + name: baseRail + required: false + schema: + $ref: "#/components/schemas/TransferRail" + style: form + - description: Filter by quote asset transfer rail. + explode: true + in: query + name: quoteRail + required: false + schema: + $ref: "#/components/schemas/TransferRail" + style: form + - description: Filter by trading side. `BUY` or `SELL` also matches rows whose + side is `BOTH`; `BOTH` matches rows of any side. + explode: true + in: query + name: side + required: false + schema: + $ref: "#/components/schemas/TradingPairSide" + style: form + - description: Filter by trade class. + explode: true + in: query + name: tradeClass + required: false + schema: + $ref: "#/components/schemas/TradeClass" + style: form + - description: "Filter by provider ID. Repeat the parameter to match any of\ + \ several providers, up to 50." + explode: true + in: query + name: providerId + required: false + schema: + items: + minLength: 1 + type: string + maxItems: 50 + type: array + style: form + - description: "Filter by connected account ID. Repeat the parameter to match\ + \ any of several accounts, up to 50." + explode: true + in: query + name: accountId + required: false + schema: + items: + minLength: 1 + type: string + maxItems: 50 + type: array + style: form + - description: Filter by whether the pair requires prefunding. + explode: true + in: query + name: prefunded + required: false + schema: + type: boolean + style: form + - description: "An order-size filter, not a bound on the result. Only returns\ + \ pairs whose own `min` field (the smallest base-asset amount the pair accepts)\ + \ is at most this value, i.e. pairs that can serve an order of this size.\ + \ For example, `min=10` returns pairs with a `min` of 10 or less." + explode: true + in: query + name: min + required: false + schema: + pattern: ^\d+(\.\d+)?$ + type: string + style: form + - description: "An order-size filter, not a bound on the result. Only returns\ + \ pairs whose own `max` field (the largest base-asset amount the pair accepts)\ + \ is at least this value. For example, `max=1000` returns pairs with a `max`\ + \ of 1000 or more." + explode: true + in: query + name: max + required: false + schema: + pattern: ^\d+(\.\d+)?$ + type: string + style: form + - description: Page size for pagination. + explode: true + in: query + name: pageSize + required: false + schema: + default: 100 + format: int32 + maximum: 1000 + minimum: 1 + type: integer + style: form + - description: Page cursor for pagination. + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/TradingPairsListPage" + description: Trading pairs response + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/TradingErrorSchema" + description: "Bad request: invalid input parameters, malformed request body,\ + \ or validation failure." + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/TradingErrorSchema" + description: Unauthorized. Missing / invalid JWT token in Authorization + header. + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/TradingErrorSchema" + description: "Forbidden: insufficient permissions, disabled feature, or\ + \ restricted access." + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/TradingErrorSchema" + description: "Rate limit exceeded: slow down and retry later." + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "5XX": + content: + application/json: + schema: + $ref: "#/components/schemas/TradingErrorSchema" + description: Internal error while processing the request. + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Get trading pairs + tags: + - Trading + x-rate-limit-category: query + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.trading.getTradingPairs(tradingApiGetTradingPairsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.trading().getTradingPairs(baseAsset,\ + \ quoteAsset, baseChain, quoteChain, baseRail, quoteRail, side, tradeClass,\ + \ providerId, accountId, prefunded, min, max, pageSize, pageCursor);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.trading.get_trading_pairs(base_asset, quote_asset,\ + \ base_chain, quote_chain, base_rail, quote_rail, side, trade_class, provider_id,\ + \ account_id, prefunded, min, max, page_size, page_cursor);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.trading.getTradingPairs(tradingApiGetTradingPairsRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.trading().getTradingPairs(baseAsset,\ + \ quoteAsset, baseChain, quoteChain, baseRail, quoteRail, side, tradeClass,\ + \ providerId, accountId, prefunded, min, max, pageSize, pageCursor);" + - lang: Python + source: "response = fireblocks.trading.get_trading_pairs(base_asset, quote_asset,\ + \ base_chain, quote_chain, base_rail, quote_rail, side, trade_class, provider_id,\ + \ account_id, prefunded, min, max, page_size, page_cursor);" + x-accepts: + - application/json /trading/providers: get: description: | @@ -35003,9 +35265,6 @@ paths: `NOT_LABELLABLE` after about an hour. A `400` without `failures` means the request itself is malformed. - **Note:** These endpoints are currently in beta and might be subject to - changes. - Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. operationId: updateUtxoLabels @@ -35070,33 +35329,33 @@ paths: $ref: "#/components/responses/Error" summary: Attach or detach labels to/from UTXOs tags: - - UTXO Management (Beta) + - UTXO Management x-rate-limit-category: write x-readme: code-samples: - language: typescript code: "const response: Promise>\ - \ = fireblocks.uTXOManagementBeta.updateUtxoLabels(uTXOManagementBetaApiUpdateUtxoLabelsRequest);" + \ = fireblocks.uTXOManagement.updateUtxoLabels(uTXOManagementApiUpdateUtxoLabelsRequest);" name: Fireblocks SDK TypeScript example - language: java code: "CompletableFuture> response\ - \ = fireblocks.uTXOManagementBeta().updateUtxoLabels(attachDetachUtxoLabelsRequest,\ + \ = fireblocks.uTXOManagement().updateUtxoLabels(attachDetachUtxoLabelsRequest,\ \ vaultAccountId, assetId, idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.u_t_x_o_management_beta.update_utxo_labels(attach_detach_utxo_labels_request,\ + code: "response = fireblocks.u_t_x_o_management.update_utxo_labels(attach_detach_utxo_labels_request,\ \ vault_account_id, asset_id, idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript source: "const response: Promise>\ - \ = fireblocks.uTXOManagementBeta.updateUtxoLabels(uTXOManagementBetaApiUpdateUtxoLabelsRequest);" + \ = fireblocks.uTXOManagement.updateUtxoLabels(uTXOManagementApiUpdateUtxoLabelsRequest);" - lang: Java source: "CompletableFuture> response\ - \ = fireblocks.uTXOManagementBeta().updateUtxoLabels(attachDetachUtxoLabelsRequest,\ + \ = fireblocks.uTXOManagement().updateUtxoLabels(attachDetachUtxoLabelsRequest,\ \ vaultAccountId, assetId, idempotencyKey);" - lang: Python - source: "response = fireblocks.u_t_x_o_management_beta.update_utxo_labels(attach_detach_utxo_labels_request,\ + source: "response = fireblocks.u_t_x_o_management.update_utxo_labels(attach_detach_utxo_labels_request,\ \ vault_account_id, asset_id, idempotency_key);" x-content-type: application/json x-accepts: @@ -35105,7 +35364,6 @@ paths: get: description: |- Returns the config stored at this vault-and-asset scope, if any, and the effective strategy after workspace fallback and runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored at this scope and none is inherited from the workspace (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this scope, otherwise `ASC`. - **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. operationId: getVaultAssetUtxoSelectionConfig parameters: @@ -35142,36 +35400,35 @@ paths: $ref: "#/components/responses/Error" summary: Get vault and asset UTXO selection config tags: - - UTXO Management (Beta) + - UTXO Management x-rate-limit-category: read x-readme: code-samples: - language: typescript code: "const response: Promise>\ - \ = fireblocks.uTXOManagementBeta.getVaultAssetUtxoSelectionConfig();" + \ = fireblocks.uTXOManagement.getVaultAssetUtxoSelectionConfig();" name: Fireblocks SDK TypeScript example - language: java code: CompletableFuture> response - = fireblocks.uTXOManagementBeta().getVaultAssetUtxoSelectionConfig(); + = fireblocks.uTXOManagement().getVaultAssetUtxoSelectionConfig(); name: Fireblocks SDK Java example - language: python - code: response = fireblocks.u_t_x_o_management_beta.get_vault_asset_utxo_selection_config(); + code: response = fireblocks.u_t_x_o_management.get_vault_asset_utxo_selection_config(); name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript source: "const response: Promise>\ - \ = fireblocks.uTXOManagementBeta.getVaultAssetUtxoSelectionConfig();" + \ = fireblocks.uTXOManagement.getVaultAssetUtxoSelectionConfig();" - lang: Java source: CompletableFuture> response - = fireblocks.uTXOManagementBeta().getVaultAssetUtxoSelectionConfig(); + = fireblocks.uTXOManagement().getVaultAssetUtxoSelectionConfig(); - lang: Python - source: response = fireblocks.u_t_x_o_management_beta.get_vault_asset_utxo_selection_config(); + source: response = fireblocks.u_t_x_o_management.get_vault_asset_utxo_selection_config(); x-accepts: - application/json put: description: |- Creates or updates the UTXO selection strategy for this vault account and asset. `ADAPTIVE` is recommended. - **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin. operationId: upsertVaultAssetUtxoSelectionConfig parameters: @@ -35225,33 +35482,33 @@ paths: $ref: "#/components/responses/Error" summary: Upsert vault and asset UTXO selection config tags: - - UTXO Management (Beta) + - UTXO Management x-rate-limit-category: write x-readme: code-samples: - language: typescript code: "const response: Promise>\ - \ = fireblocks.uTXOManagementBeta.upsertVaultAssetUtxoSelectionConfig(uTXOManagementBetaApiUpsertVaultAssetUtxoSelectionConfigRequest);" + \ = fireblocks.uTXOManagement.upsertVaultAssetUtxoSelectionConfig(uTXOManagementApiUpsertVaultAssetUtxoSelectionConfigRequest);" name: Fireblocks SDK TypeScript example - language: java code: "CompletableFuture> response\ - \ = fireblocks.uTXOManagementBeta().upsertVaultAssetUtxoSelectionConfig(upsertUtxoSelectionConfigRequest,\ + \ = fireblocks.uTXOManagement().upsertVaultAssetUtxoSelectionConfig(upsertUtxoSelectionConfigRequest,\ \ idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.u_t_x_o_management_beta.upsert_vault_asset_utxo_selection_config(upsert_utxo_selection_config_request,\ + code: "response = fireblocks.u_t_x_o_management.upsert_vault_asset_utxo_selection_config(upsert_utxo_selection_config_request,\ \ idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript source: "const response: Promise>\ - \ = fireblocks.uTXOManagementBeta.upsertVaultAssetUtxoSelectionConfig(uTXOManagementBetaApiUpsertVaultAssetUtxoSelectionConfigRequest);" + \ = fireblocks.uTXOManagement.upsertVaultAssetUtxoSelectionConfig(uTXOManagementApiUpsertVaultAssetUtxoSelectionConfigRequest);" - lang: Java source: "CompletableFuture> response\ - \ = fireblocks.uTXOManagementBeta().upsertVaultAssetUtxoSelectionConfig(upsertUtxoSelectionConfigRequest,\ + \ = fireblocks.uTXOManagement().upsertVaultAssetUtxoSelectionConfig(upsertUtxoSelectionConfigRequest,\ \ idempotencyKey);" - lang: Python - source: "response = fireblocks.u_t_x_o_management_beta.upsert_vault_asset_utxo_selection_config(upsert_utxo_selection_config_request,\ + source: "response = fireblocks.u_t_x_o_management.upsert_vault_asset_utxo_selection_config(upsert_utxo_selection_config_request,\ \ idempotency_key);" x-content-type: application/json x-accepts: @@ -35260,7 +35517,6 @@ paths: get: description: |- Returns a paginated list of unspent transaction outputs (UTXOs) for a UTXO-based asset in a vault account, with optional filters for labels, statuses, amounts, and more. - **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. operationId: getUtxos parameters: @@ -35439,22 +35695,22 @@ paths: $ref: "#/components/responses/Error" summary: List unspent outputs (UTXOs) tags: - - UTXO Management (Beta) + - UTXO Management x-rate-limit-category: read x-readme: code-samples: - language: typescript code: "const response: Promise> =\ - \ fireblocks.uTXOManagementBeta.getUtxos(uTXOManagementBetaApiGetUtxosRequest);" + \ fireblocks.uTXOManagement.getUtxos(uTXOManagementApiGetUtxosRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.uTXOManagementBeta().getUtxos(vaultAccountId,\ + code: "CompletableFuture> response = fireblocks.uTXOManagement().getUtxos(vaultAccountId,\ \ assetId, pageCursor, pageSize, sort, order, includeAllLabels, includeAnyLabels,\ \ excludeAnyLabels, includeStatuses, address, txHash, txId, minAmount,\ \ maxAmount);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.u_t_x_o_management_beta.get_utxos(vault_account_id,\ + code: "response = fireblocks.u_t_x_o_management.get_utxos(vault_account_id,\ \ asset_id, page_cursor, page_size, sort, order, include_all_labels, include_any_labels,\ \ exclude_any_labels, include_statuses, address, tx_hash, tx_id, min_amount,\ \ max_amount);" @@ -35462,13 +35718,13 @@ paths: x-codeSamples: - lang: TypeScript source: "const response: Promise> =\ - \ fireblocks.uTXOManagementBeta.getUtxos(uTXOManagementBetaApiGetUtxosRequest);" + \ fireblocks.uTXOManagement.getUtxos(uTXOManagementApiGetUtxosRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.uTXOManagementBeta().getUtxos(vaultAccountId,\ + source: "CompletableFuture> response = fireblocks.uTXOManagement().getUtxos(vaultAccountId,\ \ assetId, pageCursor, pageSize, sort, order, includeAllLabels, includeAnyLabels,\ \ excludeAnyLabels, includeStatuses, address, txHash, txId, minAmount, maxAmount);" - lang: Python - source: "response = fireblocks.u_t_x_o_management_beta.get_utxos(vault_account_id,\ + source: "response = fireblocks.u_t_x_o_management.get_utxos(vault_account_id,\ \ asset_id, page_cursor, page_size, sort, order, include_all_labels, include_any_labels,\ \ exclude_any_labels, include_statuses, address, tx_hash, tx_id, min_amount,\ \ max_amount);" @@ -35478,7 +35734,6 @@ paths: get: description: |- Returns the workspace-level configured selection strategy and the effective strategy after runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this workspace, otherwise `ASC`. - **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. operationId: getUtxoSelectionConfig responses: @@ -35495,36 +35750,35 @@ paths: $ref: "#/components/responses/Error" summary: Get UTXO selection config tags: - - UTXO Management (Beta) + - UTXO Management x-rate-limit-category: read x-readme: code-samples: - language: typescript code: "const response: Promise>\ - \ = fireblocks.uTXOManagementBeta.getUtxoSelectionConfig();" + \ = fireblocks.uTXOManagement.getUtxoSelectionConfig();" name: Fireblocks SDK TypeScript example - language: java code: CompletableFuture> response - = fireblocks.uTXOManagementBeta().getUtxoSelectionConfig(); + = fireblocks.uTXOManagement().getUtxoSelectionConfig(); name: Fireblocks SDK Java example - language: python - code: response = fireblocks.u_t_x_o_management_beta.get_utxo_selection_config(); + code: response = fireblocks.u_t_x_o_management.get_utxo_selection_config(); name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript source: "const response: Promise>\ - \ = fireblocks.uTXOManagementBeta.getUtxoSelectionConfig();" + \ = fireblocks.uTXOManagement.getUtxoSelectionConfig();" - lang: Java source: CompletableFuture> response - = fireblocks.uTXOManagementBeta().getUtxoSelectionConfig(); + = fireblocks.uTXOManagement().getUtxoSelectionConfig(); - lang: Python - source: response = fireblocks.u_t_x_o_management_beta.get_utxo_selection_config(); + source: response = fireblocks.u_t_x_o_management.get_utxo_selection_config(); x-accepts: - application/json put: description: |- Creates or updates the workspace-level UTXO selection strategy. `ADAPTIVE` is recommended. - **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin. operationId: upsertUtxoSelectionConfig parameters: @@ -35559,33 +35813,33 @@ paths: $ref: "#/components/responses/Error" summary: Upsert UTXO selection config tags: - - UTXO Management (Beta) + - UTXO Management x-rate-limit-category: write x-readme: code-samples: - language: typescript code: "const response: Promise>\ - \ = fireblocks.uTXOManagementBeta.upsertUtxoSelectionConfig(uTXOManagementBetaApiUpsertUtxoSelectionConfigRequest);" + \ = fireblocks.uTXOManagement.upsertUtxoSelectionConfig(uTXOManagementApiUpsertUtxoSelectionConfigRequest);" name: Fireblocks SDK TypeScript example - language: java code: "CompletableFuture> response\ - \ = fireblocks.uTXOManagementBeta().upsertUtxoSelectionConfig(upsertUtxoSelectionConfigRequest,\ + \ = fireblocks.uTXOManagement().upsertUtxoSelectionConfig(upsertUtxoSelectionConfigRequest,\ \ idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.u_t_x_o_management_beta.upsert_utxo_selection_config(upsert_utxo_selection_config_request,\ + code: "response = fireblocks.u_t_x_o_management.upsert_utxo_selection_config(upsert_utxo_selection_config_request,\ \ idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript source: "const response: Promise>\ - \ = fireblocks.uTXOManagementBeta.upsertUtxoSelectionConfig(uTXOManagementBetaApiUpsertUtxoSelectionConfigRequest);" + \ = fireblocks.uTXOManagement.upsertUtxoSelectionConfig(uTXOManagementApiUpsertUtxoSelectionConfigRequest);" - lang: Java source: "CompletableFuture> response\ - \ = fireblocks.uTXOManagementBeta().upsertUtxoSelectionConfig(upsertUtxoSelectionConfigRequest,\ + \ = fireblocks.uTXOManagement().upsertUtxoSelectionConfig(upsertUtxoSelectionConfigRequest,\ \ idempotencyKey);" - lang: Python - source: "response = fireblocks.u_t_x_o_management_beta.upsert_utxo_selection_config(upsert_utxo_selection_config_request,\ + source: "response = fireblocks.u_t_x_o_management.upsert_utxo_selection_config(upsert_utxo_selection_config_request,\ \ idempotency_key);" x-content-type: application/json x-accepts: @@ -37181,8 +37435,7 @@ paths: type: boolean style: form - description: Only include UTXOs that have ALL of these labels (AND logic). - Requires the UTXO Manager. This feature is currently in beta and might be - subject to changes. + Requires the UTXO Manager. explode: true in: query name: includeAllLabels @@ -37193,8 +37446,7 @@ paths: type: array style: form - description: Only include UTXOs that have ANY of these labels (OR logic). - Requires the UTXO Manager. This feature is currently in beta and might be - subject to changes. + Requires the UTXO Manager. explode: true in: query name: includeAnyLabels @@ -37205,7 +37457,7 @@ paths: type: array style: form - description: Exclude UTXOs that have ANY of these labels. Requires the UTXO - Manager. This feature is currently in beta and might be subject to changes. + Manager. explode: true in: query name: excludeAnyLabels @@ -37216,7 +37468,7 @@ paths: type: array style: form - description: Only include UTXOs from this specific address. Requires the UTXO - Manager. This feature is currently in beta and might be subject to changes. + Manager. explode: true in: query name: address @@ -37225,7 +37477,7 @@ paths: type: string style: form - description: Minimum UTXO amount in the asset's base unit. Requires the UTXO - Manager. This feature is currently in beta and might be subject to changes. + Manager. explode: true in: query name: minAmount @@ -37234,7 +37486,7 @@ paths: type: string style: form - description: Maximum UTXO amount in the asset's base unit. Requires the UTXO - Manager. This feature is currently in beta and might be subject to changes. + Manager. explode: true in: query name: maxAmount @@ -49969,14 +50221,47 @@ components: description: The USD value of the requested amount. type: string type: object + RoleFeeInfo: + description: |- + **Early Access.** What the transfer cost the Fireblocks wallet of one role (`sender` or `recipient`). Currently reported for TON only. + + Unlike `networkFee`, which describes the transfer as a whole, these amounts are always the cost to the wallet of that role, so the two can differ, for example for a `recipient`. + example: + valueCredited: "0.000000001" + feesDeducted: "0.017686415" + properties: + feesDeducted: + description: |- + The total amount of TON deducted from the wallet because of the transfer, in TON, as a decimal string with nine decimals (like `networkFee`). + + - `sender` of a native TON transfer: the wallet's own fees plus the forwarding fees of the messages it sent. + - `sender` of a Jetton (token) transfer: what the wallet actually lost. This is its own fees plus the TON it attached to cover the token wallets, minus any excess returned to it. If the excess is returned to the sender, the fee of receiving it is included. If the excess goes to any other wallet, the full attached TON is counted. When one external message carries several Jetton transfers (a multi-send), the loss is that of the whole message: every excess that came back to the wallet is subtracted. + - `recipient` of a native TON transfer: the fees of the transaction that received the transfer, including gas. + - `recipient` of a Jetton transfer: the fees of the notification transaction, usually a few nanoTON of storage fees. `"0.000000000"` when the transfer carried no forward amount, because the wallet then has no transaction of its own and pays nothing. + example: "0.017686415" + type: string + valueCredited: + description: |- + The gross amount of TON that arrived at the wallet together with the token notification (the forward amount), in TON, as a decimal string with nine decimals. Set only for the `recipient` of a Jetton (token) transfer, and omitted when the amount is zero or the notification bounced. + + `valueCredited` is not subtracted from `feesDeducted`. The net change of the wallet's TON balance caused by the transfer is `valueCredited` minus `feesDeducted`. + example: "0.000000001" + type: string + type: object FeeInfo: description: Details of the transaction's fee. example: serviceFee: serviceFee relayType: LOCAL relayId: "1" + sender: + valueCredited: "0.000000001" + feesDeducted: "0.017686415" networkFee: networkFee L2networkFee: "0.0005" + recipient: + valueCredited: "0.000000001" + feesDeducted: "0.017686415" relayName: Tenant Name L1networkFee: "0.003955" feeUSD: "0.0013" @@ -50024,6 +50309,10 @@ components: description: The USD value of the fee example: "0.0013" type: string + sender: + $ref: "#/components/schemas/RoleFeeInfo" + recipient: + $ref: "#/components/schemas/RoleFeeInfo" type: object CantonDomainEnum: description: "The Canton domain a transaction belongs to. Singular, and it matches\ @@ -52370,8 +52659,14 @@ components: serviceFee: serviceFee relayType: LOCAL relayId: "1" + sender: + valueCredited: "0.000000001" + feesDeducted: "0.017686415" networkFee: networkFee L2networkFee: "0.0005" + recipient: + valueCredited: "0.000000001" + feesDeducted: "0.017686415" relayName: Tenant Name L1networkFee: "0.003955" feeUSD: "0.0013" @@ -53602,7 +53897,71 @@ components: example: "11228" type: string blockchainInfo: - description: A JSON used to store additional data that is blockchain-specific. + description: |- + A JSON used to store additional data that is blockchain-specific. + + **TON (Early Access).** For TON transfers the object contains: + + | Field | Description | + | --- | --- | + | `tonTransferType` | `NATIVE` for a TON transfer, `JETTON` for a token transfer. | + | `hashes` | Hex hashes of the transfer: `externalIncoming`, and either `tonTransfer` (native) or `jettonTransfer` (Jetton). | + | `messageContent` | The message body (comment) of the transfer, as a base64 string. | + | `isFeeExcess` | `true` only on the transaction that records the excess TON returned by a Jetton transfer to one of your wallets other than the sender. That transaction is a plain native transfer to the wallet, its top-level `feeInfo` has only a `recipient` struct, like any regular recipient. Omitted otherwise. | + | `feeBreakdowns` | The fee details of the wallets of your workspace in the transfer: one entry per wallet. Available when the feature is enabled for your workspace. The totals of each wallet are in the top-level `feeInfo` of the transaction, in its `sender` and `recipient` structs (`feesDeducted`, `valueCredited`). | + + All amounts inside `feeBreakdowns` are integer strings in **nanoTON** (1 TON = 1,000,000,000 nanoTON), unlike the top-level `feeInfo`, which is in TON. + + Each entry of `feeBreakdowns` contains: + + | Field | Description | + | --- | --- | + | `role` | `SENDER` or `RECIPIENT`: the role of the wallet in the transfer. | + | `address` | The wallet, as `raw` and `userFriendly` addresses. | + | `txHash` | The hash of the wallet's own on-chain transaction. Omitted for a Jetton `recipient` with no transaction of its own (see below). | + | `feeBreakdown.totalOutMsgsForwardFees` | The sum of the forwarding fees of the messages sent by the wallet's transaction. | + | `feeBreakdown.chainReported` | The fee components reported by the blockchain for the wallet's transaction: `totalFees`, `storageFees`, `gasFees`, `actionFees` and `forwardFees`, and, when applicable, `importFee`, `bounceFees` and `actionFine`. `totalFees` is the sum of `storageFees`, `importFee`, `gasFees`, `actionFees` and `bounceFees`. | + | `feeBreakdown.fundingSpent` | The rest of the sender's loss beyond the fees in this entry: for a Jetton `sender`, the TON the wallet attached to fund the token wallets and did not get back; for a wallet that sends through a second transaction of its own (a Highload wallet), also the fees of that transaction. For the same wallet, `feeInfo..feesDeducted` = `totalFees` + `totalOutMsgsForwardFees` + `fundingSpent` (`fundingSpent` is 0 when absent), converted from nanoTON to TON. | + + A Jetton transfer sent without a forward amount sends the recipient no notification, so the recipient wallet has no transaction and pays nothing: its entry has no `txHash`, all its figures are `"0"` and `feeInfo.recipient.feesDeducted` is `"0.000000000"`. An amount that could not be established from on-chain data is reported as no entry and no struct in `feeInfo` for that role. + + Only the wallets that belong to the notified workspace appear in `feeBreakdowns`. A transfer between two wallets of your own workspace is a single transaction and carries an entry for each wallet (tell them apart by `role`), and the top-level `feeInfo` has both a `sender` and a `recipient` struct. + + `blockchainInfo` is kept to 2,048 characters. When a very long message pushes a TON transfer over that, the optional details are dropped to make it fit: `feeBreakdowns` go first when the message fits without them, `messageContent` goes when the breakdowns fit without it, and both go when neither does. The `hashes`, `tonTransferType`, `isFeeExcess` and the top-level `feeInfo` are always kept. + + Example of a Jetton transfer sent from one of your wallets (addresses and hashes are placeholders): + + ```json + { + "tonTransferType": "JETTON", + "hashes": { + "externalIncoming": "0000000000000000000000000000000000000000000000000000000000000001", + "jettonTransfer": "0000000000000000000000000000000000000000000000000000000000000002" + }, + "messageContent": "te6cckEBAQEAAgAAAEysuc0=", + "feeBreakdowns": [ + { + "address": { + "raw": "0:0000000000000000000000000000000000000000000000000000000000000003", + "userFriendly": "0QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + "txHash": "0000000000000000000000000000000000000000000000000000000000000004", + "feeBreakdown": { + "totalOutMsgsForwardFees": "86046", + "chainReported": { + "totalFees": "475291", + "storageFees": "1", + "gasFees": "220534", + "actionFees": "43022", + "forwardFees": "129068", + "importFee": "211734" + }, + "fundingSpent": "17125078" + } + } + ] + } + ``` example: evmTransferType: NATIVE type: object @@ -53783,7 +54142,7 @@ components: type: object UtxoSelectionFilters: description: | - Narrow the UTXO candidate pool. All specified filters are AND-ed together. This feature is currently in beta and might be subject to changes. + Narrow the UTXO candidate pool. All specified filters are AND-ed together. example: minAmount: "0.001" includeAnyLabels: @@ -53849,7 +54208,7 @@ components: type: object UtxoInputSelection: description: | - Explicitly control which UTXOs to include or exclude. This feature is currently in beta and might be subject to changes. + Explicitly control which UTXOs to include or exclude. example: inputsToExclude: - index: 0 @@ -53881,7 +54240,7 @@ components: type: object UtxoSelectionParams: description: | - For UTXO-based blockchains only. Controls which UTXOs are used for automatic selection. Cannot be used together with extraParameters.inputsSelection. This feature is currently in beta and might be subject to changes. + For UTXO-based blockchains only. Controls which UTXOs are used for automatic selection. Cannot be used together with extraParameters.inputsSelection. example: selectionStrategy: AMOUNT_ASC inputSelection: @@ -72384,6 +72743,199 @@ components: - code - message type: object + TradingPairSide: + description: "Side of a trading pair. Same as `Side`, plus `BOTH`, meaning the\ + \ pair applies to both BUY and SELL." + enum: + - BUY + - SELL + - BOTH + example: BUY + type: string + TradeClass: + description: | + The class of trade a pair represents, derived from the asset class of each leg, the chains those assets settle on, where the trade executes, and the trading side: + * **SWAP_DEFI** - Exchange between two crypto assets on the same chain, executed on-chain + * **SWAP_CEFI** - Exchange between two crypto assets on the same chain, executed through a provider account + * **BRIDGE_DEFI** - Exchange between two crypto assets on different chains, executed on-chain + * **BRIDGE_CEFI** - Exchange between two crypto assets on different chains, executed through a provider account + * **INTERNAL_LEDGER** - Exchange between two crypto assets settled on a provider's internal ledger, within a single provider account. Not split by chain, because neither leg settles on-chain while the trade executes + * **ON_RAMP** - Buying a crypto asset with a fiat asset + * **OFF_RAMP** - Selling a crypto asset for a fiat asset + * **FX** - Exchange between two fiat assets + * **OTC** - A pair quoted by an OTC desk: firm, short-lived RFQ commitments against a dealer, executed on credit rather than against an order book. Takes precedence over the asset-class values, so an OTC desk selling USDC for USD is `OTC`, not `OFF_RAMP` + * **UNKNOWN** - The class could not be resolved, e.g. when the chain of an asset could not be determined. Callers should not route on a pair with this class + enum: + - SWAP_DEFI + - SWAP_CEFI + - BRIDGE_DEFI + - BRIDGE_CEFI + - INTERNAL_LEDGER + - ON_RAMP + - OFF_RAMP + - FX + - OTC + - UNKNOWN + example: SWAP_DEFI + type: string + TradingPair: + description: "A supported base/quote asset pair for a provider, optionally scoped\ + \ to a specific connected account, for a given trading side (BUY/SELL, or\ + \ `BOTH`), with the transfer rails and amount limits that apply to it. `baseAssetId`\ + \ / `quoteAssetId` may be the wildcard `*`, meaning any asset on `baseChain`\ + \ / `quoteChain`; such a row is not expanded." + example: + providerId: ACME + baseAssetId: ETH + quoteAssetId: USDC + baseChain: ETH + quoteChain: ETH + side: BUY + tradeClass: SWAP_DEFI + baseAssetRail: BLOCKCHAIN + quoteAssetRail: BLOCKCHAIN + prefunded: false + min: "0.01" + max: "100" + properties: + providerId: + description: The provider that supports this pair. + example: ACME + minLength: 1 + type: string + accountId: + description: "The connected account the pair is scoped to. Absent for direct-access\ + \ providers, and for provider-level pairs that describe what a provider\ + \ supports before any account is connected. Its absence therefore does\ + \ not imply the provider is direct-access." + example: 7f1a2b3c-9d4e-4a5b-8c6d-1e2f3a4b5c6d + type: string + baseAssetId: + description: "Fireblocks asset ID of the base asset, or `*` for any asset\ + \ on `baseChain`. A `*` value always comes with `baseChain` set." + example: ETH + minLength: 1 + type: string + quoteAssetId: + description: "Fireblocks asset ID of the quote asset, or `*` for any asset\ + \ on `quoteChain`. A `*` value always comes with `quoteChain` set." + example: USDC + minLength: 1 + type: string + baseChain: + description: "Blockchain `legacyId` of the base asset (e.g. `ETH`, `BASECHAIN_ETH`,\ + \ `ETH-AETH`, `SOL`). Set for leaf crypto assets; absent for fiat and\ + \ virtual assets." + example: ETH + minLength: 1 + type: string + quoteChain: + description: "Blockchain `legacyId` of the quote asset (e.g. `ETH`, `BASECHAIN_ETH`,\ + \ `ETH-AETH`, `SOL`). Set for leaf crypto assets; absent for fiat and\ + \ virtual assets." + example: ETH + minLength: 1 + type: string + side: + $ref: "#/components/schemas/TradingPairSide" + tradeClass: + $ref: "#/components/schemas/TradeClass" + baseAssetRail: + $ref: "#/components/schemas/TransferRail" + quoteAssetRail: + $ref: "#/components/schemas/TransferRail" + prefunded: + description: Whether the provider requires the funds to be prefunded on + the provider account before the order can execute. + example: false + type: boolean + min: + description: "Minimum amount of the base asset for this pair/side, as a\ + \ decimal string." + example: "0.01" + pattern: ^\d+(\.\d+)?$ + type: string + max: + description: "Maximum amount of the base asset for this pair/side, as a\ + \ decimal string." + example: "100" + pattern: ^\d+(\.\d+)?$ + type: string + required: + - baseAssetId + - providerId + - quoteAssetId + - side + - tradeClass + type: object + TradingPairsListPage: + example: + next: cursor_abc123def456 + total: 2 + data: + - providerId: ACME + accountId: 7f1a2b3c-9d4e-4a5b-8c6d-1e2f3a4b5c6d + baseAssetId: EUR + quoteAssetId: BTC + quoteChain: BTC + side: SELL + tradeClass: ON_RAMP + baseAssetRail: SEPA + quoteAssetRail: BLOCKCHAIN + prefunded: false + min: "10" + max: "100000" + - providerId: ACME + baseAssetId: '*' + quoteAssetId: '*' + baseChain: ETH + quoteChain: ETH + side: BOTH + tradeClass: SWAP_DEFI + baseAssetRail: BLOCKCHAIN + quoteAssetRail: BLOCKCHAIN + properties: + data: + description: List of trading pairs. + example: + - providerId: ACME + accountId: 7f1a2b3c-9d4e-4a5b-8c6d-1e2f3a4b5c6d + baseAssetId: EUR + quoteAssetId: BTC + quoteChain: BTC + side: SELL + tradeClass: ON_RAMP + baseAssetRail: SEPA + quoteAssetRail: BLOCKCHAIN + prefunded: false + min: "10" + max: "100000" + - providerId: ACME + baseAssetId: '*' + quoteAssetId: '*' + baseChain: ETH + quoteChain: ETH + side: BOTH + tradeClass: SWAP_DEFI + baseAssetRail: BLOCKCHAIN + quoteAssetRail: BLOCKCHAIN + items: + $ref: "#/components/schemas/TradingPair" + type: array + total: + description: Total number of trading pairs matching the query. Best-effort + count; may be absent when results are aggregated across multiple providers. + example: 2 + format: int32 + type: integer + next: + description: "A cursor for the next page of results, if available." + example: cursor_abc123def456 + nullable: true + type: string + required: + - data + type: object ScopeItem: additionalProperties: false example: diff --git a/build.gradle b/build.gradle index 544f0e22..d43e483e 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'eclipse' apply plugin: 'com.diffplug.spotless' group = 'com.fireblocks.sdk' -version = '36.0.0' +version = '0.0.0' buildscript { repositories { diff --git a/docs/FeeInfo.md b/docs/FeeInfo.md index 359f69c9..f1f0730e 100644 --- a/docs/FeeInfo.md +++ b/docs/FeeInfo.md @@ -18,6 +18,8 @@ Details of the transaction's fee. |**relayId** | **String** | The vault account ID of the relay | [optional] | |**relayName** | **String** | The name of the tenant, only for THIRD_PARTY relays | [optional] | |**feeUSD** | **String** | The USD value of the fee | [optional] | +|**sender** | [**RoleFeeInfo**](RoleFeeInfo.md) | | [optional] | +|**recipient** | [**RoleFeeInfo**](RoleFeeInfo.md) | | [optional] | diff --git a/docs/RoleFeeInfo.md b/docs/RoleFeeInfo.md new file mode 100644 index 00000000..2c9524d2 --- /dev/null +++ b/docs/RoleFeeInfo.md @@ -0,0 +1,15 @@ + + +# RoleFeeInfo + +**Early Access.** What the transfer cost the Fireblocks wallet of one role (`sender` or `recipient`). Currently reported for TON only. Unlike `networkFee`, which describes the transfer as a whole, these amounts are always the cost to the wallet of that role, so the two can differ, for example for a `recipient`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**feesDeducted** | **String** | The total amount of TON deducted from the wallet because of the transfer, in TON, as a decimal string with nine decimals (like `networkFee`). - `sender` of a native TON transfer: the wallet's own fees plus the forwarding fees of the messages it sent. - `sender` of a Jetton (token) transfer: what the wallet actually lost. This is its own fees plus the TON it attached to cover the token wallets, minus any excess returned to it. If the excess is returned to the sender, the fee of receiving it is included. If the excess goes to any other wallet, the full attached TON is counted. When one external message carries several Jetton transfers (a multi-send), the loss is that of the whole message: every excess that came back to the wallet is subtracted. - `recipient` of a native TON transfer: the fees of the transaction that received the transfer, including gas. - `recipient` of a Jetton transfer: the fees of the notification transaction, usually a few nanoTON of storage fees. `\"0.000000000\"` when the transfer carried no forward amount, because the wallet then has no transaction of its own and pays nothing. | [optional] | +|**valueCredited** | **String** | The gross amount of TON that arrived at the wallet together with the token notification (the forward amount), in TON, as a decimal string with nine decimals. Set only for the `recipient` of a Jetton (token) transfer, and omitted when the amount is zero or the notification bounced. `valueCredited` is not subtracted from `feesDeducted`. The net change of the wallet's TON balance caused by the transfer is `valueCredited` minus `feesDeducted`. | [optional] | + + + diff --git a/docs/TradeClass.md b/docs/TradeClass.md new file mode 100644 index 00000000..086f1265 --- /dev/null +++ b/docs/TradeClass.md @@ -0,0 +1,29 @@ + + +# TradeClass + +## Enum + + +* `SWAP_DEFI` (value: `"SWAP_DEFI"`) + +* `SWAP_CEFI` (value: `"SWAP_CEFI"`) + +* `BRIDGE_DEFI` (value: `"BRIDGE_DEFI"`) + +* `BRIDGE_CEFI` (value: `"BRIDGE_CEFI"`) + +* `INTERNAL_LEDGER` (value: `"INTERNAL_LEDGER"`) + +* `ON_RAMP` (value: `"ON_RAMP"`) + +* `OFF_RAMP` (value: `"OFF_RAMP"`) + +* `FX` (value: `"FX"`) + +* `OTC` (value: `"OTC"`) + +* `UNKNOWN` (value: `"UNKNOWN"`) + + + diff --git a/docs/TradingApi.md b/docs/TradingApi.md index 1f260790..9fbcf385 100644 --- a/docs/TradingApi.md +++ b/docs/TradingApi.md @@ -11,6 +11,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | [**getOrder**](TradingApi.md#getOrder) | **GET** /trading/orders/{orderId} | Get order details | | [**getOrderRequirements**](TradingApi.md#getOrderRequirements) | **GET** /trading/orders/{orderId}/requirement | Get order requirement details for an order | | [**getOrders**](TradingApi.md#getOrders) | **GET** /trading/orders | Get orders | +| [**getTradingPairs**](TradingApi.md#getTradingPairs) | **GET** /trading/pairs | Get trading pairs | | [**getTradingProviderById**](TradingApi.md#getTradingProviderById) | **GET** /trading/providers/{providerId} | Get trading provider by ID | | [**getTradingProviders**](TradingApi.md#getTradingProviders) | **GET** /trading/providers | Get providers | | [**submitOrderRequirements**](TradingApi.md#submitOrderRequirements) | **POST** /trading/orders/{orderId}/requirement/data | Submit a response to an order requirement | @@ -616,6 +617,116 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## getTradingPairs + +> CompletableFuture> getTradingPairs getTradingPairs(baseAsset, quoteAsset, baseChain, quoteChain, baseRail, quoteRail, side, tradeClass, providerId, accountId, prefunded, min, max, pageSize, pageCursor) + +Get trading pairs + +Retrieve the base/quote trading pairs supported by the tenant's trading providers. All filters are optional and combined with AND. A provider can return several rows for one pair, one per side and per connected account, each with its own `tradeClass`. Rows may use the wildcard `*` asset ID or the `BOTH` side and are returned unexpanded (see the `baseAsset`, `side` and `baseChain` filters for how they match). **Examples** - Which providers support ETH/USDC: `?baseAsset=ETH&quoteAsset=USDC`. Add `providerId` to check one provider; an empty `data` array means it does not support the pair. - All pairs of one account: `?providerId=ACME&accountId=<ACCOUNT_ID>`. Page through large results with `pageSize` and `pageCursor`. - Everything you can buy with euro: `?baseAsset=EUR&tradeClass=ON_RAMP`. **Endpoint Permission:** Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, please refer to our [API Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.TradingApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String baseAsset = "baseAsset_example"; // String | Filter by base asset ID. Also matches `*` rows on the chain of this asset. + String quoteAsset = "quoteAsset_example"; // String | Filter by quote asset ID. Also matches `*` rows on the chain of this asset. + String baseChain = "baseChain_example"; // String | Filter by base asset blockchain `legacyId` (e.g. `ETH`, `BASECHAIN_ETH`, `SOL`). Matches both concrete-asset rows and `*` rows on that chain. + String quoteChain = "quoteChain_example"; // String | Filter by quote asset blockchain `legacyId` (e.g. `ETH`, `BASECHAIN_ETH`, `SOL`). Matches both concrete-asset rows and `*` rows on that chain. + TransferRail baseRail = TransferRail.fromValue("BLOCKCHAIN"); // TransferRail | Filter by base asset transfer rail. + TransferRail quoteRail = TransferRail.fromValue("BLOCKCHAIN"); // TransferRail | Filter by quote asset transfer rail. + TradingPairSide side = TradingPairSide.fromValue("BUY"); // TradingPairSide | Filter by trading side. `BUY` or `SELL` also matches rows whose side is `BOTH`; `BOTH` matches rows of any side. + TradeClass tradeClass = TradeClass.fromValue("SWAP_DEFI"); // TradeClass | Filter by trade class. + List providerId = Arrays.asList(); // List | Filter by provider ID. Repeat the parameter to match any of several providers, up to 50. + List accountId = Arrays.asList(); // List | Filter by connected account ID. Repeat the parameter to match any of several accounts, up to 50. + Boolean prefunded = true; // Boolean | Filter by whether the pair requires prefunding. + String min = "min_example"; // String | An order-size filter, not a bound on the result. Only returns pairs whose own `min` field (the smallest base-asset amount the pair accepts) is at most this value, i.e. pairs that can serve an order of this size. For example, `min=10` returns pairs with a `min` of 10 or less. + String max = "max_example"; // String | An order-size filter, not a bound on the result. Only returns pairs whose own `max` field (the largest base-asset amount the pair accepts) is at least this value. For example, `max=1000` returns pairs with a `max` of 1000 or more. + Integer pageSize = 100; // Integer | Page size for pagination. + String pageCursor = "pageCursor_example"; // String | Page cursor for pagination. + try { + CompletableFuture> response = fireblocks.trading().getTradingPairs(baseAsset, quoteAsset, baseChain, quoteChain, baseRail, quoteRail, side, tradeClass, providerId, accountId, prefunded, min, max, pageSize, pageCursor); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling TradingApi#getTradingPairs"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **baseAsset** | **String**| Filter by base asset ID. Also matches `*` rows on the chain of this asset. | [optional] | +| **quoteAsset** | **String**| Filter by quote asset ID. Also matches `*` rows on the chain of this asset. | [optional] | +| **baseChain** | **String**| Filter by base asset blockchain `legacyId` (e.g. `ETH`, `BASECHAIN_ETH`, `SOL`). Matches both concrete-asset rows and `*` rows on that chain. | [optional] | +| **quoteChain** | **String**| Filter by quote asset blockchain `legacyId` (e.g. `ETH`, `BASECHAIN_ETH`, `SOL`). Matches both concrete-asset rows and `*` rows on that chain. | [optional] | +| **baseRail** | [**TransferRail**](.md)| Filter by base asset transfer rail. | [optional] [enum: BLOCKCHAIN, INTERNAL, SWIFT, IBAN, US_WIRE, ACH, SEPA, SPEI, PIX, LBT, MOMO, CHAPS, PAYID, INTERAC, INTERNAL_TRANSFER, CIPS, NEQUI, FPS_UK, FPS_HK, INSTA_PAY, PESONET] | +| **quoteRail** | [**TransferRail**](.md)| Filter by quote asset transfer rail. | [optional] [enum: BLOCKCHAIN, INTERNAL, SWIFT, IBAN, US_WIRE, ACH, SEPA, SPEI, PIX, LBT, MOMO, CHAPS, PAYID, INTERAC, INTERNAL_TRANSFER, CIPS, NEQUI, FPS_UK, FPS_HK, INSTA_PAY, PESONET] | +| **side** | [**TradingPairSide**](.md)| Filter by trading side. `BUY` or `SELL` also matches rows whose side is `BOTH`; `BOTH` matches rows of any side. | [optional] [enum: BUY, SELL, BOTH] | +| **tradeClass** | [**TradeClass**](.md)| Filter by trade class. | [optional] [enum: SWAP_DEFI, SWAP_CEFI, BRIDGE_DEFI, BRIDGE_CEFI, INTERNAL_LEDGER, ON_RAMP, OFF_RAMP, FX, OTC, UNKNOWN] | +| **providerId** | [**List<String>**](String.md)| Filter by provider ID. Repeat the parameter to match any of several providers, up to 50. | [optional] | +| **accountId** | [**List<String>**](String.md)| Filter by connected account ID. Repeat the parameter to match any of several accounts, up to 50. | [optional] | +| **prefunded** | **Boolean**| Filter by whether the pair requires prefunding. | [optional] | +| **min** | **String**| An order-size filter, not a bound on the result. Only returns pairs whose own `min` field (the smallest base-asset amount the pair accepts) is at most this value, i.e. pairs that can serve an order of this size. For example, `min=10` returns pairs with a `min` of 10 or less. | [optional] | +| **max** | **String**| An order-size filter, not a bound on the result. Only returns pairs whose own `max` field (the largest base-asset amount the pair accepts) is at least this value. For example, `max=1000` returns pairs with a `max` of 1000 or more. | [optional] | +| **pageSize** | **Integer**| Page size for pagination. | [optional] [default to 100] | +| **pageCursor** | **String**| Page cursor for pagination. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Trading pairs response | * X-Request-ID -
| +| **400** | Bad request: invalid input parameters, malformed request body, or validation failure. | * X-Request-ID -
| +| **401** | Unauthorized. Missing / invalid JWT token in Authorization header. | * X-Request-ID -
| +| **403** | Forbidden: insufficient permissions, disabled feature, or restricted access. | * X-Request-ID -
| +| **429** | Rate limit exceeded: slow down and retry later. | * X-Request-ID -
| +| **5XX** | Internal error while processing the request. | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + ## getTradingProviderById > CompletableFuture> getTradingProviderById getTradingProviderById(providerId) diff --git a/docs/TradingPair.md b/docs/TradingPair.md new file mode 100644 index 00000000..c6246dfc --- /dev/null +++ b/docs/TradingPair.md @@ -0,0 +1,26 @@ + + +# TradingPair + +A supported base/quote asset pair for a provider, optionally scoped to a specific connected account, for a given trading side (BUY/SELL, or `BOTH`), with the transfer rails and amount limits that apply to it. `baseAssetId` / `quoteAssetId` may be the wildcard `*`, meaning any asset on `baseChain` / `quoteChain`; such a row is not expanded. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**providerId** | **String** | The provider that supports this pair. | | +|**accountId** | **String** | The connected account the pair is scoped to. Absent for direct-access providers, and for provider-level pairs that describe what a provider supports before any account is connected. Its absence therefore does not imply the provider is direct-access. | [optional] | +|**baseAssetId** | **String** | Fireblocks asset ID of the base asset, or `*` for any asset on `baseChain`. A `*` value always comes with `baseChain` set. | | +|**quoteAssetId** | **String** | Fireblocks asset ID of the quote asset, or `*` for any asset on `quoteChain`. A `*` value always comes with `quoteChain` set. | | +|**baseChain** | **String** | Blockchain `legacyId` of the base asset (e.g. `ETH`, `BASECHAIN_ETH`, `ETH-AETH`, `SOL`). Set for leaf crypto assets; absent for fiat and virtual assets. | [optional] | +|**quoteChain** | **String** | Blockchain `legacyId` of the quote asset (e.g. `ETH`, `BASECHAIN_ETH`, `ETH-AETH`, `SOL`). Set for leaf crypto assets; absent for fiat and virtual assets. | [optional] | +|**side** | **TradingPairSide** | | | +|**tradeClass** | **TradeClass** | | | +|**baseAssetRail** | **TransferRail** | | [optional] | +|**quoteAssetRail** | **TransferRail** | | [optional] | +|**prefunded** | **Boolean** | Whether the provider requires the funds to be prefunded on the provider account before the order can execute. | [optional] | +|**min** | **String** | Minimum amount of the base asset for this pair/side, as a decimal string. | [optional] | +|**max** | **String** | Maximum amount of the base asset for this pair/side, as a decimal string. | [optional] | + + + diff --git a/docs/TradingPairSide.md b/docs/TradingPairSide.md new file mode 100644 index 00000000..7c4fa7ee --- /dev/null +++ b/docs/TradingPairSide.md @@ -0,0 +1,15 @@ + + +# TradingPairSide + +## Enum + + +* `BUY` (value: `"BUY"`) + +* `SELL` (value: `"SELL"`) + +* `BOTH` (value: `"BOTH"`) + + + diff --git a/docs/TradingPairsListPage.md b/docs/TradingPairsListPage.md new file mode 100644 index 00000000..dc24e270 --- /dev/null +++ b/docs/TradingPairsListPage.md @@ -0,0 +1,15 @@ + + +# TradingPairsListPage + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<TradingPair>**](TradingPair.md) | List of trading pairs. | | +|**total** | **Integer** | Total number of trading pairs matching the query. Best-effort count; may be absent when results are aggregated across multiple providers. | [optional] | +|**next** | **String** | A cursor for the next page of results, if available. | [optional] | + + + diff --git a/docs/TransactionResponse.md b/docs/TransactionResponse.md index db3dd7b9..71c77203 100644 --- a/docs/TransactionResponse.md +++ b/docs/TransactionResponse.md @@ -70,7 +70,7 @@ |**errorDescription** | **String** | The transaction's revert reason. This field will be returned when `subStatus` = 'SMART_CONTRACT_EXECUTION_FAILED'. | [optional] | |**replacedTxHash** | **String** | if the transaction is a replace by fee (RBF) transaction, this is the hash of the transsaction that was replaced | [optional] | |**nonce** | **String** | blockchain nonce for the transaction | [optional] | -|**blockchainInfo** | **Object** | A JSON used to store additional data that is blockchain-specific. | [optional] | +|**blockchainInfo** | **Object** | A JSON used to store additional data that is blockchain-specific. **TON (Early Access).** For TON transfers the object contains: | Field | Description | | --- | --- | | `tonTransferType` | `NATIVE` for a TON transfer, `JETTON` for a token transfer. | | `hashes` | Hex hashes of the transfer: `externalIncoming`, and either `tonTransfer` (native) or `jettonTransfer` (Jetton). | | `messageContent` | The message body (comment) of the transfer, as a base64 string. | | `isFeeExcess` | `true` only on the transaction that records the excess TON returned by a Jetton transfer to one of your wallets other than the sender. That transaction is a plain native transfer to the wallet, its top-level `feeInfo` has only a `recipient` struct, like any regular recipient. Omitted otherwise. | | `feeBreakdowns` | The fee details of the wallets of your workspace in the transfer: one entry per wallet. Available when the feature is enabled for your workspace. The totals of each wallet are in the top-level `feeInfo` of the transaction, in its `sender` and `recipient` structs (`feesDeducted`, `valueCredited`). | All amounts inside `feeBreakdowns` are integer strings in **nanoTON** (1 TON = 1,000,000,000 nanoTON), unlike the top-level `feeInfo`, which is in TON. Each entry of `feeBreakdowns` contains: | Field | Description | | --- | --- | | `role` | `SENDER` or `RECIPIENT`: the role of the wallet in the transfer. | | `address` | The wallet, as `raw` and `userFriendly` addresses. | | `txHash` | The hash of the wallet's own on-chain transaction. Omitted for a Jetton `recipient` with no transaction of its own (see below). | | `feeBreakdown.totalOutMsgsForwardFees` | The sum of the forwarding fees of the messages sent by the wallet's transaction. | | `feeBreakdown.chainReported` | The fee components reported by the blockchain for the wallet's transaction: `totalFees`, `storageFees`, `gasFees`, `actionFees` and `forwardFees`, and, when applicable, `importFee`, `bounceFees` and `actionFine`. `totalFees` is the sum of `storageFees`, `importFee`, `gasFees`, `actionFees` and `bounceFees`. | | `feeBreakdown.fundingSpent` | The rest of the sender's loss beyond the fees in this entry: for a Jetton `sender`, the TON the wallet attached to fund the token wallets and did not get back; for a wallet that sends through a second transaction of its own (a Highload wallet), also the fees of that transaction. For the same wallet, `feeInfo.<role>.feesDeducted` = `totalFees` + `totalOutMsgsForwardFees` + `fundingSpent` (`fundingSpent` is 0 when absent), converted from nanoTON to TON. | A Jetton transfer sent without a forward amount sends the recipient no notification, so the recipient wallet has no transaction and pays nothing: its entry has no `txHash`, all its figures are `\"0\"` and `feeInfo.recipient.feesDeducted` is `\"0.000000000\"`. An amount that could not be established from on-chain data is reported as no entry and no struct in `feeInfo` for that role. Only the wallets that belong to the notified workspace appear in `feeBreakdowns`. A transfer between two wallets of your own workspace is a single transaction and carries an entry for each wallet (tell them apart by `role`), and the top-level `feeInfo` has both a `sender` and a `recipient` struct. `blockchainInfo` is kept to 2,048 characters. When a very long message pushes a TON transfer over that, the optional details are dropped to make it fit: `feeBreakdowns` go first when the message fits without them, `messageContent` goes when the breakdowns fit without it, and both go when neither does. The `hashes`, `tonTransferType`, `isFeeExcess` and the top-level `feeInfo` are always kept. Example of a Jetton transfer sent from one of your wallets (addresses and hashes are placeholders): ```json { \"tonTransferType\": \"JETTON\", \"hashes\": { \"externalIncoming\": \"0000000000000000000000000000000000000000000000000000000000000001\", \"jettonTransfer\": \"0000000000000000000000000000000000000000000000000000000000000002\" }, \"messageContent\": \"te6cckEBAQEAAgAAAEysuc0=\", \"feeBreakdowns\": [ { \"address\": { \"raw\": \"0:0000000000000000000000000000000000000000000000000000000000000003\", \"userFriendly\": \"0QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" }, \"txHash\": \"0000000000000000000000000000000000000000000000000000000000000004\", \"feeBreakdown\": { \"totalOutMsgsForwardFees\": \"86046\", \"chainReported\": { \"totalFees\": \"475291\", \"storageFees\": \"1\", \"gasFees\": \"220534\", \"actionFees\": \"43022\", \"forwardFees\": \"129068\", \"importFee\": \"211734\" }, \"fundingSpent\": \"17125078\" } } ] } ``` | [optional] | diff --git a/docs/UtxoInputSelection.md b/docs/UtxoInputSelection.md index ce9357b6..b3704b0e 100644 --- a/docs/UtxoInputSelection.md +++ b/docs/UtxoInputSelection.md @@ -2,7 +2,7 @@ # UtxoInputSelection -Explicitly control which UTXOs to include or exclude. This feature is currently in beta and might be subject to changes. +Explicitly control which UTXOs to include or exclude. ## Properties diff --git a/docs/UtxoManagementBetaApi.md b/docs/UtxoManagementApi.md similarity index 86% rename from docs/UtxoManagementBetaApi.md rename to docs/UtxoManagementApi.md index 3558e89f..18cda1eb 100644 --- a/docs/UtxoManagementBetaApi.md +++ b/docs/UtxoManagementApi.md @@ -1,15 +1,15 @@ -# UtxoManagementBetaApi +# UtxoManagementApi All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getUtxoSelectionConfig**](UtxoManagementBetaApi.md#getUtxoSelectionConfig) | **GET** /utxo_management/selection_config | Get UTXO selection config | -| [**getUtxos**](UtxoManagementBetaApi.md#getUtxos) | **GET** /utxo_management/{vaultAccountId}/{assetId}/unspent_outputs | List unspent outputs (UTXOs) | -| [**getVaultAssetUtxoSelectionConfig**](UtxoManagementBetaApi.md#getVaultAssetUtxoSelectionConfig) | **GET** /utxo_management/{vaultAccountId}/{assetId}/selection_config | Get vault and asset UTXO selection config | -| [**updateUtxoLabels**](UtxoManagementBetaApi.md#updateUtxoLabels) | **PATCH** /utxo_management/{vaultAccountId}/{assetId}/labels | Attach or detach labels to/from UTXOs | -| [**upsertUtxoSelectionConfig**](UtxoManagementBetaApi.md#upsertUtxoSelectionConfig) | **PUT** /utxo_management/selection_config | Upsert UTXO selection config | -| [**upsertVaultAssetUtxoSelectionConfig**](UtxoManagementBetaApi.md#upsertVaultAssetUtxoSelectionConfig) | **PUT** /utxo_management/{vaultAccountId}/{assetId}/selection_config | Upsert vault and asset UTXO selection config | +| [**getUtxoSelectionConfig**](UtxoManagementApi.md#getUtxoSelectionConfig) | **GET** /utxo_management/selection_config | Get UTXO selection config | +| [**getUtxos**](UtxoManagementApi.md#getUtxos) | **GET** /utxo_management/{vaultAccountId}/{assetId}/unspent_outputs | List unspent outputs (UTXOs) | +| [**getVaultAssetUtxoSelectionConfig**](UtxoManagementApi.md#getVaultAssetUtxoSelectionConfig) | **GET** /utxo_management/{vaultAccountId}/{assetId}/selection_config | Get vault and asset UTXO selection config | +| [**updateUtxoLabels**](UtxoManagementApi.md#updateUtxoLabels) | **PATCH** /utxo_management/{vaultAccountId}/{assetId}/labels | Attach or detach labels to/from UTXOs | +| [**upsertUtxoSelectionConfig**](UtxoManagementApi.md#upsertUtxoSelectionConfig) | **PUT** /utxo_management/selection_config | Upsert UTXO selection config | +| [**upsertVaultAssetUtxoSelectionConfig**](UtxoManagementApi.md#upsertVaultAssetUtxoSelectionConfig) | **PUT** /utxo_management/{vaultAccountId}/{assetId}/selection_config | Upsert vault and asset UTXO selection config | @@ -19,7 +19,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ Get UTXO selection config -Returns the workspace-level configured selection strategy and the effective strategy after runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this workspace, otherwise `ASC`. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. +Returns the workspace-level configured selection strategy and the effective strategy after runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this workspace, otherwise `ASC`. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. ### Example @@ -32,7 +32,7 @@ import com.fireblocks.sdk.BasePath; import com.fireblocks.sdk.Fireblocks; import com.fireblocks.sdk.ConfigurationOptions; import com.fireblocks.sdk.model.*; -import com.fireblocks.sdk.api.UtxoManagementBetaApi; +import com.fireblocks.sdk.api.UtxoManagementApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -45,13 +45,13 @@ public class Example { Fireblocks fireblocks = new Fireblocks(configurationOptions); try { - CompletableFuture> response = fireblocks.utxoManagementBeta().getUtxoSelectionConfig(); + CompletableFuture> response = fireblocks.utxoManagement().getUtxoSelectionConfig(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); } catch (InterruptedException | ExecutionException e) { ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling UtxoManagementBetaApi#getUtxoSelectionConfig"); + System.err.println("Exception when calling UtxoManagementApi#getUtxoSelectionConfig"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); @@ -92,7 +92,7 @@ No authorization required List unspent outputs (UTXOs) -Returns a paginated list of unspent transaction outputs (UTXOs) for a UTXO-based asset in a vault account, with optional filters for labels, statuses, amounts, and more. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. +Returns a paginated list of unspent transaction outputs (UTXOs) for a UTXO-based asset in a vault account, with optional filters for labels, statuses, amounts, and more. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. ### Example @@ -105,7 +105,7 @@ import com.fireblocks.sdk.BasePath; import com.fireblocks.sdk.Fireblocks; import com.fireblocks.sdk.ConfigurationOptions; import com.fireblocks.sdk.model.*; -import com.fireblocks.sdk.api.UtxoManagementBetaApi; +import com.fireblocks.sdk.api.UtxoManagementApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -133,13 +133,13 @@ public class Example { String minAmount = "0.001"; // String | Minimum amount filter String maxAmount = "1.0"; // String | Maximum amount filter try { - CompletableFuture> response = fireblocks.utxoManagementBeta().getUtxos(vaultAccountId, assetId, pageCursor, pageSize, sort, order, includeAllLabels, includeAnyLabels, excludeAnyLabels, includeStatuses, address, txHash, txId, minAmount, maxAmount); + CompletableFuture> response = fireblocks.utxoManagement().getUtxos(vaultAccountId, assetId, pageCursor, pageSize, sort, order, includeAllLabels, includeAnyLabels, excludeAnyLabels, includeStatuses, address, txHash, txId, minAmount, maxAmount); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); } catch (InterruptedException | ExecutionException e) { ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling UtxoManagementBetaApi#getUtxos"); + System.err.println("Exception when calling UtxoManagementApi#getUtxos"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); @@ -197,7 +197,7 @@ No authorization required Get vault and asset UTXO selection config -Returns the config stored at this vault-and-asset scope, if any, and the effective strategy after workspace fallback and runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored at this scope and none is inherited from the workspace (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this scope, otherwise `ASC`. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. +Returns the config stored at this vault-and-asset scope, if any, and the effective strategy after workspace fallback and runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored at this scope and none is inherited from the workspace (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive selection is serving for this scope, otherwise `ASC`. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. ### Example @@ -210,7 +210,7 @@ import com.fireblocks.sdk.BasePath; import com.fireblocks.sdk.Fireblocks; import com.fireblocks.sdk.ConfigurationOptions; import com.fireblocks.sdk.model.*; -import com.fireblocks.sdk.api.UtxoManagementBetaApi; +import com.fireblocks.sdk.api.UtxoManagementApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -225,13 +225,13 @@ public class Example { String vaultAccountId = "vaultAccountId_example"; // String | The ID of the vault account. String assetId = "assetId_example"; // String | The ID of the asset try { - CompletableFuture> response = fireblocks.utxoManagementBeta().getVaultAssetUtxoSelectionConfig(vaultAccountId, assetId); + CompletableFuture> response = fireblocks.utxoManagement().getVaultAssetUtxoSelectionConfig(vaultAccountId, assetId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); } catch (InterruptedException | ExecutionException e) { ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling UtxoManagementBetaApi#getVaultAssetUtxoSelectionConfig"); + System.err.println("Exception when calling UtxoManagementApi#getVaultAssetUtxoSelectionConfig"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); @@ -276,7 +276,7 @@ No authorization required Attach or detach labels to/from UTXOs -Attach or detach labels to/from UTXOs in a vault account. Labels can be used for organizing and filtering UTXOs. Labels are applied additively — `labelsToAttach` adds to the existing label set and `labelsToDetach` removes from it. Neither operation replaces the full set. The request is all-or-nothing: if any identifier cannot be labelled, no UTXO is labelled and the request fails with `400`. The response lists every failed identifier in `failures`, each with its own `reason` — use it, not the status, to decide what to do: - `NOT_FOUND` — not found in this vault and asset. - `NOT_LABELLABLE` — spent, or removed, and can no longer be labelled. A UTXO removed within the last hour is reported as `NOT_FOUND` with `utxoStatus: REMOVED`; if it does not reappear, it becomes `NOT_LABELLABLE` after about an hour. A `400` without `failures` means the request itself is malformed. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. +Attach or detach labels to/from UTXOs in a vault account. Labels can be used for organizing and filtering UTXOs. Labels are applied additively — `labelsToAttach` adds to the existing label set and `labelsToDetach` removes from it. Neither operation replaces the full set. The request is all-or-nothing: if any identifier cannot be labelled, no UTXO is labelled and the request fails with `400`. The response lists every failed identifier in `failures`, each with its own `reason` — use it, not the status, to decide what to do: - `NOT_FOUND` — not found in this vault and asset. - `NOT_LABELLABLE` — spent, or removed, and can no longer be labelled. A UTXO removed within the last hour is reported as `NOT_FOUND` with `utxoStatus: REMOVED`; if it does not reappear, it becomes `NOT_LABELLABLE` after about an hour. A `400` without `failures` means the request itself is malformed. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. ### Example @@ -289,7 +289,7 @@ import com.fireblocks.sdk.BasePath; import com.fireblocks.sdk.Fireblocks; import com.fireblocks.sdk.ConfigurationOptions; import com.fireblocks.sdk.model.*; -import com.fireblocks.sdk.api.UtxoManagementBetaApi; +import com.fireblocks.sdk.api.UtxoManagementApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -306,13 +306,13 @@ public class Example { String assetId = "assetId_example"; // String | The ID of the asset String idempotencyKey = "idempotencyKey_example"; // String | 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. try { - CompletableFuture> response = fireblocks.utxoManagementBeta().updateUtxoLabels(attachDetachUtxoLabelsRequest, vaultAccountId, assetId, idempotencyKey); + CompletableFuture> response = fireblocks.utxoManagement().updateUtxoLabels(attachDetachUtxoLabelsRequest, vaultAccountId, assetId, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); } catch (InterruptedException | ExecutionException e) { ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling UtxoManagementBetaApi#updateUtxoLabels"); + System.err.println("Exception when calling UtxoManagementApi#updateUtxoLabels"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); @@ -360,7 +360,7 @@ No authorization required Upsert UTXO selection config -Creates or updates the workspace-level UTXO selection strategy. `ADAPTIVE` is recommended. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin. +Creates or updates the workspace-level UTXO selection strategy. `ADAPTIVE` is recommended. Endpoint Permission: Admin, Non-Signing Admin. ### Example @@ -373,7 +373,7 @@ import com.fireblocks.sdk.BasePath; import com.fireblocks.sdk.Fireblocks; import com.fireblocks.sdk.ConfigurationOptions; import com.fireblocks.sdk.model.*; -import com.fireblocks.sdk.api.UtxoManagementBetaApi; +import com.fireblocks.sdk.api.UtxoManagementApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -388,13 +388,13 @@ public class Example { UpsertUtxoSelectionConfigRequest upsertUtxoSelectionConfigRequest = new UpsertUtxoSelectionConfigRequest(); // UpsertUtxoSelectionConfigRequest | String idempotencyKey = "idempotencyKey_example"; // String | 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. try { - CompletableFuture> response = fireblocks.utxoManagementBeta().upsertUtxoSelectionConfig(upsertUtxoSelectionConfigRequest, idempotencyKey); + CompletableFuture> response = fireblocks.utxoManagement().upsertUtxoSelectionConfig(upsertUtxoSelectionConfigRequest, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); } catch (InterruptedException | ExecutionException e) { ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling UtxoManagementBetaApi#upsertUtxoSelectionConfig"); + System.err.println("Exception when calling UtxoManagementApi#upsertUtxoSelectionConfig"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); @@ -439,7 +439,7 @@ No authorization required Upsert vault and asset UTXO selection config -Creates or updates the UTXO selection strategy for this vault account and asset. `ADAPTIVE` is recommended. **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin. +Creates or updates the UTXO selection strategy for this vault account and asset. `ADAPTIVE` is recommended. Endpoint Permission: Admin, Non-Signing Admin. ### Example @@ -452,7 +452,7 @@ import com.fireblocks.sdk.BasePath; import com.fireblocks.sdk.Fireblocks; import com.fireblocks.sdk.ConfigurationOptions; import com.fireblocks.sdk.model.*; -import com.fireblocks.sdk.api.UtxoManagementBetaApi; +import com.fireblocks.sdk.api.UtxoManagementApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -469,13 +469,13 @@ public class Example { String assetId = "assetId_example"; // String | The ID of the asset String idempotencyKey = "idempotencyKey_example"; // String | 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. try { - CompletableFuture> response = fireblocks.utxoManagementBeta().upsertVaultAssetUtxoSelectionConfig(upsertUtxoSelectionConfigRequest, vaultAccountId, assetId, idempotencyKey); + CompletableFuture> response = fireblocks.utxoManagement().upsertVaultAssetUtxoSelectionConfig(upsertUtxoSelectionConfigRequest, vaultAccountId, assetId, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); } catch (InterruptedException | ExecutionException e) { ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling UtxoManagementBetaApi#upsertVaultAssetUtxoSelectionConfig"); + System.err.println("Exception when calling UtxoManagementApi#upsertVaultAssetUtxoSelectionConfig"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); diff --git a/docs/UtxoSelectionFilters.md b/docs/UtxoSelectionFilters.md index c7a61289..932cc8e6 100644 --- a/docs/UtxoSelectionFilters.md +++ b/docs/UtxoSelectionFilters.md @@ -2,7 +2,7 @@ # UtxoSelectionFilters -Narrow the UTXO candidate pool. All specified filters are AND-ed together. This feature is currently in beta and might be subject to changes. +Narrow the UTXO candidate pool. All specified filters are AND-ed together. ## Properties diff --git a/docs/UtxoSelectionParams.md b/docs/UtxoSelectionParams.md index c6a7a6c3..fe4472c4 100644 --- a/docs/UtxoSelectionParams.md +++ b/docs/UtxoSelectionParams.md @@ -2,7 +2,7 @@ # UtxoSelectionParams -For UTXO-based blockchains only. Controls which UTXOs are used for automatic selection. Cannot be used together with extraParameters.inputsSelection. This feature is currently in beta and might be subject to changes. +For UTXO-based blockchains only. Controls which UTXOs are used for automatic selection. Cannot be used together with extraParameters.inputsSelection. ## Properties diff --git a/docs/VaultsApi.md b/docs/VaultsApi.md index 17f2dfe7..3e0fcda1 100644 --- a/docs/VaultsApi.md +++ b/docs/VaultsApi.md @@ -1285,12 +1285,12 @@ public class Example { String vaultAccountId = "vaultAccountId_example"; // String | The ID of the vault account String assetId = "assetId_example"; // String | The ID of the asset Boolean manualSignging = true; // Boolean | False by default. The maximum number of inputs depends if the transaction will be signed by an automated co-signer server or on a mobile device. - List includeAllLabels = Arrays.asList(); // List | Only include UTXOs that have ALL of these labels (AND logic). Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. - List includeAnyLabels = Arrays.asList(); // List | Only include UTXOs that have ANY of these labels (OR logic). Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. - List excludeAnyLabels = Arrays.asList(); // List | Exclude UTXOs that have ANY of these labels. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. - String address = "address_example"; // String | Only include UTXOs from this specific address. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. - String minAmount = "minAmount_example"; // String | Minimum UTXO amount in the asset's base unit. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. - String maxAmount = "maxAmount_example"; // String | Maximum UTXO amount in the asset's base unit. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. + List includeAllLabels = Arrays.asList(); // List | Only include UTXOs that have ALL of these labels (AND logic). Requires the UTXO Manager. + List includeAnyLabels = Arrays.asList(); // List | Only include UTXOs that have ANY of these labels (OR logic). Requires the UTXO Manager. + List excludeAnyLabels = Arrays.asList(); // List | Exclude UTXOs that have ANY of these labels. Requires the UTXO Manager. + String address = "address_example"; // String | Only include UTXOs from this specific address. Requires the UTXO Manager. + String minAmount = "minAmount_example"; // String | Minimum UTXO amount in the asset's base unit. Requires the UTXO Manager. + String maxAmount = "maxAmount_example"; // String | Maximum UTXO amount in the asset's base unit. Requires the UTXO Manager. try { CompletableFuture> response = fireblocks.vaults().getMaxSpendableAmount(vaultAccountId, assetId, manualSignging, includeAllLabels, includeAnyLabels, excludeAnyLabels, address, minAmount, maxAmount); System.out.println("Status code: " + response.get().getStatusCode()); @@ -1316,12 +1316,12 @@ public class Example { | **vaultAccountId** | **String**| The ID of the vault account | | | **assetId** | **String**| The ID of the asset | | | **manualSignging** | **Boolean**| False by default. The maximum number of inputs depends if the transaction will be signed by an automated co-signer server or on a mobile device. | [optional] | -| **includeAllLabels** | [**List<String>**](String.md)| Only include UTXOs that have ALL of these labels (AND logic). Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. | [optional] | -| **includeAnyLabels** | [**List<String>**](String.md)| Only include UTXOs that have ANY of these labels (OR logic). Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. | [optional] | -| **excludeAnyLabels** | [**List<String>**](String.md)| Exclude UTXOs that have ANY of these labels. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. | [optional] | -| **address** | **String**| Only include UTXOs from this specific address. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. | [optional] | -| **minAmount** | **String**| Minimum UTXO amount in the asset's base unit. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. | [optional] | -| **maxAmount** | **String**| Maximum UTXO amount in the asset's base unit. Requires the UTXO Manager. This feature is currently in beta and might be subject to changes. | [optional] | +| **includeAllLabels** | [**List<String>**](String.md)| Only include UTXOs that have ALL of these labels (AND logic). Requires the UTXO Manager. | [optional] | +| **includeAnyLabels** | [**List<String>**](String.md)| Only include UTXOs that have ANY of these labels (OR logic). Requires the UTXO Manager. | [optional] | +| **excludeAnyLabels** | [**List<String>**](String.md)| Exclude UTXOs that have ANY of these labels. Requires the UTXO Manager. | [optional] | +| **address** | **String**| Only include UTXOs from this specific address. Requires the UTXO Manager. | [optional] | +| **minAmount** | **String**| Minimum UTXO amount in the asset's base unit. Requires the UTXO Manager. | [optional] | +| **maxAmount** | **String**| Maximum UTXO amount in the asset's base unit. Requires the UTXO Manager. | [optional] | ### Return type diff --git a/pom.xml b/pom.xml index ba77257c..5c58d835 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 36.0.0 + 0.0.0 https://github.com/fireblocks/java-sdk The Fireblocks Official SDK is a comprehensive software development kit that enables seamless integration and interaction with the Fireblocks platform. Fireblocks is a cutting-edge blockchain infrastructure platform that provides secure and scalable solutions for managing digital assets and transactions. This SDK empowers developers to build robust applications that can interact with the Fireblocks platform's features, including creating and managing vault accounts, initiating secure transactions, managing assets, and more. It abstracts complex interactions with the Fireblocks API, making it easier for developers to leverage the platform's capabilities while adhering to best practices in security and efficiency. diff --git a/src/main/java/com/fireblocks/sdk/Configuration.java b/src/main/java/com/fireblocks/sdk/Configuration.java index d90f00af..aa53bae8 100644 --- a/src/main/java/com/fireblocks/sdk/Configuration.java +++ b/src/main/java/com/fireblocks/sdk/Configuration.java @@ -21,7 +21,7 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") public class Configuration { - public static final String VERSION = "36.0.0"; + public static final String VERSION = "0.0.0"; private static final AtomicReference defaultApiClient = new AtomicReference<>(); private static volatile Supplier apiClientFactory = ApiClient::new; diff --git a/src/main/java/com/fireblocks/sdk/Fireblocks.java b/src/main/java/com/fireblocks/sdk/Fireblocks.java index cb351de1..5910732a 100644 --- a/src/main/java/com/fireblocks/sdk/Fireblocks.java +++ b/src/main/java/com/fireblocks/sdk/Fireblocks.java @@ -86,7 +86,7 @@ public class Fireblocks { private TravelRuleApi travelRule; private UserGroupsBetaApi userGroupsBeta; private UsersApi users; - private UtxoManagementBetaApi utxoManagementBeta; + private UtxoManagementApi utxoManagement; private VaultsApi vaults; private Web3ConnectionsApi web3Connections; private WebhooksApi webhooks; @@ -583,11 +583,11 @@ public UsersApi users() { return users; } - public UtxoManagementBetaApi utxoManagementBeta() { - if (utxoManagementBeta == null) { - utxoManagementBeta = new UtxoManagementBetaApi(apiClient); + public UtxoManagementApi utxoManagement() { + if (utxoManagement == null) { + utxoManagement = new UtxoManagementApi(apiClient); } - return utxoManagementBeta; + return utxoManagement; } public VaultsApi vaults() { diff --git a/src/main/java/com/fireblocks/sdk/api/TradingApi.java b/src/main/java/com/fireblocks/sdk/api/TradingApi.java index 3c303140..c70efc3a 100644 --- a/src/main/java/com/fireblocks/sdk/api/TradingApi.java +++ b/src/main/java/com/fireblocks/sdk/api/TradingApi.java @@ -34,7 +34,11 @@ import com.fireblocks.sdk.model.RatesRequest; import com.fireblocks.sdk.model.RatesResponse; import com.fireblocks.sdk.model.SubmitOrderRequirementRequest; +import com.fireblocks.sdk.model.TradeClass; +import com.fireblocks.sdk.model.TradingPairSide; +import com.fireblocks.sdk.model.TradingPairsListPage; import com.fireblocks.sdk.model.TradingProvider; +import com.fireblocks.sdk.model.TransferRail; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; @@ -849,6 +853,218 @@ private HttpRequest.Builder getOrdersRequestBuilder( } return localVarRequestBuilder; } + /** + * Get trading pairs Retrieve the base/quote trading pairs supported by the tenant's trading + * providers. All filters are optional and combined with AND. A provider can return several rows + * for one pair, one per side and per connected account, each with its own + * `tradeClass`. Rows may use the wildcard `*` asset ID or the + * `BOTH` side and are returned unexpanded (see the `baseAsset`, + * `side` and `baseChain` filters for how they match). **Examples** - Which + * providers support ETH/USDC: `?baseAsset=ETH&quoteAsset=USDC`. Add + * `providerId` to check one provider; an empty `data` array means it does + * not support the pair. - All pairs of one account: + * `?providerId=ACME&accountId=<ACCOUNT_ID>`. Page through large + * results with `pageSize` and `pageCursor`. - Everything you can buy with + * euro: `?baseAsset=EUR&tradeClass=ON_RAMP`. **Endpoint Permission:** + * Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information + * about error codes and troubleshooting, please refer to our [API Error Codes + * documentation](https://developers.fireblocks.com/reference/api-error-codes). + * + * @param baseAsset Filter by base asset ID. Also matches `*` rows on the chain of + * this asset. (optional) + * @param quoteAsset Filter by quote asset ID. Also matches `*` rows on the chain of + * this asset. (optional) + * @param baseChain Filter by base asset blockchain `legacyId` (e.g. `ETH`, + * `BASECHAIN_ETH`, `SOL`). Matches both concrete-asset rows and + * `*` rows on that chain. (optional) + * @param quoteChain Filter by quote asset blockchain `legacyId` (e.g. + * `ETH`, `BASECHAIN_ETH`, `SOL`). Matches both concrete-asset + * rows and `*` rows on that chain. (optional) + * @param baseRail Filter by base asset transfer rail. (optional) + * @param quoteRail Filter by quote asset transfer rail. (optional) + * @param side Filter by trading side. `BUY` or `SELL` also matches rows + * whose side is `BOTH`; `BOTH` matches rows of any side. (optional) + * @param tradeClass Filter by trade class. (optional) + * @param providerId Filter by provider ID. Repeat the parameter to match any of several + * providers, up to 50. (optional + * @param accountId Filter by connected account ID. Repeat the parameter to match any of several + * accounts, up to 50. (optional + * @param prefunded Filter by whether the pair requires prefunding. (optional) + * @param min An order-size filter, not a bound on the result. Only returns pairs whose own + * `min` field (the smallest base-asset amount the pair accepts) is at most this + * value, i.e. pairs that can serve an order of this size. For example, + * `min=10` returns pairs with a `min` of 10 or less. (optional) + * @param max An order-size filter, not a bound on the result. Only returns pairs whose own + * `max` field (the largest base-asset amount the pair accepts) is at least this + * value. For example, `max=1000` returns pairs with a `max` of + * 1000 or more. (optional) + * @param pageSize Page size for pagination. (optional, default to 100) + * @param pageCursor Page cursor for pagination. (optional) + * @return CompletableFuture<ApiResponse<TradingPairsListPage>>, which completes + * exceptionally with an {@link ApiException} if the API call fails + */ + public CompletableFuture> getTradingPairs( + String baseAsset, + String quoteAsset, + String baseChain, + String quoteChain, + TransferRail baseRail, + TransferRail quoteRail, + TradingPairSide side, + TradeClass tradeClass, + List providerId, + List accountId, + Boolean prefunded, + String min, + String max, + Integer pageSize, + String pageCursor) { + try { + HttpRequest.Builder localVarRequestBuilder = + getTradingPairsRequestBuilder( + baseAsset, + quoteAsset, + baseChain, + quoteChain, + baseRail, + quoteRail, + side, + tradeClass, + providerId, + accountId, + prefunded, + min, + max, + pageSize, + pageCursor); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + // Ahead of the status check, which fails the future: the lifecycle + // header + // is present on allowed error responses too. + LifecycleWarning.warn( + localVarResponse.headers(), + "getTradingPairs", + localVarResponse.statusCode()); + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("getTradingPairs", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + TradingPairsListPage>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getTradingPairsRequestBuilder( + String baseAsset, + String quoteAsset, + String baseChain, + String quoteChain, + TransferRail baseRail, + TransferRail quoteRail, + TradingPairSide side, + TradeClass tradeClass, + List providerId, + List accountId, + Boolean prefunded, + String min, + String max, + Integer pageSize, + String pageCursor) + throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/trading/pairs"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "baseAsset"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("baseAsset", baseAsset)); + localVarQueryParameterBaseName = "quoteAsset"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("quoteAsset", quoteAsset)); + localVarQueryParameterBaseName = "baseChain"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("baseChain", baseChain)); + localVarQueryParameterBaseName = "quoteChain"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("quoteChain", quoteChain)); + localVarQueryParameterBaseName = "baseRail"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("baseRail", baseRail)); + localVarQueryParameterBaseName = "quoteRail"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("quoteRail", quoteRail)); + localVarQueryParameterBaseName = "side"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("side", side)); + localVarQueryParameterBaseName = "tradeClass"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("tradeClass", tradeClass)); + localVarQueryParameterBaseName = "providerId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "providerId", providerId)); + localVarQueryParameterBaseName = "accountId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "accountId", accountId)); + localVarQueryParameterBaseName = "prefunded"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("prefunded", prefunded)); + localVarQueryParameterBaseName = "min"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("min", min)); + localVarQueryParameterBaseName = "max"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("max", max)); + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } /** * Get trading provider by ID Retrieve a single provider by ID. **Endpoint Permission:** Owner, * Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about diff --git a/src/main/java/com/fireblocks/sdk/api/UtxoManagementBetaApi.java b/src/main/java/com/fireblocks/sdk/api/UtxoManagementApi.java similarity index 97% rename from src/main/java/com/fireblocks/sdk/api/UtxoManagementBetaApi.java rename to src/main/java/com/fireblocks/sdk/api/UtxoManagementApi.java index d57dfcb3..d080541c 100644 --- a/src/main/java/com/fireblocks/sdk/api/UtxoManagementBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/UtxoManagementApi.java @@ -46,7 +46,7 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") -public class UtxoManagementBetaApi { +public class UtxoManagementApi { private final HttpClient memberVarHttpClient; private final ObjectMapper memberVarObjectMapper; private final String memberVarBaseUri; @@ -55,11 +55,11 @@ public class UtxoManagementBetaApi { private final Consumer> memberVarResponseInterceptor; private final Consumer> memberVarAsyncResponseInterceptor; - public UtxoManagementBetaApi() { + public UtxoManagementApi() { this(new ApiClient()); } - public UtxoManagementBetaApi(ApiClient apiClient) { + public UtxoManagementApi(ApiClient apiClient) { memberVarHttpClient = apiClient.getHttpClient(); memberVarObjectMapper = apiClient.getObjectMapper(); memberVarBaseUri = apiClient.getBaseUri(); @@ -110,8 +110,8 @@ private String formatExceptionMessage(String operationId, int statusCode, String * effective strategy after runtime resolution. `ADAPTIVE` is the recommended * strategy. When no row is stored (source `DEFAULT`), `effective` is * `ADAPTIVE` if adaptive selection is serving for this workspace, otherwise - * `ASC`. **Note:** These endpoints are currently in beta and might be subject to - * changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + * `ASC`. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, + * Viewer. * * @return CompletableFuture<ApiResponse<UtxoSelectionConfigResponse>>, which * completes exceptionally with an {@link ApiException} if the API call fails @@ -191,8 +191,8 @@ private HttpRequest.Builder getUtxoSelectionConfigRequestBuilder() throws ApiExc /** * List unspent outputs (UTXOs) Returns a paginated list of unspent transaction outputs (UTXOs) * for a UTXO-based asset in a vault account, with optional filters for labels, statuses, - * amounts, and more. **Note:** These endpoints are currently in beta and might be subject to - * changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + * amounts, and more. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, + * Viewer. * * @param vaultAccountId The ID of the vault account (required) * @param assetId The ID of the asset (required) @@ -385,8 +385,8 @@ private HttpRequest.Builder getUtxosRequestBuilder( * `ADAPTIVE` is the recommended strategy. When no row is stored at this scope and * none is inherited from the workspace (source `DEFAULT`), `effective` is * `ADAPTIVE` if adaptive selection is serving for this scope, otherwise - * `ASC`. **Note:** These endpoints are currently in beta and might be subject to - * changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + * `ASC`. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, + * Viewer. * * @param vaultAccountId The ID of the vault account. (required) * @param assetId The ID of the asset (required) @@ -488,9 +488,8 @@ private HttpRequest.Builder getVaultAssetUtxoSelectionConfigRequestBuilder( * spent, or removed, and can no longer be labelled. A UTXO removed within the last hour is * reported as `NOT_FOUND` with `utxoStatus: REMOVED`; if it does not * reappear, it becomes `NOT_LABELLABLE` after about an hour. A `400` - * without `failures` means the request itself is malformed. **Note:** These endpoints - * are currently in beta and might be subject to changes. Endpoint Permission: Admin, - * Non-Signing Admin, Signer, Approver, Editor. + * without `failures` means the request itself is malformed. Endpoint Permission: + * Admin, Non-Signing Admin, Signer, Approver, Editor. * * @param attachDetachUtxoLabelsRequest (required) * @param vaultAccountId The ID of the vault account (required) @@ -604,8 +603,7 @@ private HttpRequest.Builder updateUtxoLabelsRequestBuilder( } /** * Upsert UTXO selection config Creates or updates the workspace-level UTXO selection strategy. - * `ADAPTIVE` is recommended. **Note:** These endpoints are currently in beta and - * might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin. + * `ADAPTIVE` is recommended. Endpoint Permission: Admin, Non-Signing Admin. * * @param upsertUtxoSelectionConfigRequest (required) * @param idempotencyKey A unique identifier for the request. If the request is sent multiple @@ -710,9 +708,8 @@ private HttpRequest.Builder upsertUtxoSelectionConfigRequestBuilder( } /** * Upsert vault and asset UTXO selection config Creates or updates the UTXO selection strategy - * for this vault account and asset. `ADAPTIVE` is recommended. **Note:** These - * endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, - * Non-Signing Admin. + * for this vault account and asset. `ADAPTIVE` is recommended. Endpoint Permission: + * Admin, Non-Signing Admin. * * @param upsertUtxoSelectionConfigRequest (required) * @param vaultAccountId The ID of the vault account. (required) diff --git a/src/main/java/com/fireblocks/sdk/api/VaultsApi.java b/src/main/java/com/fireblocks/sdk/api/VaultsApi.java index 5e90f9f7..6cf9736f 100644 --- a/src/main/java/com/fireblocks/sdk/api/VaultsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/VaultsApi.java @@ -1744,19 +1744,17 @@ private HttpRequest.Builder getMaxBipIndexUsedRequestBuilder( * transaction will be signed by an automated co-signer server or on a mobile device. * (optional) * @param includeAllLabels Only include UTXOs that have ALL of these labels (AND logic). - * Requires the UTXO Manager. This feature is currently in beta and might be subject to - * changes. (optional + * Requires the UTXO Manager. (optional * @param includeAnyLabels Only include UTXOs that have ANY of these labels (OR logic). Requires - * the UTXO Manager. This feature is currently in beta and might be subject to changes. - * (optional + * the UTXO Manager. (optional * @param excludeAnyLabels Exclude UTXOs that have ANY of these labels. Requires the UTXO - * Manager. This feature is currently in beta and might be subject to changes. (optional - * @param address Only include UTXOs from this specific address. Requires the UTXO Manager. This - * feature is currently in beta and might be subject to changes. (optional) + * Manager. (optional + * @param address Only include UTXOs from this specific address. Requires the UTXO Manager. + * (optional) * @param minAmount Minimum UTXO amount in the asset's base unit. Requires the UTXO Manager. - * This feature is currently in beta and might be subject to changes. (optional) + * (optional) * @param maxAmount Maximum UTXO amount in the asset's base unit. Requires the UTXO Manager. - * This feature is currently in beta and might be subject to changes. (optional) + * (optional) * @return CompletableFuture<ApiResponse<GetMaxSpendableAmountResponse>>, which * completes exceptionally with an {@link ApiException} if the API call fails */ diff --git a/src/main/java/com/fireblocks/sdk/model/FeeInfo.java b/src/main/java/com/fireblocks/sdk/model/FeeInfo.java index 669f8165..8fdeada8 100644 --- a/src/main/java/com/fireblocks/sdk/model/FeeInfo.java +++ b/src/main/java/com/fireblocks/sdk/model/FeeInfo.java @@ -33,7 +33,9 @@ FeeInfo.JSON_PROPERTY_RELAY_TYPE, FeeInfo.JSON_PROPERTY_RELAY_ID, FeeInfo.JSON_PROPERTY_RELAY_NAME, - FeeInfo.JSON_PROPERTY_FEE_U_S_D + FeeInfo.JSON_PROPERTY_FEE_U_S_D, + FeeInfo.JSON_PROPERTY_SENDER, + FeeInfo.JSON_PROPERTY_RECIPIENT }) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -102,6 +104,12 @@ public static RelayTypeEnum fromValue(String value) { public static final String JSON_PROPERTY_FEE_U_S_D = "feeUSD"; @jakarta.annotation.Nullable private String feeUSD; + public static final String JSON_PROPERTY_SENDER = "sender"; + @jakarta.annotation.Nullable private RoleFeeInfo sender; + + public static final String JSON_PROPERTY_RECIPIENT = "recipient"; + @jakarta.annotation.Nullable private RoleFeeInfo recipient; + public FeeInfo() {} public FeeInfo networkFee(@jakarta.annotation.Nullable String networkFee) { @@ -335,6 +343,52 @@ public void setFeeUSD(@jakarta.annotation.Nullable String feeUSD) { this.feeUSD = feeUSD; } + public FeeInfo sender(@jakarta.annotation.Nullable RoleFeeInfo sender) { + this.sender = sender; + return this; + } + + /** + * Get sender + * + * @return sender + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SENDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RoleFeeInfo getSender() { + return sender; + } + + @JsonProperty(JSON_PROPERTY_SENDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSender(@jakarta.annotation.Nullable RoleFeeInfo sender) { + this.sender = sender; + } + + public FeeInfo recipient(@jakarta.annotation.Nullable RoleFeeInfo recipient) { + this.recipient = recipient; + return this; + } + + /** + * Get recipient + * + * @return recipient + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECIPIENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RoleFeeInfo getRecipient() { + return recipient; + } + + @JsonProperty(JSON_PROPERTY_RECIPIENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRecipient(@jakarta.annotation.Nullable RoleFeeInfo recipient) { + this.recipient = recipient; + } + /** Return true if this FeeInfo object is equal to o. */ @Override public boolean equals(Object o) { @@ -354,7 +408,9 @@ public boolean equals(Object o) { && Objects.equals(this.relayType, feeInfo.relayType) && Objects.equals(this.relayId, feeInfo.relayId) && Objects.equals(this.relayName, feeInfo.relayName) - && Objects.equals(this.feeUSD, feeInfo.feeUSD); + && Objects.equals(this.feeUSD, feeInfo.feeUSD) + && Objects.equals(this.sender, feeInfo.sender) + && Objects.equals(this.recipient, feeInfo.recipient); } @Override @@ -369,7 +425,9 @@ public int hashCode() { relayType, relayId, relayName, - feeUSD); + feeUSD, + sender, + recipient); } @Override @@ -386,6 +444,8 @@ public String toString() { sb.append(" relayId: ").append(toIndentedString(relayId)).append("\n"); sb.append(" relayName: ").append(toIndentedString(relayName)).append("\n"); sb.append(" feeUSD: ").append(toIndentedString(feeUSD)).append("\n"); + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" recipient: ").append(toIndentedString(recipient)).append("\n"); sb.append("}"); return sb.toString(); } @@ -533,6 +593,16 @@ public String toUrlQueryString(String prefix) { ApiClient.urlEncode(ApiClient.valueToString(getFeeUSD())))); } + // add `sender` to the URL query string + if (getSender() != null) { + joiner.add(getSender().toUrlQueryString(prefix + "sender" + suffix)); + } + + // add `recipient` to the URL query string + if (getRecipient() != null) { + joiner.add(getRecipient().toUrlQueryString(prefix + "recipient" + suffix)); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/RoleFeeInfo.java b/src/main/java/com/fireblocks/sdk/model/RoleFeeInfo.java new file mode 100644 index 00000000..a927680c --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/RoleFeeInfo.java @@ -0,0 +1,203 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** + * **Early Access.** What the transfer cost the Fireblocks wallet of one role (`sender` or + * `recipient`). Currently reported for TON only. Unlike `networkFee`, which + * describes the transfer as a whole, these amounts are always the cost to the wallet of that role, + * so the two can differ, for example for a `recipient`. + */ +@JsonPropertyOrder({ + RoleFeeInfo.JSON_PROPERTY_FEES_DEDUCTED, + RoleFeeInfo.JSON_PROPERTY_VALUE_CREDITED +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class RoleFeeInfo { + public static final String JSON_PROPERTY_FEES_DEDUCTED = "feesDeducted"; + @jakarta.annotation.Nullable private String feesDeducted; + + public static final String JSON_PROPERTY_VALUE_CREDITED = "valueCredited"; + @jakarta.annotation.Nullable private String valueCredited; + + public RoleFeeInfo() {} + + public RoleFeeInfo feesDeducted(@jakarta.annotation.Nullable String feesDeducted) { + this.feesDeducted = feesDeducted; + return this; + } + + /** + * The total amount of TON deducted from the wallet because of the transfer, in TON, as a + * decimal string with nine decimals (like `networkFee`). - `sender` of a + * native TON transfer: the wallet's own fees plus the forwarding fees of the messages it + * sent. - `sender` of a Jetton (token) transfer: what the wallet actually lost. This + * is its own fees plus the TON it attached to cover the token wallets, minus any excess + * returned to it. If the excess is returned to the sender, the fee of receiving it is included. + * If the excess goes to any other wallet, the full attached TON is counted. When one external + * message carries several Jetton transfers (a multi-send), the loss is that of the whole + * message: every excess that came back to the wallet is subtracted. - `recipient` of + * a native TON transfer: the fees of the transaction that received the transfer, including gas. + * - `recipient` of a Jetton transfer: the fees of the notification transaction, + * usually a few nanoTON of storage fees. `\"0.000000000\"` when the + * transfer carried no forward amount, because the wallet then has no transaction of its own and + * pays nothing. + * + * @return feesDeducted + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEES_DEDUCTED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFeesDeducted() { + return feesDeducted; + } + + @JsonProperty(JSON_PROPERTY_FEES_DEDUCTED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFeesDeducted(@jakarta.annotation.Nullable String feesDeducted) { + this.feesDeducted = feesDeducted; + } + + public RoleFeeInfo valueCredited(@jakarta.annotation.Nullable String valueCredited) { + this.valueCredited = valueCredited; + return this; + } + + /** + * The gross amount of TON that arrived at the wallet together with the token notification (the + * forward amount), in TON, as a decimal string with nine decimals. Set only for the + * `recipient` of a Jetton (token) transfer, and omitted when the amount is zero or + * the notification bounced. `valueCredited` is not subtracted from + * `feesDeducted`. The net change of the wallet's TON balance caused by the + * transfer is `valueCredited` minus `feesDeducted`. + * + * @return valueCredited + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE_CREDITED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getValueCredited() { + return valueCredited; + } + + @JsonProperty(JSON_PROPERTY_VALUE_CREDITED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValueCredited(@jakarta.annotation.Nullable String valueCredited) { + this.valueCredited = valueCredited; + } + + /** Return true if this RoleFeeInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RoleFeeInfo roleFeeInfo = (RoleFeeInfo) o; + return Objects.equals(this.feesDeducted, roleFeeInfo.feesDeducted) + && Objects.equals(this.valueCredited, roleFeeInfo.valueCredited); + } + + @Override + public int hashCode() { + return Objects.hash(feesDeducted, valueCredited); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RoleFeeInfo {\n"); + sb.append(" feesDeducted: ").append(toIndentedString(feesDeducted)).append("\n"); + sb.append(" valueCredited: ").append(toIndentedString(valueCredited)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `feesDeducted` to the URL query string + if (getFeesDeducted() != null) { + joiner.add( + String.format( + "%sfeesDeducted%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getFeesDeducted())))); + } + + // add `valueCredited` to the URL query string + if (getValueCredited() != null) { + joiner.add( + String.format( + "%svalueCredited%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getValueCredited())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TradeClass.java b/src/main/java/com/fireblocks/sdk/model/TradeClass.java new file mode 100644 index 00000000..92de623a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TradeClass.java @@ -0,0 +1,96 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The class of trade a pair represents, derived from the asset class of each leg, the chains those + * assets settle on, where the trade executes, and the trading side: * **SWAP_DEFI** - Exchange + * between two crypto assets on the same chain, executed on-chain * **SWAP_CEFI** - Exchange between + * two crypto assets on the same chain, executed through a provider account * **BRIDGE_DEFI** - + * Exchange between two crypto assets on different chains, executed on-chain * **BRIDGE_CEFI** - + * Exchange between two crypto assets on different chains, executed through a provider account * + * **INTERNAL_LEDGER** - Exchange between two crypto assets settled on a provider's internal + * ledger, within a single provider account. Not split by chain, because neither leg settles + * on-chain while the trade executes * **ON_RAMP** - Buying a crypto asset with a fiat asset * + * **OFF_RAMP** - Selling a crypto asset for a fiat asset * **FX** - Exchange between two fiat + * assets * **OTC** - A pair quoted by an OTC desk: firm, short-lived RFQ commitments against a + * dealer, executed on credit rather than against an order book. Takes precedence over the + * asset-class values, so an OTC desk selling USDC for USD is `OTC`, not + * `OFF_RAMP` * **UNKNOWN** - The class could not be resolved, e.g. when the chain of an + * asset could not be determined. Callers should not route on a pair with this class + */ +public enum TradeClass { + SWAP_DEFI("SWAP_DEFI"), + + SWAP_CEFI("SWAP_CEFI"), + + BRIDGE_DEFI("BRIDGE_DEFI"), + + BRIDGE_CEFI("BRIDGE_CEFI"), + + INTERNAL_LEDGER("INTERNAL_LEDGER"), + + ON_RAMP("ON_RAMP"), + + OFF_RAMP("OFF_RAMP"), + + FX("FX"), + + OTC("OTC"), + + UNKNOWN("UNKNOWN"); + + private String value; + + TradeClass(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradeClass fromValue(String value) { + for (TradeClass b : TradeClass.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TradingPair.java b/src/main/java/com/fireblocks/sdk/model/TradingPair.java new file mode 100644 index 00000000..fb87475f --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TradingPair.java @@ -0,0 +1,654 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** + * A supported base/quote asset pair for a provider, optionally scoped to a specific connected + * account, for a given trading side (BUY/SELL, or `BOTH`), with the transfer rails and + * amount limits that apply to it. `baseAssetId` / `quoteAssetId` may be the + * wildcard `*`, meaning any asset on `baseChain` / `quoteChain`; such + * a row is not expanded. + */ +@JsonPropertyOrder({ + TradingPair.JSON_PROPERTY_PROVIDER_ID, + TradingPair.JSON_PROPERTY_ACCOUNT_ID, + TradingPair.JSON_PROPERTY_BASE_ASSET_ID, + TradingPair.JSON_PROPERTY_QUOTE_ASSET_ID, + TradingPair.JSON_PROPERTY_BASE_CHAIN, + TradingPair.JSON_PROPERTY_QUOTE_CHAIN, + TradingPair.JSON_PROPERTY_SIDE, + TradingPair.JSON_PROPERTY_TRADE_CLASS, + TradingPair.JSON_PROPERTY_BASE_ASSET_RAIL, + TradingPair.JSON_PROPERTY_QUOTE_ASSET_RAIL, + TradingPair.JSON_PROPERTY_PREFUNDED, + TradingPair.JSON_PROPERTY_MIN, + TradingPair.JSON_PROPERTY_MAX +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class TradingPair { + public static final String JSON_PROPERTY_PROVIDER_ID = "providerId"; + @jakarta.annotation.Nonnull private String providerId; + + public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; + @jakarta.annotation.Nullable private String accountId; + + public static final String JSON_PROPERTY_BASE_ASSET_ID = "baseAssetId"; + @jakarta.annotation.Nonnull private String baseAssetId; + + public static final String JSON_PROPERTY_QUOTE_ASSET_ID = "quoteAssetId"; + @jakarta.annotation.Nonnull private String quoteAssetId; + + public static final String JSON_PROPERTY_BASE_CHAIN = "baseChain"; + @jakarta.annotation.Nullable private String baseChain; + + public static final String JSON_PROPERTY_QUOTE_CHAIN = "quoteChain"; + @jakarta.annotation.Nullable private String quoteChain; + + public static final String JSON_PROPERTY_SIDE = "side"; + @jakarta.annotation.Nonnull private TradingPairSide side; + + public static final String JSON_PROPERTY_TRADE_CLASS = "tradeClass"; + @jakarta.annotation.Nonnull private TradeClass tradeClass; + + public static final String JSON_PROPERTY_BASE_ASSET_RAIL = "baseAssetRail"; + @jakarta.annotation.Nullable private TransferRail baseAssetRail; + + public static final String JSON_PROPERTY_QUOTE_ASSET_RAIL = "quoteAssetRail"; + @jakarta.annotation.Nullable private TransferRail quoteAssetRail; + + public static final String JSON_PROPERTY_PREFUNDED = "prefunded"; + @jakarta.annotation.Nullable private Boolean prefunded; + + public static final String JSON_PROPERTY_MIN = "min"; + @jakarta.annotation.Nullable private String min; + + public static final String JSON_PROPERTY_MAX = "max"; + @jakarta.annotation.Nullable private String max; + + public TradingPair() {} + + @JsonCreator + public TradingPair( + @JsonProperty(value = JSON_PROPERTY_PROVIDER_ID, required = true) String providerId, + @JsonProperty(value = JSON_PROPERTY_BASE_ASSET_ID, required = true) String baseAssetId, + @JsonProperty(value = JSON_PROPERTY_QUOTE_ASSET_ID, required = true) + String quoteAssetId, + @JsonProperty(value = JSON_PROPERTY_SIDE, required = true) TradingPairSide side, + @JsonProperty(value = JSON_PROPERTY_TRADE_CLASS, required = true) + TradeClass tradeClass) { + this.providerId = providerId; + this.baseAssetId = baseAssetId; + this.quoteAssetId = quoteAssetId; + this.side = side; + this.tradeClass = tradeClass; + } + + public TradingPair providerId(@jakarta.annotation.Nonnull String providerId) { + this.providerId = providerId; + return this; + } + + /** + * The provider that supports this pair. + * + * @return providerId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProviderId() { + return providerId; + } + + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProviderId(@jakarta.annotation.Nonnull String providerId) { + this.providerId = providerId; + } + + public TradingPair accountId(@jakarta.annotation.Nullable String accountId) { + this.accountId = accountId; + return this; + } + + /** + * The connected account the pair is scoped to. Absent for direct-access providers, and for + * provider-level pairs that describe what a provider supports before any account is connected. + * Its absence therefore does not imply the provider is direct-access. + * + * @return accountId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAccountId() { + return accountId; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountId(@jakarta.annotation.Nullable String accountId) { + this.accountId = accountId; + } + + public TradingPair baseAssetId(@jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + return this; + } + + /** + * Fireblocks asset ID of the base asset, or `*` for any asset on + * `baseChain`. A `*` value always comes with `baseChain` set. + * + * @return baseAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAssetId() { + return baseAssetId; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAssetId(@jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + } + + public TradingPair quoteAssetId(@jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + return this; + } + + /** + * Fireblocks asset ID of the quote asset, or `*` for any asset on + * `quoteChain`. A `*` value always comes with `quoteChain` set. + * + * @return quoteAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuoteAssetId() { + return quoteAssetId; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuoteAssetId(@jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + } + + public TradingPair baseChain(@jakarta.annotation.Nullable String baseChain) { + this.baseChain = baseChain; + return this; + } + + /** + * Blockchain `legacyId` of the base asset (e.g. `ETH`, + * `BASECHAIN_ETH`, `ETH-AETH`, `SOL`). Set for leaf crypto + * assets; absent for fiat and virtual assets. + * + * @return baseChain + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BASE_CHAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBaseChain() { + return baseChain; + } + + @JsonProperty(JSON_PROPERTY_BASE_CHAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBaseChain(@jakarta.annotation.Nullable String baseChain) { + this.baseChain = baseChain; + } + + public TradingPair quoteChain(@jakarta.annotation.Nullable String quoteChain) { + this.quoteChain = quoteChain; + return this; + } + + /** + * Blockchain `legacyId` of the quote asset (e.g. `ETH`, + * `BASECHAIN_ETH`, `ETH-AETH`, `SOL`). Set for leaf crypto + * assets; absent for fiat and virtual assets. + * + * @return quoteChain + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUOTE_CHAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getQuoteChain() { + return quoteChain; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_CHAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setQuoteChain(@jakarta.annotation.Nullable String quoteChain) { + this.quoteChain = quoteChain; + } + + public TradingPair side(@jakarta.annotation.Nonnull TradingPairSide side) { + this.side = side; + return this; + } + + /** + * Get side + * + * @return side + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TradingPairSide getSide() { + return side; + } + + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSide(@jakarta.annotation.Nonnull TradingPairSide side) { + this.side = side; + } + + public TradingPair tradeClass(@jakarta.annotation.Nonnull TradeClass tradeClass) { + this.tradeClass = tradeClass; + return this; + } + + /** + * Get tradeClass + * + * @return tradeClass + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRADE_CLASS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TradeClass getTradeClass() { + return tradeClass; + } + + @JsonProperty(JSON_PROPERTY_TRADE_CLASS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTradeClass(@jakarta.annotation.Nonnull TradeClass tradeClass) { + this.tradeClass = tradeClass; + } + + public TradingPair baseAssetRail(@jakarta.annotation.Nullable TransferRail baseAssetRail) { + this.baseAssetRail = baseAssetRail; + return this; + } + + /** + * Get baseAssetRail + * + * @return baseAssetRail + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BASE_ASSET_RAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransferRail getBaseAssetRail() { + return baseAssetRail; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_RAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBaseAssetRail(@jakarta.annotation.Nullable TransferRail baseAssetRail) { + this.baseAssetRail = baseAssetRail; + } + + public TradingPair quoteAssetRail(@jakarta.annotation.Nullable TransferRail quoteAssetRail) { + this.quoteAssetRail = quoteAssetRail; + return this; + } + + /** + * Get quoteAssetRail + * + * @return quoteAssetRail + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_RAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransferRail getQuoteAssetRail() { + return quoteAssetRail; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_RAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setQuoteAssetRail(@jakarta.annotation.Nullable TransferRail quoteAssetRail) { + this.quoteAssetRail = quoteAssetRail; + } + + public TradingPair prefunded(@jakarta.annotation.Nullable Boolean prefunded) { + this.prefunded = prefunded; + return this; + } + + /** + * Whether the provider requires the funds to be prefunded on the provider account before the + * order can execute. + * + * @return prefunded + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFUNDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getPrefunded() { + return prefunded; + } + + @JsonProperty(JSON_PROPERTY_PREFUNDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrefunded(@jakarta.annotation.Nullable Boolean prefunded) { + this.prefunded = prefunded; + } + + public TradingPair min(@jakarta.annotation.Nullable String min) { + this.min = min; + return this; + } + + /** + * Minimum amount of the base asset for this pair/side, as a decimal string. + * + * @return min + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMin() { + return min; + } + + @JsonProperty(JSON_PROPERTY_MIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMin(@jakarta.annotation.Nullable String min) { + this.min = min; + } + + public TradingPair max(@jakarta.annotation.Nullable String max) { + this.max = max; + return this; + } + + /** + * Maximum amount of the base asset for this pair/side, as a decimal string. + * + * @return max + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMax() { + return max; + } + + @JsonProperty(JSON_PROPERTY_MAX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMax(@jakarta.annotation.Nullable String max) { + this.max = max; + } + + /** Return true if this TradingPair object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TradingPair tradingPair = (TradingPair) o; + return Objects.equals(this.providerId, tradingPair.providerId) + && Objects.equals(this.accountId, tradingPair.accountId) + && Objects.equals(this.baseAssetId, tradingPair.baseAssetId) + && Objects.equals(this.quoteAssetId, tradingPair.quoteAssetId) + && Objects.equals(this.baseChain, tradingPair.baseChain) + && Objects.equals(this.quoteChain, tradingPair.quoteChain) + && Objects.equals(this.side, tradingPair.side) + && Objects.equals(this.tradeClass, tradingPair.tradeClass) + && Objects.equals(this.baseAssetRail, tradingPair.baseAssetRail) + && Objects.equals(this.quoteAssetRail, tradingPair.quoteAssetRail) + && Objects.equals(this.prefunded, tradingPair.prefunded) + && Objects.equals(this.min, tradingPair.min) + && Objects.equals(this.max, tradingPair.max); + } + + @Override + public int hashCode() { + return Objects.hash( + providerId, + accountId, + baseAssetId, + quoteAssetId, + baseChain, + quoteChain, + side, + tradeClass, + baseAssetRail, + quoteAssetRail, + prefunded, + min, + max); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TradingPair {\n"); + sb.append(" providerId: ").append(toIndentedString(providerId)).append("\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" baseAssetId: ").append(toIndentedString(baseAssetId)).append("\n"); + sb.append(" quoteAssetId: ").append(toIndentedString(quoteAssetId)).append("\n"); + sb.append(" baseChain: ").append(toIndentedString(baseChain)).append("\n"); + sb.append(" quoteChain: ").append(toIndentedString(quoteChain)).append("\n"); + sb.append(" side: ").append(toIndentedString(side)).append("\n"); + sb.append(" tradeClass: ").append(toIndentedString(tradeClass)).append("\n"); + sb.append(" baseAssetRail: ").append(toIndentedString(baseAssetRail)).append("\n"); + sb.append(" quoteAssetRail: ").append(toIndentedString(quoteAssetRail)).append("\n"); + sb.append(" prefunded: ").append(toIndentedString(prefunded)).append("\n"); + sb.append(" min: ").append(toIndentedString(min)).append("\n"); + sb.append(" max: ").append(toIndentedString(max)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `providerId` to the URL query string + if (getProviderId() != null) { + joiner.add( + String.format( + "%sproviderId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getProviderId())))); + } + + // add `accountId` to the URL query string + if (getAccountId() != null) { + joiner.add( + String.format( + "%saccountId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAccountId())))); + } + + // add `baseAssetId` to the URL query string + if (getBaseAssetId() != null) { + joiner.add( + String.format( + "%sbaseAssetId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBaseAssetId())))); + } + + // add `quoteAssetId` to the URL query string + if (getQuoteAssetId() != null) { + joiner.add( + String.format( + "%squoteAssetId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getQuoteAssetId())))); + } + + // add `baseChain` to the URL query string + if (getBaseChain() != null) { + joiner.add( + String.format( + "%sbaseChain%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBaseChain())))); + } + + // add `quoteChain` to the URL query string + if (getQuoteChain() != null) { + joiner.add( + String.format( + "%squoteChain%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getQuoteChain())))); + } + + // add `side` to the URL query string + if (getSide() != null) { + joiner.add( + String.format( + "%sside%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSide())))); + } + + // add `tradeClass` to the URL query string + if (getTradeClass() != null) { + joiner.add( + String.format( + "%stradeClass%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getTradeClass())))); + } + + // add `baseAssetRail` to the URL query string + if (getBaseAssetRail() != null) { + joiner.add( + String.format( + "%sbaseAssetRail%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBaseAssetRail())))); + } + + // add `quoteAssetRail` to the URL query string + if (getQuoteAssetRail() != null) { + joiner.add( + String.format( + "%squoteAssetRail%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getQuoteAssetRail())))); + } + + // add `prefunded` to the URL query string + if (getPrefunded() != null) { + joiner.add( + String.format( + "%sprefunded%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getPrefunded())))); + } + + // add `min` to the URL query string + if (getMin() != null) { + joiner.add( + String.format( + "%smin%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getMin())))); + } + + // add `max` to the URL query string + if (getMax() != null) { + joiner.add( + String.format( + "%smax%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getMax())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TradingPairSide.java b/src/main/java/com/fireblocks/sdk/model/TradingPairSide.java new file mode 100644 index 00000000..1059f19a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TradingPairSide.java @@ -0,0 +1,69 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Side of a trading pair. Same as `Side`, plus `BOTH`, meaning the pair applies + * to both BUY and SELL. + */ +public enum TradingPairSide { + BUY("BUY"), + + SELL("SELL"), + + BOTH("BOTH"); + + private String value; + + TradingPairSide(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TradingPairSide fromValue(String value) { + for (TradingPairSide b : TradingPairSide.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TradingPairsListPage.java b/src/main/java/com/fireblocks/sdk/model/TradingPairsListPage.java new file mode 100644 index 00000000..9837070f --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TradingPairsListPage.java @@ -0,0 +1,250 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** TradingPairsListPage */ +@JsonPropertyOrder({ + TradingPairsListPage.JSON_PROPERTY_DATA, + TradingPairsListPage.JSON_PROPERTY_TOTAL, + TradingPairsListPage.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class TradingPairsListPage { + public static final String JSON_PROPERTY_DATA = "data"; + @jakarta.annotation.Nonnull private List data; + + public static final String JSON_PROPERTY_TOTAL = "total"; + @jakarta.annotation.Nullable private Integer total; + + public static final String JSON_PROPERTY_NEXT = "next"; + @jakarta.annotation.Nullable private String next; + + public TradingPairsListPage() {} + + @JsonCreator + public TradingPairsListPage( + @JsonProperty(value = JSON_PROPERTY_DATA, required = true) List data) { + this.data = data; + } + + public TradingPairsListPage data(@jakarta.annotation.Nonnull List data) { + this.data = data; + return this; + } + + public TradingPairsListPage addDataItem(TradingPair dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * List of trading pairs. + * + * @return data + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(@jakarta.annotation.Nonnull List data) { + this.data = data; + } + + public TradingPairsListPage total(@jakarta.annotation.Nullable Integer total) { + this.total = total; + return this; + } + + /** + * Total number of trading pairs matching the query. Best-effort count; may be absent when + * results are aggregated across multiple providers. + * + * @return total + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotal() { + return total; + } + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotal(@jakarta.annotation.Nullable Integer total) { + this.total = total; + } + + public TradingPairsListPage next(@jakarta.annotation.Nullable String next) { + this.next = next; + return this; + } + + /** + * A cursor for the next page of results, if available. + * + * @return next + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNext() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNext(@jakarta.annotation.Nullable String next) { + this.next = next; + } + + /** Return true if this TradingPairsListPage object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TradingPairsListPage tradingPairsListPage = (TradingPairsListPage) o; + return Objects.equals(this.data, tradingPairsListPage.data) + && Objects.equals(this.total, tradingPairsListPage.total) + && Objects.equals(this.next, tradingPairsListPage.next); + } + + @Override + public int hashCode() { + return Objects.hash(data, total, next); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TradingPairsListPage {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add( + getData() + .get(i) + .toUrlQueryString( + String.format( + "%sdata%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add( + String.format( + "%stotal%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getTotal())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add( + String.format( + "%snext%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java b/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java index 786a3ec6..ab79b211 100644 --- a/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java @@ -1946,7 +1946,74 @@ public TransactionResponse blockchainInfo(@jakarta.annotation.Nullable Object bl } /** - * A JSON used to store additional data that is blockchain-specific. + * A JSON used to store additional data that is blockchain-specific. **TON (Early Access).** For + * TON transfers the object contains: | Field | Description | | --- | --- | | + * `tonTransferType` | `NATIVE` for a TON transfer, `JETTON` for a + * token transfer. | | `hashes` | Hex hashes of the transfer: + * `externalIncoming`, and either `tonTransfer` (native) or + * `jettonTransfer` (Jetton). | | `messageContent` | The message body + * (comment) of the transfer, as a base64 string. | | `isFeeExcess` | `true` + * only on the transaction that records the excess TON returned by a Jetton transfer to one of + * your wallets other than the sender. That transaction is a plain native transfer to the + * wallet, its top-level `feeInfo` has only a `recipient` struct, like any + * regular recipient. Omitted otherwise. | | `feeBreakdowns` | The fee details of the + * wallets of your workspace in the transfer: one entry per wallet. Available when the feature + * is enabled for your workspace. The totals of each wallet are in the top-level + * `feeInfo` of the transaction, in its `sender` and `recipient` + * structs (`feesDeducted`, `valueCredited`). | All amounts inside + * `feeBreakdowns` are integer strings in **nanoTON** (1 TON = 1,000,000,000 + * nanoTON), unlike the top-level `feeInfo`, which is in TON. Each entry of + * `feeBreakdowns` contains: | Field | Description | | --- | --- | | `role` + * | `SENDER` or `RECIPIENT`: the role of the wallet in the transfer. | | + * `address` | The wallet, as `raw` and `userFriendly` addresses. + * | | `txHash` | The hash of the wallet's own on-chain transaction. Omitted for a + * Jetton `recipient` with no transaction of its own (see below). | | + * `feeBreakdown.totalOutMsgsForwardFees` | The sum of the forwarding fees of the + * messages sent by the wallet's transaction. | | `feeBreakdown.chainReported` | + * The fee components reported by the blockchain for the wallet's transaction: + * `totalFees`, `storageFees`, `gasFees`, `actionFees` + * and `forwardFees`, and, when applicable, `importFee`, + * `bounceFees` and `actionFine`. `totalFees` is the sum of + * `storageFees`, `importFee`, `gasFees`, `actionFees` + * and `bounceFees`. | | `feeBreakdown.fundingSpent` | The rest of the + * sender's loss beyond the fees in this entry: for a Jetton `sender`, the TON the + * wallet attached to fund the token wallets and did not get back; for a wallet that sends + * through a second transaction of its own (a Highload wallet), also the fees of that + * transaction. For the same wallet, `feeInfo.<role>.feesDeducted` = + * `totalFees` + `totalOutMsgsForwardFees` + `fundingSpent` + * (`fundingSpent` is 0 when absent), converted from nanoTON to TON. | A Jetton + * transfer sent without a forward amount sends the recipient no notification, so the recipient + * wallet has no transaction and pays nothing: its entry has no `txHash`, all its + * figures are `\"0\"` and `feeInfo.recipient.feesDeducted` is + * `\"0.000000000\"`. An amount that could not be established from on-chain + * data is reported as no entry and no struct in `feeInfo` for that role. Only the + * wallets that belong to the notified workspace appear in `feeBreakdowns`. A transfer + * between two wallets of your own workspace is a single transaction and carries an entry for + * each wallet (tell them apart by `role`), and the top-level `feeInfo` has + * both a `sender` and a `recipient` struct. `blockchainInfo` is + * kept to 2,048 characters. When a very long message pushes a TON transfer over that, the + * optional details are dropped to make it fit: `feeBreakdowns` go first when the + * message fits without them, `messageContent` goes when the breakdowns fit without + * it, and both go when neither does. The `hashes`, `tonTransferType`, + * `isFeeExcess` and the top-level `feeInfo` are always kept. Example of a + * Jetton transfer sent from one of your wallets (addresses and hashes are placeholders): + * ```json { \"tonTransferType\": \"JETTON\", + * \"hashes\": { \"externalIncoming\": + * \"0000000000000000000000000000000000000000000000000000000000000001\", + * \"jettonTransfer\": + * \"0000000000000000000000000000000000000000000000000000000000000002\" }, + * \"messageContent\": \"te6cckEBAQEAAgAAAEysuc0=\", + * \"feeBreakdowns\": [ { \"address\": { \"raw\": + * \"0:0000000000000000000000000000000000000000000000000000000000000003\", + * \"userFriendly\": \"0QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" }, + * \"txHash\": + * \"0000000000000000000000000000000000000000000000000000000000000004\", + * \"feeBreakdown\": { \"totalOutMsgsForwardFees\": \"86046\", + * \"chainReported\": { \"totalFees\": \"475291\", + * \"storageFees\": \"1\", \"gasFees\": \"220534\", + * \"actionFees\": \"43022\", \"forwardFees\": + * \"129068\", \"importFee\": \"211734\" }, + * \"fundingSpent\": \"17125078\" } } ] } ``` * * @return blockchainInfo */ diff --git a/src/main/java/com/fireblocks/sdk/model/UtxoInputSelection.java b/src/main/java/com/fireblocks/sdk/model/UtxoInputSelection.java index 8123a5a2..6b5505a5 100644 --- a/src/main/java/com/fireblocks/sdk/model/UtxoInputSelection.java +++ b/src/main/java/com/fireblocks/sdk/model/UtxoInputSelection.java @@ -22,10 +22,7 @@ import java.util.Objects; import java.util.StringJoiner; -/** - * Explicitly control which UTXOs to include or exclude. This feature is currently in beta and might - * be subject to changes. - */ +/** Explicitly control which UTXOs to include or exclude. */ @JsonPropertyOrder({ UtxoInputSelection.JSON_PROPERTY_INPUTS_TO_SPEND, UtxoInputSelection.JSON_PROPERTY_INPUTS_TO_EXCLUDE, diff --git a/src/main/java/com/fireblocks/sdk/model/UtxoSelectionFilters.java b/src/main/java/com/fireblocks/sdk/model/UtxoSelectionFilters.java index 0dd094f8..191fe955 100644 --- a/src/main/java/com/fireblocks/sdk/model/UtxoSelectionFilters.java +++ b/src/main/java/com/fireblocks/sdk/model/UtxoSelectionFilters.java @@ -22,10 +22,7 @@ import java.util.Objects; import java.util.StringJoiner; -/** - * Narrow the UTXO candidate pool. All specified filters are AND-ed together. This feature is - * currently in beta and might be subject to changes. - */ +/** Narrow the UTXO candidate pool. All specified filters are AND-ed together. */ @JsonPropertyOrder({ UtxoSelectionFilters.JSON_PROPERTY_INCLUDE_ALL_LABELS, UtxoSelectionFilters.JSON_PROPERTY_INCLUDE_ANY_LABELS, diff --git a/src/main/java/com/fireblocks/sdk/model/UtxoSelectionParams.java b/src/main/java/com/fireblocks/sdk/model/UtxoSelectionParams.java index 5bb7f2bd..12cb4509 100644 --- a/src/main/java/com/fireblocks/sdk/model/UtxoSelectionParams.java +++ b/src/main/java/com/fireblocks/sdk/model/UtxoSelectionParams.java @@ -24,8 +24,7 @@ /** * For UTXO-based blockchains only. Controls which UTXOs are used for automatic selection. Cannot be - * used together with extraParameters.inputsSelection. This feature is currently in beta and might - * be subject to changes. + * used together with extraParameters.inputsSelection. */ @JsonPropertyOrder({ UtxoSelectionParams.JSON_PROPERTY_SELECTION_STRATEGY, diff --git a/src/test/java/com/fireblocks/sdk/FireblocksTest.java b/src/test/java/com/fireblocks/sdk/FireblocksTest.java index 7b072aab..1b6bf785 100644 --- a/src/test/java/com/fireblocks/sdk/FireblocksTest.java +++ b/src/test/java/com/fireblocks/sdk/FireblocksTest.java @@ -760,11 +760,11 @@ public void testGetUsersApi() { } @Test - public void testGetUtxoManagementBetaApi() { + public void testGetUtxoManagementApi() { setupFireblocks(true, null, null); - UtxoManagementBetaApi utxoManagementBeta = fireblocks.utxoManagementBeta(); - Assert.assertNotNull(utxoManagementBeta); - Assert.assertSame(utxoManagementBeta, fireblocks.utxoManagementBeta()); + UtxoManagementApi utxoManagement = fireblocks.utxoManagement(); + Assert.assertNotNull(utxoManagement); + Assert.assertSame(utxoManagement, fireblocks.utxoManagement()); } @Test diff --git a/src/test/java/com/fireblocks/sdk/api/TradingApiTest.java b/src/test/java/com/fireblocks/sdk/api/TradingApiTest.java index 4f563174..a77c0cbf 100644 --- a/src/test/java/com/fireblocks/sdk/api/TradingApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/TradingApiTest.java @@ -27,7 +27,11 @@ import com.fireblocks.sdk.model.RatesRequest; import com.fireblocks.sdk.model.RatesResponse; import com.fireblocks.sdk.model.SubmitOrderRequirementRequest; +import com.fireblocks.sdk.model.TradeClass; +import com.fireblocks.sdk.model.TradingPairSide; +import com.fireblocks.sdk.model.TradingPairsListPage; import com.fireblocks.sdk.model.TradingProvider; +import com.fireblocks.sdk.model.TransferRail; import java.io.File; import java.util.List; import java.util.concurrent.CompletableFuture; @@ -187,6 +191,60 @@ public void getOrdersTest() { assetConversionType); } + /** + * Get trading pairs + * + *

Retrieve the base/quote trading pairs supported by the tenant's trading providers. All + * filters are optional and combined with AND. A provider can return several rows for one pair, + * one per side and per connected account, each with its own `tradeClass`. Rows may + * use the wildcard `*` asset ID or the `BOTH` side and are returned + * unexpanded (see the `baseAsset`, `side` and `baseChain` filters + * for how they match). **Examples** - Which providers support ETH/USDC: + * `?baseAsset=ETH&quoteAsset=USDC`. Add `providerId` to check + * one provider; an empty `data` array means it does not support the pair. - All pairs + * of one account: `?providerId=ACME&accountId=<ACCOUNT_ID>`. Page + * through large results with `pageSize` and `pageCursor`. - Everything you + * can buy with euro: `?baseAsset=EUR&tradeClass=ON_RAMP`. **Endpoint + * Permission:** Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed + * information about error codes and troubleshooting, please refer to our [API Error Codes + * documentation](https://developers.fireblocks.com/reference/api-error-codes). + */ + @Test + public void getTradingPairsTest() { + String baseAsset = null; + String quoteAsset = null; + String baseChain = null; + String quoteChain = null; + TransferRail baseRail = null; + TransferRail quoteRail = null; + TradingPairSide side = null; + TradeClass tradeClass = null; + List providerId = null; + List accountId = null; + Boolean prefunded = null; + String min = null; + String max = null; + Integer pageSize = null; + String pageCursor = null; + CompletableFuture> response = + api.getTradingPairs( + baseAsset, + quoteAsset, + baseChain, + quoteChain, + baseRail, + quoteRail, + side, + tradeClass, + providerId, + accountId, + prefunded, + min, + max, + pageSize, + pageCursor); + } + /** * Get trading provider by ID * diff --git a/src/test/java/com/fireblocks/sdk/api/UtxoManagementBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/UtxoManagementApiTest.java similarity index 86% rename from src/test/java/com/fireblocks/sdk/api/UtxoManagementBetaApiTest.java rename to src/test/java/com/fireblocks/sdk/api/UtxoManagementApiTest.java index 74b94104..cc5af542 100644 --- a/src/test/java/com/fireblocks/sdk/api/UtxoManagementBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/UtxoManagementApiTest.java @@ -25,11 +25,11 @@ import org.junit.Ignore; import org.junit.Test; -/** API tests for UtxoManagementBetaApi */ +/** API tests for UtxoManagementApi */ @Ignore -public class UtxoManagementBetaApiTest { +public class UtxoManagementApiTest { - private final UtxoManagementBetaApi api = new UtxoManagementBetaApi(); + private final UtxoManagementApi api = new UtxoManagementApi(); /** * Get UTXO selection config @@ -37,9 +37,8 @@ public class UtxoManagementBetaApiTest { *

Returns the workspace-level configured selection strategy and the effective strategy after * runtime resolution. `ADAPTIVE` is the recommended strategy. When no row is stored * (source `DEFAULT`), `effective` is `ADAPTIVE` if adaptive - * selection is serving for this workspace, otherwise `ASC`. **Note:** These endpoints - * are currently in beta and might be subject to changes. Endpoint Permission: Admin, - * Non-Signing Admin, Signer, Approver, Editor, Viewer. + * selection is serving for this workspace, otherwise `ASC`. Endpoint Permission: + * Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. */ @Test public void getUtxoSelectionConfigTest() { @@ -51,9 +50,8 @@ public void getUtxoSelectionConfigTest() { * List unspent outputs (UTXOs) * *

Returns a paginated list of unspent transaction outputs (UTXOs) for a UTXO-based asset in - * a vault account, with optional filters for labels, statuses, amounts, and more. **Note:** - * These endpoints are currently in beta and might be subject to changes. Endpoint Permission: - * Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + * a vault account, with optional filters for labels, statuses, amounts, and more. Endpoint + * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. */ @Test public void getUtxosTest() { @@ -98,9 +96,8 @@ public void getUtxosTest() { * strategy after workspace fallback and runtime resolution. `ADAPTIVE` is the * recommended strategy. When no row is stored at this scope and none is inherited from the * workspace (source `DEFAULT`), `effective` is `ADAPTIVE` if - * adaptive selection is serving for this scope, otherwise `ASC`. **Note:** These - * endpoints are currently in beta and might be subject to changes. Endpoint Permission: Admin, - * Non-Signing Admin, Signer, Approver, Editor, Viewer. + * adaptive selection is serving for this scope, otherwise `ASC`. Endpoint Permission: + * Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. */ @Test public void getVaultAssetUtxoSelectionConfigTest() { @@ -124,8 +121,7 @@ public void getVaultAssetUtxoSelectionConfigTest() { * UTXO removed within the last hour is reported as `NOT_FOUND` with `utxoStatus: * REMOVED`; if it does not reappear, it becomes `NOT_LABELLABLE` after about an * hour. A `400` without `failures` means the request itself is malformed. - * **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint - * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. + * Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. */ @Test public void updateUtxoLabelsTest() { @@ -142,8 +138,7 @@ public void updateUtxoLabelsTest() { * Upsert UTXO selection config * *

Creates or updates the workspace-level UTXO selection strategy. `ADAPTIVE` is - * recommended. **Note:** These endpoints are currently in beta and might be subject to changes. - * Endpoint Permission: Admin, Non-Signing Admin. + * recommended. Endpoint Permission: Admin, Non-Signing Admin. */ @Test public void upsertUtxoSelectionConfigTest() { @@ -157,8 +152,7 @@ public void upsertUtxoSelectionConfigTest() { * Upsert vault and asset UTXO selection config * *

Creates or updates the UTXO selection strategy for this vault account and asset. - * `ADAPTIVE` is recommended. **Note:** These endpoints are currently in beta and - * might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin. + * `ADAPTIVE` is recommended. Endpoint Permission: Admin, Non-Signing Admin. */ @Test public void upsertVaultAssetUtxoSelectionConfigTest() { diff --git a/src/test/java/com/fireblocks/sdk/model/FeeInfoTest.java b/src/test/java/com/fireblocks/sdk/model/FeeInfoTest.java index 70af03bc..b65e9026 100644 --- a/src/test/java/com/fireblocks/sdk/model/FeeInfoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/FeeInfoTest.java @@ -84,4 +84,16 @@ void relayNameTest() { void feeUSDTest() { // TODO: test feeUSD } + + /** Test the property 'sender' */ + @Test + void senderTest() { + // TODO: test sender + } + + /** Test the property 'recipient' */ + @Test + void recipientTest() { + // TODO: test recipient + } } diff --git a/src/test/java/com/fireblocks/sdk/model/RoleFeeInfoTest.java b/src/test/java/com/fireblocks/sdk/model/RoleFeeInfoTest.java new file mode 100644 index 00000000..b82e4140 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/RoleFeeInfoTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for RoleFeeInfo */ +class RoleFeeInfoTest { + private final RoleFeeInfo model = new RoleFeeInfo(); + + /** Model tests for RoleFeeInfo */ + @Test + void testRoleFeeInfo() { + // TODO: test RoleFeeInfo + } + + /** Test the property 'feesDeducted' */ + @Test + void feesDeductedTest() { + // TODO: test feesDeducted + } + + /** Test the property 'valueCredited' */ + @Test + void valueCreditedTest() { + // TODO: test valueCredited + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TradeClassTest.java b/src/test/java/com/fireblocks/sdk/model/TradeClassTest.java new file mode 100644 index 00000000..27367fd2 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TradeClassTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for TradeClass */ +class TradeClassTest { + /** Model tests for TradeClass */ + @Test + void testTradeClass() { + // TODO: test TradeClass + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TradingPairSideTest.java b/src/test/java/com/fireblocks/sdk/model/TradingPairSideTest.java new file mode 100644 index 00000000..4ae02f12 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TradingPairSideTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for TradingPairSide */ +class TradingPairSideTest { + /** Model tests for TradingPairSide */ + @Test + void testTradingPairSide() { + // TODO: test TradingPairSide + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TradingPairTest.java b/src/test/java/com/fireblocks/sdk/model/TradingPairTest.java new file mode 100644 index 00000000..959320b7 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TradingPairTest.java @@ -0,0 +1,105 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for TradingPair */ +class TradingPairTest { + private final TradingPair model = new TradingPair(); + + /** Model tests for TradingPair */ + @Test + void testTradingPair() { + // TODO: test TradingPair + } + + /** Test the property 'providerId' */ + @Test + void providerIdTest() { + // TODO: test providerId + } + + /** Test the property 'accountId' */ + @Test + void accountIdTest() { + // TODO: test accountId + } + + /** Test the property 'baseAssetId' */ + @Test + void baseAssetIdTest() { + // TODO: test baseAssetId + } + + /** Test the property 'quoteAssetId' */ + @Test + void quoteAssetIdTest() { + // TODO: test quoteAssetId + } + + /** Test the property 'baseChain' */ + @Test + void baseChainTest() { + // TODO: test baseChain + } + + /** Test the property 'quoteChain' */ + @Test + void quoteChainTest() { + // TODO: test quoteChain + } + + /** Test the property 'side' */ + @Test + void sideTest() { + // TODO: test side + } + + /** Test the property 'tradeClass' */ + @Test + void tradeClassTest() { + // TODO: test tradeClass + } + + /** Test the property 'baseAssetRail' */ + @Test + void baseAssetRailTest() { + // TODO: test baseAssetRail + } + + /** Test the property 'quoteAssetRail' */ + @Test + void quoteAssetRailTest() { + // TODO: test quoteAssetRail + } + + /** Test the property 'prefunded' */ + @Test + void prefundedTest() { + // TODO: test prefunded + } + + /** Test the property 'min' */ + @Test + void minTest() { + // TODO: test min + } + + /** Test the property 'max' */ + @Test + void maxTest() { + // TODO: test max + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TradingPairsListPageTest.java b/src/test/java/com/fireblocks/sdk/model/TradingPairsListPageTest.java new file mode 100644 index 00000000..001aaf2e --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TradingPairsListPageTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for TradingPairsListPage */ +class TradingPairsListPageTest { + private final TradingPairsListPage model = new TradingPairsListPage(); + + /** Model tests for TradingPairsListPage */ + @Test + void testTradingPairsListPage() { + // TODO: test TradingPairsListPage + } + + /** Test the property 'data' */ + @Test + void dataTest() { + // TODO: test data + } + + /** Test the property 'total' */ + @Test + void totalTest() { + // TODO: test total + } + + /** Test the property 'next' */ + @Test + void nextTest() { + // TODO: test next + } +}