diff --git a/MIGRATION.md b/MIGRATION.md index ffe831a9e..241767042 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -37,7 +37,7 @@ For Spot (Spot package): io.github.binance binance-spot - 11.0.1 + 11.0.2 ``` diff --git a/README.md b/README.md index efd32569c..09d372fcc 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Each connector is published as a separate maven dependency. For example: io.github.binance binance-spot - 11.0.1 + 11.0.2 ``` diff --git a/clients/algo/CHANGELOG.md b/clients/algo/CHANGELOG.md index ee8ad5f5b..a68aa9812 100644 --- a/clients/algo/CHANGELOG.md +++ b/clients/algo/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2.1.1 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 2.1.0 - 2026-08-25 ### Changed (2) diff --git a/clients/algo/docs/TimeWeightedAveragePriceFutureAlgoRequest.md b/clients/algo/docs/TimeWeightedAveragePriceFutureAlgoRequest.md index 35aecf274..dd5b11c02 100644 --- a/clients/algo/docs/TimeWeightedAveragePriceFutureAlgoRequest.md +++ b/clients/algo/docs/TimeWeightedAveragePriceFutureAlgoRequest.md @@ -10,7 +10,7 @@ |**symbol** | **String** | Trading symbol eg. BTCUSDT | | |**side** | **Side** | | | |**positionSide** | **PositionSide** | | [optional] | -|**quantity** | **Double** | Quantity of base asset; The notional (`quantity` * `mark price(base asset)`) must be more than the equivalent of 1,000 USDT and less than the equivalent of 1,000,000 USDT | | +|**quantity** | **Double** | Quantity of base asset; The notional (`quantity` * `mark price(base asset)`) must be more than the equivalent of 1,000 USDT, and the maximum notional varies by symbol: up to 50,000,000 USDT for BTCUSDT perpetual, up to 25,000,000 USDT for ETHUSDT perpetual, and up to 5,000,000 USDT for other symbols | | |**duration** | **Long** | Duration for TWAP orders in seconds | | |**clientAlgoId** | **String** | A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value | [optional] | |**reduceOnly** | **Boolean** | \"true\" or \"false\". Default \"false\"; Cannot be sent in Hedge Mode; Cannot be sent when you open a position | [optional] | diff --git a/clients/algo/docs/VolumeParticipationFutureAlgoRequest.md b/clients/algo/docs/VolumeParticipationFutureAlgoRequest.md index f193aadef..b4f857e17 100644 --- a/clients/algo/docs/VolumeParticipationFutureAlgoRequest.md +++ b/clients/algo/docs/VolumeParticipationFutureAlgoRequest.md @@ -10,7 +10,7 @@ |**symbol** | **String** | Trading symbol eg. BTCUSDT | | |**side** | **Side** | | | |**positionSide** | **PositionSide** | | [optional] | -|**quantity** | **Double** | Quantity of base asset; The notional (`quantity` * `mark price(base asset)`) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT | | +|**quantity** | **Double** | Quantity of base asset; The notional (`quantity` * `mark price(base asset)`) must be more than the equivalent of 10,000 USDT, and the maximum notional varies by symbol: up to 50,000,000 USDT for BTCUSDT perpetual, up to 25,000,000 USDT for ETHUSDT perpetual, and up to 5,000,000 USDT for other symbols | | |**urgency** | **Urgency** | | | |**clientAlgoId** | **String** | A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value | [optional] | |**reduceOnly** | **Boolean** | \"true\" or \"false\". Default \"false\"; Cannot be sent in Hedge Mode; Cannot be sent when you open a position | [optional] | diff --git a/clients/algo/docs/rest-api/migration-guide.md b/clients/algo/docs/rest-api/migration-guide.md index 515cc6eff..4976a88fd 100644 --- a/clients/algo/docs/rest-api/migration-guide.md +++ b/clients/algo/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-algo - 2.1.0 + 2.1.1 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-algo - 2.1.0 + 2.1.1 ``` diff --git a/clients/algo/pom.xml b/clients/algo/pom.xml index 73d9c113e..48cf5c1f9 100644 --- a/clients/algo/pom.xml +++ b/clients/algo/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-algo algo - 2.1.0 + 2.1.1 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/FutureAlgoApi.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/FutureAlgoApi.java index 82dfaadd5..aded9e92d 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/FutureAlgoApi.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/FutureAlgoApi.java @@ -52,7 +52,7 @@ public class FutureAlgoApi { private static final String USER_AGENT = String.format( - "binance-algo/2.1.0 (Java/%s; %s; %s)", + "binance-algo/2.1.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/SpotAlgoApi.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/SpotAlgoApi.java index 2dfad9423..89c551760 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/SpotAlgoApi.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/api/SpotAlgoApi.java @@ -50,7 +50,7 @@ public class SpotAlgoApi { private static final String USER_AGENT = String.format( - "binance-algo/2.1.0 (Java/%s; %s; %s)", + "binance-algo/2.1.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/TimeWeightedAveragePriceFutureAlgoRequest.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/TimeWeightedAveragePriceFutureAlgoRequest.java index e9818588e..7a5a2c944 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/TimeWeightedAveragePriceFutureAlgoRequest.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/TimeWeightedAveragePriceFutureAlgoRequest.java @@ -164,8 +164,9 @@ public TimeWeightedAveragePriceFutureAlgoRequest quantity( /** * Quantity of base asset; The notional (`quantity` * `mark price(base - * asset)`) must be more than the equivalent of 1,000 USDT and less than the equivalent of - * 1,000,000 USDT + * asset)`) must be more than the equivalent of 1,000 USDT, and the maximum notional varies + * by symbol: up to 50,000,000 USDT for BTCUSDT perpetual, up to 25,000,000 USDT for ETHUSDT + * perpetual, and up to 5,000,000 USDT for other symbols * * @return quantity */ diff --git a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/VolumeParticipationFutureAlgoRequest.java b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/VolumeParticipationFutureAlgoRequest.java index de7feac17..8996d76c7 100644 --- a/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/VolumeParticipationFutureAlgoRequest.java +++ b/clients/algo/src/main/java/com/binance/connector/client/algo/rest/model/VolumeParticipationFutureAlgoRequest.java @@ -163,8 +163,9 @@ public VolumeParticipationFutureAlgoRequest quantity( /** * Quantity of base asset; The notional (`quantity` * `mark price(base - * asset)`) must be more than the equivalent of 10,000 USDT and less than the equivalent of - * 1,000,000 USDT + * asset)`) must be more than the equivalent of 10,000 USDT, and the maximum notional + * varies by symbol: up to 50,000,000 USDT for BTCUSDT perpetual, up to 25,000,000 USDT for + * ETHUSDT perpetual, and up to 5,000,000 USDT for other symbols * * @return quantity */ diff --git a/clients/alpha/CHANGELOG.md b/clients/alpha/CHANGELOG.md index d50a30bb3..931e23339 100644 --- a/clients/alpha/CHANGELOG.md +++ b/clients/alpha/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2.0.1 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 2.0.0 - 2026-07-29 ### Added (1) diff --git a/clients/alpha/docs/rest-api/migration-guide.md b/clients/alpha/docs/rest-api/migration-guide.md index 74245ce49..f1489aac8 100644 --- a/clients/alpha/docs/rest-api/migration-guide.md +++ b/clients/alpha/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-alpha - 2.0.0 + 2.0.1 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-alpha - 2.0.0 + 2.0.1 ``` diff --git a/clients/alpha/pom.xml b/clients/alpha/pom.xml index 4836e7e6c..0f7900121 100644 --- a/clients/alpha/pom.xml +++ b/clients/alpha/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-alpha alpha - 2.0.0 + 2.0.1 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/api/MarketDataApi.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/api/MarketDataApi.java index d7f0a8ea8..8ff20b541 100644 --- a/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/api/MarketDataApi.java +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/rest/api/MarketDataApi.java @@ -49,7 +49,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-alpha/2.0.0 (Java/%s; %s; %s)", + "binance-alpha/2.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/api/AlphaWebSocketStreams.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/api/AlphaWebSocketStreams.java index 12f8e2b8c..2af8fd326 100644 --- a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/api/AlphaWebSocketStreams.java +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/api/AlphaWebSocketStreams.java @@ -39,7 +39,7 @@ public class AlphaWebSocketStreams { private static final String USER_AGENT = String.format( - "binance-alpha/2.0.0 (Java/%s; %s; %s)", + "binance-alpha/2.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private final StreamConnectionInterface connection; diff --git a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/api/DefaultApi.java b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/api/DefaultApi.java index fa358371b..822f21f8f 100644 --- a/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/api/DefaultApi.java +++ b/clients/alpha/src/main/java/com/binance/connector/client/alpha/websocket/stream/api/DefaultApi.java @@ -63,7 +63,7 @@ public class DefaultApi { private static final String USER_AGENT = String.format( - "binance-alpha/2.0.0 (Java/%s; %s; %s)", + "binance-alpha/2.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private StreamConnectionInterface connection; diff --git a/clients/c2c/CHANGELOG.md b/clients/c2c/CHANGELOG.md index b21d9ab47..60b304efb 100644 --- a/clients/c2c/CHANGELOG.md +++ b/clients/c2c/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 4.0.1 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 4.0.0 - 2026-07-29 ### Changed (3) diff --git a/clients/c2c/docs/rest-api/migration-guide.md b/clients/c2c/docs/rest-api/migration-guide.md index ea35294b2..cd34caca5 100644 --- a/clients/c2c/docs/rest-api/migration-guide.md +++ b/clients/c2c/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-c2c - 4.0.0 + 4.0.1 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-c2c - 4.0.0 + 4.0.1 ``` diff --git a/clients/c2c/pom.xml b/clients/c2c/pom.xml index 51821e425..f846acd2a 100644 --- a/clients/c2c/pom.xml +++ b/clients/c2c/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-c2c c2c - 4.0.0 + 4.0.1 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/api/DefaultApi.java b/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/api/DefaultApi.java index 6ab6e1a25..7016551ba 100644 --- a/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/api/DefaultApi.java +++ b/clients/c2c/src/main/java/com/binance/connector/client/c2c/rest/api/DefaultApi.java @@ -43,7 +43,7 @@ public class DefaultApi { private static final String USER_AGENT = String.format( - "binance-c2c/4.0.0 (Java/%s; %s; %s)", + "binance-c2c/4.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/common/pom.xml b/clients/common/pom.xml index fffb875af..e6e2d5cd7 100644 --- a/clients/common/pom.xml +++ b/clients/common/pom.xml @@ -5,11 +5,11 @@ io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 binance-common common - 2.5.2 + 2.5.3 jar \ No newline at end of file diff --git a/clients/convert/CHANGELOG.md b/clients/convert/CHANGELOG.md index c4b9ffe62..ed3bbbecc 100644 --- a/clients/convert/CHANGELOG.md +++ b/clients/convert/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 3.0.2 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 3.0.1 - 2026-08-25 ### Changed (1) diff --git a/clients/convert/docs/rest-api/migration-guide.md b/clients/convert/docs/rest-api/migration-guide.md index b95ffef60..6c8817e07 100644 --- a/clients/convert/docs/rest-api/migration-guide.md +++ b/clients/convert/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-convert - 3.0.0 + 3.0.2 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-convert - 3.0.0 + 3.0.2 ``` diff --git a/clients/convert/pom.xml b/clients/convert/pom.xml index 07698ec13..f5069b245 100644 --- a/clients/convert/pom.xml +++ b/clients/convert/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-convert convert - 3.0.1 + 3.0.2 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/api/MarketDataApi.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/api/MarketDataApi.java index 980864231..03111d2e6 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/api/MarketDataApi.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/api/MarketDataApi.java @@ -43,7 +43,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-convert/3.0.1 (Java/%s; %s; %s)", + "binance-convert/3.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/api/TradeApi.java b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/api/TradeApi.java index 598512820..99e912d6b 100644 --- a/clients/convert/src/main/java/com/binance/connector/client/convert/rest/api/TradeApi.java +++ b/clients/convert/src/main/java/com/binance/connector/client/convert/rest/api/TradeApi.java @@ -54,7 +54,7 @@ public class TradeApi { private static final String USER_AGENT = String.format( - "binance-convert/3.0.1 (Java/%s; %s; %s)", + "binance-convert/3.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/copy-trading/CHANGELOG.md b/clients/copy-trading/CHANGELOG.md index f4d52b973..dbe8d23d1 100644 --- a/clients/copy-trading/CHANGELOG.md +++ b/clients/copy-trading/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2.0.1 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 2.0.0 - 2026-07-29 - Update descriptions and examples. diff --git a/clients/copy-trading/docs/rest-api/migration-guide.md b/clients/copy-trading/docs/rest-api/migration-guide.md index 35e1bc12e..7ba7f86f1 100644 --- a/clients/copy-trading/docs/rest-api/migration-guide.md +++ b/clients/copy-trading/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-copy-trading - 2.0.0 + 2.0.1 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-copy-trading - 2.0.0 + 2.0.1 ``` diff --git a/clients/copy-trading/pom.xml b/clients/copy-trading/pom.xml index a3e3e4776..9db4acb7e 100644 --- a/clients/copy-trading/pom.xml +++ b/clients/copy-trading/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-copy-trading copy-trading - 2.0.0 + 2.0.1 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/api/FutureCopyTradingApi.java b/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/api/FutureCopyTradingApi.java index 57687e67b..3382d143d 100644 --- a/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/api/FutureCopyTradingApi.java +++ b/clients/copy-trading/src/main/java/com/binance/connector/client/copy_trading/rest/api/FutureCopyTradingApi.java @@ -43,7 +43,7 @@ public class FutureCopyTradingApi { private static final String USER_AGENT = String.format( - "binance-copy-trading/2.0.0 (Java/%s; %s; %s)", + "binance-copy-trading/2.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/crypto-loan/CHANGELOG.md b/clients/crypto-loan/CHANGELOG.md index f6a8fbfa5..2d3ab79fc 100644 --- a/clients/crypto-loan/CHANGELOG.md +++ b/clients/crypto-loan/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 5.0.2 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 5.0.1 - 2026-08-25 ### Changed (1) diff --git a/clients/crypto-loan/docs/rest-api/migration-guide.md b/clients/crypto-loan/docs/rest-api/migration-guide.md index 5279b392a..d3974c0a1 100644 --- a/clients/crypto-loan/docs/rest-api/migration-guide.md +++ b/clients/crypto-loan/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-crypto-loan - 5.0.0 + 5.0.2 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-crypto-loan - 5.0.0 + 5.0.2 ``` diff --git a/clients/crypto-loan/pom.xml b/clients/crypto-loan/pom.xml index fd740de60..44d96bc7b 100644 --- a/clients/crypto-loan/pom.xml +++ b/clients/crypto-loan/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-crypto-loan crypto-loan - 5.0.1 + 5.0.2 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/api/FlexibleRateApi.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/api/FlexibleRateApi.java index 1130843ff..00f7f98e0 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/api/FlexibleRateApi.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/api/FlexibleRateApi.java @@ -58,7 +58,7 @@ public class FlexibleRateApi { private static final String USER_AGENT = String.format( - "binance-crypto-loan/5.0.1 (Java/%s; %s; %s)", + "binance-crypto-loan/5.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/api/StableRateApi.java b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/api/StableRateApi.java index 2e5249cfc..38997ef47 100644 --- a/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/api/StableRateApi.java +++ b/clients/crypto-loan/src/main/java/com/binance/connector/client/crypto_loan/rest/api/StableRateApi.java @@ -46,7 +46,7 @@ public class StableRateApi { private static final String USER_AGENT = String.format( - "binance-crypto-loan/5.0.1 (Java/%s; %s; %s)", + "binance-crypto-loan/5.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/derivatives-trading-coin-futures/CHANGELOG.md b/clients/derivatives-trading-coin-futures/CHANGELOG.md index bfe1fbc4a..89d81800b 100644 --- a/clients/derivatives-trading-coin-futures/CHANGELOG.md +++ b/clients/derivatives-trading-coin-futures/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 9.0.1 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 9.0.0 - 2026-08-25 ### Changed (9) diff --git a/clients/derivatives-trading-coin-futures/docs/AccountTradeListResponseInner.md b/clients/derivatives-trading-coin-futures/docs/AccountTradeListResponseInner.md index 4b9d1f9de..a0640d764 100644 --- a/clients/derivatives-trading-coin-futures/docs/AccountTradeListResponseInner.md +++ b/clients/derivatives-trading-coin-futures/docs/AccountTradeListResponseInner.md @@ -16,8 +16,8 @@ |**qty** | **String** | Quantity. | [optional] | |**realizedPnl** | **String** | Realized PnL. | [optional] | |**marginAsset** | **String** | Margin asset. | [optional] | -|**baseQty** | **String** | Base asset quantity. | [optional] | -|**quoteQty** | **String** | Quote asset quantity. | [optional] | +|**baseQty** | **String** | Base asset quantity. Populated for COIN-M symbols; returns \"0\" for USDⓈ-M symbols. | [optional] | +|**quoteQty** | **String** | Quote asset quantity. Populated for USDⓈ-M symbols; returns \"0\" for COIN-M symbols. | [optional] | |**commission** | **String** | Transaction Fee (in Crypto) | [optional] | |**commissionAsset** | **String** | Commission asset. | [optional] | |**time** | **Long** | Time | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/BatchOrdersInner.md b/clients/derivatives-trading-coin-futures/docs/BatchOrdersInner.md index eae4fd183..1d4a589a7 100644 --- a/clients/derivatives-trading-coin-futures/docs/BatchOrdersInner.md +++ b/clients/derivatives-trading-coin-futures/docs/BatchOrdersInner.md @@ -23,7 +23,7 @@ |**priceProtect** | [**PriceProtectEnum**](#PriceProtectEnum) | Used with `STOP/STOP_MARKET` or `TAKE_PROFIT/TAKE_PROFIT_MARKET` orders. | [optional] | |**newOrderRespType** | [**NewOrderRespTypeEnum**](#NewOrderRespTypeEnum) | | [optional] | |**priceMatch** | [**PriceMatchEnum**](#PriceMatchEnum) | only avaliable for `LIMIT`/`STOP`/`TAKE_PROFIT` order; can't be passed together with `price` | [optional] | -|**selfTradePreventionMode** | [**SelfTradePreventionModeEnum**](#SelfTradePreventionModeEnum) | `EXPIRE_TAKER`:expire taker order when STP triggers/ `EXPIRE_MAKER`:expire taker order when STP triggers/ `EXPIRE_BOTH`:expire both orders when STP triggers | [optional] | +|**selfTradePreventionMode** | [**SelfTradePreventionModeEnum**](#SelfTradePreventionModeEnum) | `EXPIRE_TAKER`: expire taker order when STP triggers/ `EXPIRE_MAKER`: expire taker order when STP triggers/ `EXPIRE_BOTH`: expire both orders when STP triggers | [optional] | diff --git a/clients/derivatives-trading-coin-futures/docs/rest-api/migration-guide.md b/clients/derivatives-trading-coin-futures/docs/rest-api/migration-guide.md index 8949302a4..f21ffc6c9 100644 --- a/clients/derivatives-trading-coin-futures/docs/rest-api/migration-guide.md +++ b/clients/derivatives-trading-coin-futures/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-derivatives-trading-coin-futures - 9.0.0 + 9.0.1 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-derivatives-trading-coin-futures - 9.0.0 + 9.0.1 ``` diff --git a/clients/derivatives-trading-coin-futures/pom.xml b/clients/derivatives-trading-coin-futures/pom.xml index 22b8168fd..81590e13f 100644 --- a/clients/derivatives-trading-coin-futures/pom.xml +++ b/clients/derivatives-trading-coin-futures/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-derivatives-trading-coin-futures derivatives-trading-coin-futures - 9.0.0 + 9.0.1 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/AccountApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/AccountApi.java index cf42a2058..4065e068e 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/AccountApi.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/AccountApi.java @@ -55,7 +55,7 @@ public class AccountApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-coin-futures/9.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-coin-futures/9.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/DerivativesTradingCoinFuturesRestApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/DerivativesTradingCoinFuturesRestApi.java index 4119b8be1..ecaeedadb 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/DerivativesTradingCoinFuturesRestApi.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/DerivativesTradingCoinFuturesRestApi.java @@ -1288,7 +1288,8 @@ public ApiResponse topTraderLongShortR * sent,tickers for all symbols of the pair will be returned - The parameter `fromId` * cannot be sent with `startTime` or `endTime` - If startTime and endTime * are both not sent, then the last 7 days' data will be returned. - The time between - * startTime and endTime cannot be longer than 7 days. + * startTime and endTime cannot be longer than 7 days. - Only support querying trade in the past + * 3 months * * @param symbol Symbol (optional) * @param pair pair (optional) diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/MarketDataApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/MarketDataApi.java index 1fa6b500c..d08af6482 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/MarketDataApi.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/MarketDataApi.java @@ -69,7 +69,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-coin-futures/9.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-coin-futures/9.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/TradeApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/TradeApi.java index 36da1992e..4bd6faa6b 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/TradeApi.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/TradeApi.java @@ -78,7 +78,7 @@ public class TradeApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-coin-futures/9.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-coin-futures/9.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -296,7 +296,8 @@ private okhttp3.Call accountTradeListValidateBeforeCall( * sent,tickers for all symbols of the pair will be returned - The parameter `fromId` * cannot be sent with `startTime` or `endTime` - If startTime and endTime * are both not sent, then the last 7 days' data will be returned. - The time between - * startTime and endTime cannot be longer than 7 days. + * startTime and endTime cannot be longer than 7 days. - Only support querying trade in the past + * 3 months * * @param symbol Symbol (optional) * @param pair pair (optional) diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/UserDataStreamsApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/UserDataStreamsApi.java index 46c35afd8..cc9a72b0d 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/UserDataStreamsApi.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/api/UserDataStreamsApi.java @@ -43,7 +43,7 @@ public class UserDataStreamsApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-coin-futures/9.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-coin-futures/9.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountTradeListResponseInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountTradeListResponseInner.java index 994c5ef49..1af432b20 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountTradeListResponseInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/AccountTradeListResponseInner.java @@ -319,7 +319,8 @@ public AccountTradeListResponseInner baseQty(@jakarta.annotation.Nullable String } /** - * Base asset quantity. + * Base asset quantity. Populated for COIN-M symbols; returns \"0\" for USDⓈ-M + * symbols. * * @return baseQty */ @@ -338,7 +339,8 @@ public AccountTradeListResponseInner quoteQty(@jakarta.annotation.Nullable Strin } /** - * Quote asset quantity. + * Quote asset quantity. Populated for USDⓈ-M symbols; returns \"0\" for COIN-M + * symbols. * * @return quoteQty */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BatchOrdersInner.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BatchOrdersInner.java index 9d6723f9b..d2ead24fa 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BatchOrdersInner.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/BatchOrdersInner.java @@ -635,9 +635,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti private PriceMatchEnum priceMatch; /** - * `EXPIRE_TAKER`:expire taker order when STP triggers/ - * `EXPIRE_MAKER`:expire taker order when STP triggers/ `EXPIRE_BOTH`:expire - * both orders when STP triggers + * `EXPIRE_TAKER`: expire taker order when STP triggers/ `EXPIRE_MAKER`: + * expire taker order when STP triggers/ `EXPIRE_BOTH`: expire both orders when STP + * triggers */ @JsonAdapter(SelfTradePreventionModeEnum.Adapter.class) public enum SelfTradePreventionModeEnum { @@ -1036,9 +1036,9 @@ public BatchOrdersInner selfTradePreventionMode( } /** - * `EXPIRE_TAKER`:expire taker order when STP triggers/ - * `EXPIRE_MAKER`:expire taker order when STP triggers/ `EXPIRE_BOTH`:expire - * both orders when STP triggers + * `EXPIRE_TAKER`: expire taker order when STP triggers/ `EXPIRE_MAKER`: + * expire taker order when STP triggers/ `EXPIRE_BOTH`: expire both orders when STP + * triggers * * @return selfTradePreventionMode */ diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SelfTradePreventionMode.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SelfTradePreventionMode.java index 923f59fb5..942cc2c35 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SelfTradePreventionMode.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/model/SelfTradePreventionMode.java @@ -22,8 +22,8 @@ import org.hibernate.validator.constraints.*; /** - * `EXPIRE_TAKER`:expire taker order when STP triggers/ `EXPIRE_MAKER`:expire - * taker order when STP triggers/ `EXPIRE_BOTH`:expire both orders when STP triggers + * `EXPIRE_TAKER`: expire taker order when STP triggers/ `EXPIRE_MAKER`: expire + * taker order when STP triggers/ `EXPIRE_BOTH`: expire both orders when STP triggers */ @JsonAdapter(SelfTradePreventionMode.Adapter.class) public enum SelfTradePreventionMode { diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/DerivativesTradingCoinFuturesWebSocketApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/DerivativesTradingCoinFuturesWebSocketApi.java index b53871e85..618431e4d 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/DerivativesTradingCoinFuturesWebSocketApi.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/api/DerivativesTradingCoinFuturesWebSocketApi.java @@ -34,7 +34,7 @@ public class DerivativesTradingCoinFuturesWebSocketApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-coin-futures/9.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-coin-futures/9.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private final ConnectionInterface connection; diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/SelfTradePreventionMode.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/SelfTradePreventionMode.java index db23cee19..8425e1c1d 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/SelfTradePreventionMode.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/api/model/SelfTradePreventionMode.java @@ -22,8 +22,8 @@ import org.hibernate.validator.constraints.*; /** - * `NONE`: No STP / `EXPIRE_TAKER`:expire taker order when STP triggers/ - * `EXPIRE_MAKER`:expire taker order when STP triggers/ `EXPIRE_BOTH`:expire + * `NONE`: No STP / `EXPIRE_TAKER`: expire taker order when STP triggers/ + * `EXPIRE_MAKER`: expire taker order when STP triggers/ `EXPIRE_BOTH`: expire * both orders when STP triggers */ @JsonAdapter(SelfTradePreventionMode.Adapter.class) diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/DefaultApi.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/DefaultApi.java index ef134b216..a985c320f 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/DefaultApi.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/DefaultApi.java @@ -75,7 +75,7 @@ public class DefaultApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-coin-futures/9.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-coin-futures/9.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private StreamConnectionInterface connection; diff --git a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/DerivativesTradingCoinFuturesWebSocketStreams.java b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/DerivativesTradingCoinFuturesWebSocketStreams.java index da0e8d5f6..5b017530c 100644 --- a/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/DerivativesTradingCoinFuturesWebSocketStreams.java +++ b/clients/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/websocket/stream/api/DerivativesTradingCoinFuturesWebSocketStreams.java @@ -58,7 +58,7 @@ public class DerivativesTradingCoinFuturesWebSocketStreams { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-coin-futures/9.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-coin-futures/9.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private final StreamConnectionInterface connection; diff --git a/clients/derivatives-trading-options/CHANGELOG.md b/clients/derivatives-trading-options/CHANGELOG.md index bca917359..622d75a41 100644 --- a/clients/derivatives-trading-options/CHANGELOG.md +++ b/clients/derivatives-trading-options/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 9.0.2 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 9.0.1 - 2026-08-25 ### Changed (4) diff --git a/clients/derivatives-trading-options/docs/MarketApi.md b/clients/derivatives-trading-options/docs/MarketApi.md index d3a703bd4..3690cee6c 100644 --- a/clients/derivatives-trading-options/docs/MarketApi.md +++ b/clients/derivatives-trading-options/docs/MarketApi.md @@ -203,7 +203,7 @@ No authorization required Open Interest -Option open interest for specific underlying asset on specific expiration date. E.g.[ethusdt@openInterest@221125](wss://fstream.binance.com/market/stream?streams=ethusdt@openInterest@221125) Update Speed: 60s +Option open interest for specific underlying asset on specific expiration date. E.g.ethusdt@openInterest@221125 Update Speed: 60s ### Example ```java @@ -265,7 +265,7 @@ No authorization required Option Mark Price -The mark price for all option symbols on specific underlying asset. E.g.[btcusdt@optionMarkPrice](wss://fstream.binance.com/market/stream?streams=btcusdt@optionMarkPrice) Update Speed: 1000ms +The mark price for all option symbols on specific underlying asset. E.g.btcusdt@optionMarkPrice Update Speed: 1000ms ### Example ```java diff --git a/clients/derivatives-trading-options/docs/OrdersInner.md b/clients/derivatives-trading-options/docs/OrdersInner.md index 726648fd5..6da4b0a21 100644 --- a/clients/derivatives-trading-options/docs/OrdersInner.md +++ b/clients/derivatives-trading-options/docs/OrdersInner.md @@ -18,7 +18,7 @@ |**newOrderRespType** | [**NewOrderRespTypeEnum**](#NewOrderRespTypeEnum) | | [optional] | |**clientOrderId** | **String** | User-defined order ID cannot be repeated in pending orders | [optional] | |**isMmp** | **Boolean** | is market maker protection order | [optional] | -|**selfTradePreventionMode** | [**SelfTradePreventionModeEnum**](#SelfTradePreventionModeEnum) | EXPIRE_TAKER:expire taker order when STP triggers/ EXPIRE_MAKER:expire maker order when STP triggers/ EXPIRE_BOTH:expire both orders when STP triggers; Default EXPIRE_MAKER | [optional] | +|**selfTradePreventionMode** | [**SelfTradePreventionModeEnum**](#SelfTradePreventionModeEnum) | EXPIRE_TAKER: expire taker order when STP triggers/ EXPIRE_MAKER: expire maker order when STP triggers/ EXPIRE_BOTH: expire both orders when STP triggers; Default EXPIRE_MAKER | [optional] | diff --git a/clients/derivatives-trading-options/docs/PublicApi.md b/clients/derivatives-trading-options/docs/PublicApi.md index 451edd816..4cc6db067 100644 --- a/clients/derivatives-trading-options/docs/PublicApi.md +++ b/clients/derivatives-trading-options/docs/PublicApi.md @@ -265,7 +265,7 @@ No authorization required Trade Streams -The Trade Streams push raw trade information for specific symbol or underlying asset. E.g.[btcusdt@optionTrade](wss://fstream.binance.com/public/stream?streams=btcusdt@optionTrade) Update Speed: 50ms +The Trade Streams push raw trade information for specific symbol or underlying asset. E.g.btcusdt@optionTrade Update Speed: 50ms ### Example ```java diff --git a/clients/derivatives-trading-options/docs/TradeApi.md b/clients/derivatives-trading-options/docs/TradeApi.md index 3e33d1f4a..42e081aa7 100644 --- a/clients/derivatives-trading-options/docs/TradeApi.md +++ b/clients/derivatives-trading-options/docs/TradeApi.md @@ -26,7 +26,7 @@ All URIs are relative to *https://eapi.binance.com* Account Trade List (USER_DATA) -Get trades for a specific account and symbol. Weight(IP): 5 Security Type: USER_DATA +Get trades for a specific account and symbol. Only supports querying trades in the past 3 months; a `startTime`/`endTime` outside that window returns `-6073 SEARCH_WINDOW_RESTRICTED`. Weight(IP): 5 Security Type: USER_DATA ### Example ```java diff --git a/clients/derivatives-trading-options/docs/rest-api/migration-guide.md b/clients/derivatives-trading-options/docs/rest-api/migration-guide.md index 81354e8e5..ba7c861ac 100644 --- a/clients/derivatives-trading-options/docs/rest-api/migration-guide.md +++ b/clients/derivatives-trading-options/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-derivatives-trading-options - 9.0.0 + 9.0.2 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-derivatives-trading-options - 9.0.0 + 9.0.2 ``` diff --git a/clients/derivatives-trading-options/example_rest.md b/clients/derivatives-trading-options/example_rest.md index ff910fe77..6b2f7b26c 100644 --- a/clients/derivatives-trading-options/example_rest.md +++ b/clients/derivatives-trading-options/example_rest.md @@ -62,7 +62,7 @@ ## Trade -[GET /eapi/v1/userTrades](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#account-trade-list) - accountTradeList - [AccountTradeListExample.java:36](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/AccountTradeListExample.java#L36) +[GET /eapi/v1/userTrades](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#account-trade-list) - accountTradeList - [AccountTradeListExample.java:38](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/AccountTradeListExample.java#L38) [DELETE /eapi/v1/allOpenOrdersByUnderlying](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/rest-api/trade#cancel-all-option-orders-by-underlying) - cancelAllOptionOrdersByUnderlying - [CancelAllOptionOrdersByUnderlyingExample.java:36](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/CancelAllOptionOrdersByUnderlyingExample.java#L36) diff --git a/clients/derivatives-trading-options/example_websocket_stream.md b/clients/derivatives-trading-options/example_websocket_stream.md index e8b94d304..106929b90 100644 --- a/clients/derivatives-trading-options/example_websocket_stream.md +++ b/clients/derivatives-trading-options/example_websocket_stream.md @@ -6,9 +6,9 @@ [!optionSymbol](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/market#new-symbol-info) - newSymbolInfo - [NewSymbolInfoExample.java:31](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/NewSymbolInfoExample.java#L31) -[@openInterest@](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/market#open-interest) - openInterest - [OpenInterestExample.java:33](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OpenInterestExample.java#L33) +[@openInterest@](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/market#open-interest) - openInterest - [OpenInterestExample.java:32](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OpenInterestExample.java#L32) -[@optionMarkPrice](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/market#option-mark-price) - optionMarkPrice - [OptionMarkPriceExample.java:33](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OptionMarkPriceExample.java#L33) +[@optionMarkPrice](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/market#option-mark-price) - optionMarkPrice - [OptionMarkPriceExample.java:32](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OptionMarkPriceExample.java#L32) ## Public @@ -20,5 +20,5 @@ [@depth@](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/public#partial-book-depth-streams) - partialBookDepthStreams - [PartialBookDepthStreamsExample.java:32](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/PartialBookDepthStreamsExample.java#L32) -[@optionTrade](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/public#trade-streams) - tradeStreams - [TradeStreamsExample.java:33](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/TradeStreamsExample.java#L33) +[@optionTrade](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/public#trade-streams) - tradeStreams - [TradeStreamsExample.java:32](/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/TradeStreamsExample.java#L32) diff --git a/clients/derivatives-trading-options/pom.xml b/clients/derivatives-trading-options/pom.xml index 708cd2161..4af250925 100644 --- a/clients/derivatives-trading-options/pom.xml +++ b/clients/derivatives-trading-options/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-derivatives-trading-options derivatives-trading-options - 9.0.1 + 9.0.2 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/AccountApi.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/AccountApi.java index b7fc2fedb..71af19894 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/AccountApi.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/AccountApi.java @@ -44,7 +44,7 @@ public class AccountApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-options/9.0.1 (Java/%s; %s; %s)", + "binance-derivatives-trading-options/9.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/DerivativesTradingOptionsRestApi.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/DerivativesTradingOptionsRestApi.java index 87471e42f..c4053f647 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/DerivativesTradingOptionsRestApi.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/DerivativesTradingOptionsRestApi.java @@ -793,8 +793,10 @@ public ApiResponse setMarketMakerProtect } /** - * Account Trade List (USER_DATA) Get trades for a specific account and symbol. Weight(IP): 5 - * Security Type: USER_DATA + * Account Trade List (USER_DATA) Get trades for a specific account and symbol. Only supports + * querying trades in the past 3 months; a `startTime`/`endTime` outside + * that window returns `-6073 SEARCH_WINDOW_RESTRICTED`. Weight(IP): 5 Security Type: + * USER_DATA * * @param symbol Option trading pair. (required) * @param fromId Trade id to fetch from. Default gets most recent trades, e.g diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketDataApi.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketDataApi.java index 3ee2fe9ca..393867bad 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketDataApi.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketDataApi.java @@ -53,7 +53,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-options/9.0.1 (Java/%s; %s; %s)", + "binance-derivatives-trading-options/9.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerBlockTradeApi.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerBlockTradeApi.java index 31d19e364..394e2a4b6 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerBlockTradeApi.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerBlockTradeApi.java @@ -52,7 +52,7 @@ public class MarketMakerBlockTradeApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-options/9.0.1 (Java/%s; %s; %s)", + "binance-derivatives-trading-options/9.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerEndpointsApi.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerEndpointsApi.java index 589e53d4a..57addeea4 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerEndpointsApi.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/MarketMakerEndpointsApi.java @@ -53,7 +53,7 @@ public class MarketMakerEndpointsApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-options/9.0.1 (Java/%s; %s; %s)", + "binance-derivatives-trading-options/9.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/TradeApi.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/TradeApi.java index 1cbd42a4a..d02a3f19e 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/TradeApi.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/TradeApi.java @@ -63,7 +63,7 @@ public class TradeApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-options/9.0.1 (Java/%s; %s; %s)", + "binance-derivatives-trading-options/9.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -246,8 +246,10 @@ private okhttp3.Call accountTradeListValidateBeforeCall( } /** - * Account Trade List (USER_DATA) Get trades for a specific account and symbol. Weight(IP): 5 - * Security Type: USER_DATA + * Account Trade List (USER_DATA) Get trades for a specific account and symbol. Only supports + * querying trades in the past 3 months; a `startTime`/`endTime` outside + * that window returns `-6073 SEARCH_WINDOW_RESTRICTED`. Weight(IP): 5 Security Type: + * USER_DATA * * @param symbol Option trading pair. (required) * @param fromId Trade id to fetch from. Default gets most recent trades, e.g diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/UserDataStreamsApi.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/UserDataStreamsApi.java index 6943e0e3b..63a3e38c4 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/UserDataStreamsApi.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/api/UserDataStreamsApi.java @@ -42,7 +42,7 @@ public class UserDataStreamsApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-options/9.0.1 (Java/%s; %s; %s)", + "binance-derivatives-trading-options/9.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrdersInner.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrdersInner.java index 58e084989..a7050ffc2 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrdersInner.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/model/OrdersInner.java @@ -311,8 +311,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti private Boolean isMmp; /** - * EXPIRE_TAKER:expire taker order when STP triggers/ EXPIRE_MAKER:expire maker order when STP - * triggers/ EXPIRE_BOTH:expire both orders when STP triggers; Default EXPIRE_MAKER + * EXPIRE_TAKER: expire taker order when STP triggers/ EXPIRE_MAKER: expire maker order when STP + * triggers/ EXPIRE_BOTH: expire both orders when STP triggers; Default EXPIRE_MAKER */ @JsonAdapter(SelfTradePreventionModeEnum.Adapter.class) public enum SelfTradePreventionModeEnum { @@ -601,8 +601,8 @@ public OrdersInner selfTradePreventionMode( } /** - * EXPIRE_TAKER:expire taker order when STP triggers/ EXPIRE_MAKER:expire maker order when STP - * triggers/ EXPIRE_BOTH:expire both orders when STP triggers; Default EXPIRE_MAKER + * EXPIRE_TAKER: expire taker order when STP triggers/ EXPIRE_MAKER: expire maker order when STP + * triggers/ EXPIRE_BOTH: expire both orders when STP triggers; Default EXPIRE_MAKER * * @return selfTradePreventionMode */ diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/DerivativesTradingOptionsWebSocketStreams.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/DerivativesTradingOptionsWebSocketStreams.java index ef94407e6..4388171f9 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/DerivativesTradingOptionsWebSocketStreams.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/DerivativesTradingOptionsWebSocketStreams.java @@ -40,7 +40,7 @@ public class DerivativesTradingOptionsWebSocketStreams { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-options/9.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-options/9.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private WebSocketClientConfiguration clientConfiguration; diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/MarketApi.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/MarketApi.java index df8993b17..92dced776 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/MarketApi.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/MarketApi.java @@ -47,7 +47,7 @@ public class MarketApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-options/9.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-options/9.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private StreamConnectionInterface connection; @@ -320,8 +320,7 @@ private void newSymbolInfoValidateBeforeCall(NewSymbolInfoRequest newSymbolInfoR /** * Open Interest Option open interest for specific underlying asset on specific expiration date. - * E.g.[ethusdt@openInterest@221125](wss://fstream.binance.com/market/stream?streams=ethusdt@openInterest@221125) - * Update Speed: 60s + * E.g.ethusdt@openInterest@221125 Update Speed: 60s * * @param openInterestRequest (required) * @return OpenInterestResponse @@ -409,8 +408,7 @@ private void openInterestValidateBeforeCall(OpenInterestRequest openInterestRequ /** * Option Mark Price The mark price for all option symbols on specific underlying asset. - * E.g.[btcusdt@optionMarkPrice](wss://fstream.binance.com/market/stream?streams=btcusdt@optionMarkPrice) - * Update Speed: 1000ms + * E.g.btcusdt@optionMarkPrice Update Speed: 1000ms * * @param optionMarkPriceRequest (required) * @return OptionMarkPriceResponse diff --git a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/PublicApi.java b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/PublicApi.java index 1f6bc4032..89ebc63b4 100644 --- a/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/PublicApi.java +++ b/clients/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/api/PublicApi.java @@ -47,7 +47,7 @@ public class PublicApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-options/9.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-options/9.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private StreamConnectionInterface connection; @@ -442,9 +442,7 @@ private void partialBookDepthStreamsValidateBeforeCall( /** * Trade Streams The Trade Streams push raw trade information for specific symbol or underlying - * asset. - * E.g.[btcusdt@optionTrade](wss://fstream.binance.com/public/stream?streams=btcusdt@optionTrade) - * Update Speed: 50ms + * asset. E.g.btcusdt@optionTrade Update Speed: 50ms * * @param tradeStreamsRequest (required) * @return TradeStreamsResponse diff --git a/clients/derivatives-trading-portfolio-margin-pro/CHANGELOG.md b/clients/derivatives-trading-portfolio-margin-pro/CHANGELOG.md index ce988221f..987975145 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/CHANGELOG.md +++ b/clients/derivatives-trading-portfolio-margin-pro/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 8.0.2 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 8.0.1 - 2026-08-25 ### Changed (1) diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/AccountApi.md b/clients/derivatives-trading-portfolio-margin-pro/docs/AccountApi.md index 9091821cb..31064b6b8 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/AccountApi.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/AccountApi.md @@ -1108,7 +1108,7 @@ No authorization required Set Margin Call Level (USER_DATA) -Set the margin call level for a Portfolio Margin account. When the account's uniMMR drops to the specified level, a notification will be sent via email and SMS. Weight(IP): 1500 Security Type: USER_DATA +Set the margin call level for a Portfolio Margin account. When the account's uniMMR drops to the specified level, a notification will be sent via email and push/inbox. Weight(IP): 1500 Security Type: USER_DATA ### Example ```java diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/Risklevelchange.md b/clients/derivatives-trading-portfolio-margin-pro/docs/Risklevelchange.md index e53520a7a..571171d50 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/Risklevelchange.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/Risklevelchange.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**E** | **Long** | Event Time | [optional] | |**uLowerCase** | **String** | uniMMR level | [optional] | -|**sLowerCase** | **String** | Risk level: MARGIN_CALL, REDUCE_ONLY, FORCE_LIQUIDATION | [optional] | +|**sLowerCase** | **String** | Risk level: NORMAL, MARGIN_CALL, REDUCE_ONLY, FORCE_LIQUIDATION | [optional] | |**eq** | **String** | Account equity in USD value | [optional] | |**ae** | **String** | Actual equity without collateral rate in USD value | [optional] | |**mLowerCase** | **String** | Total maintenance margin in USD value | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/UserDataStreamEventsResponse.md b/clients/derivatives-trading-portfolio-margin-pro/docs/UserDataStreamEventsResponse.md index fcb14bb2d..f9c9f7652 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/UserDataStreamEventsResponse.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/UserDataStreamEventsResponse.md @@ -15,7 +15,7 @@ |**mm** | **String** | Total maintenance margin in USD | [optional] | |**avb** | **String** | Total available balance in USD | [optional] | |**vmw** | **String** | Virtual maxWithdraw amount in USD | [optional] | -|**sLowerCase** | **String** | Risk level: MARGIN_CALL, REDUCE_ONLY, FORCE_LIQUIDATION | [optional] | +|**sLowerCase** | **String** | Risk level: NORMAL, MARGIN_CALL, REDUCE_ONLY, FORCE_LIQUIDATION | [optional] | |**mLowerCase** | **String** | Total maintenance margin in USD value | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin-pro/docs/rest-api/migration-guide.md b/clients/derivatives-trading-portfolio-margin-pro/docs/rest-api/migration-guide.md index 4c5649575..991ca5763 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/docs/rest-api/migration-guide.md +++ b/clients/derivatives-trading-portfolio-margin-pro/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-derivatives-trading-portfolio-margin-pro - 8.0.0 + 8.0.2 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-derivatives-trading-portfolio-margin-pro - 8.0.0 + 8.0.2 ``` diff --git a/clients/derivatives-trading-portfolio-margin-pro/pom.xml b/clients/derivatives-trading-portfolio-margin-pro/pom.xml index 8ecd50eae..2cf806645 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/pom.xml +++ b/clients/derivatives-trading-portfolio-margin-pro/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-derivatives-trading-portfolio-margin-pro derivatives-trading-portfolio-margin-pro - 8.0.1 + 8.0.2 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/AccountApi.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/AccountApi.java index 6d0f636b1..ec22dc451 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/AccountApi.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/AccountApi.java @@ -73,7 +73,7 @@ public class AccountApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-portfolio-margin-pro/8.0.1 (Java/%s; %s; %s)", + "binance-derivatives-trading-portfolio-margin-pro/8.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -2726,7 +2726,7 @@ private okhttp3.Call setMarginCallLevelValidateBeforeCall( /** * Set Margin Call Level (USER_DATA) Set the margin call level for a Portfolio Margin account. * When the account's uniMMR drops to the specified level, a notification will be sent via - * email and SMS. Weight(IP): 1500 Security Type: USER_DATA + * email and push/inbox. Weight(IP): 1500 Security Type: USER_DATA * * @param setMarginCallLevelRequest (required) * @return ApiResponse<SetMarginCallLevelResponse> diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/DerivativesTradingPortfolioMarginProRestApi.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/DerivativesTradingPortfolioMarginProRestApi.java index 6d1321dc6..d8d2774ce 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/DerivativesTradingPortfolioMarginProRestApi.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/DerivativesTradingPortfolioMarginProRestApi.java @@ -501,7 +501,7 @@ public ApiResponse repayFuturesNegativeBala /** * Set Margin Call Level (USER_DATA) Set the margin call level for a Portfolio Margin account. * When the account's uniMMR drops to the specified level, a notification will be sent via - * email and SMS. Weight(IP): 1500 Security Type: USER_DATA + * email and push/inbox. Weight(IP): 1500 Security Type: USER_DATA * * @param setMarginCallLevelRequest (required) * @return ApiResponse<SetMarginCallLevelResponse> diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/MarketDataApi.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/MarketDataApi.java index 096bdde0d..fdf05cb5f 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/MarketDataApi.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/api/MarketDataApi.java @@ -45,7 +45,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-portfolio-margin-pro/8.0.1 (Java/%s; %s; %s)", + "binance-derivatives-trading-portfolio-margin-pro/8.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/api/DerivativesTradingPortfolioMarginProWebSocketStreams.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/api/DerivativesTradingPortfolioMarginProWebSocketStreams.java index e41ab8215..70fb4e8f6 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/api/DerivativesTradingPortfolioMarginProWebSocketStreams.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/api/DerivativesTradingPortfolioMarginProWebSocketStreams.java @@ -19,7 +19,7 @@ public class DerivativesTradingPortfolioMarginProWebSocketStreams { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-portfolio-margin-pro/8.0.1 (Java/%s; %s; %s)", + "binance-derivatives-trading-portfolio-margin-pro/8.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private final StreamConnectionInterface connection; diff --git a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/Risklevelchange.java b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/Risklevelchange.java index c83965b5a..31926cda4 100644 --- a/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/Risklevelchange.java +++ b/clients/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/websocket/stream/model/Risklevelchange.java @@ -121,7 +121,7 @@ public Risklevelchange sLowerCase(@jakarta.annotation.Nullable String sLowerCase } /** - * Risk level: MARGIN_CALL, REDUCE_ONLY, FORCE_LIQUIDATION + * Risk level: NORMAL, MARGIN_CALL, REDUCE_ONLY, FORCE_LIQUIDATION * * @return sLowerCase */ diff --git a/clients/derivatives-trading-portfolio-margin/CHANGELOG.md b/clients/derivatives-trading-portfolio-margin/CHANGELOG.md index 8568b6254..4f814d682 100644 --- a/clients/derivatives-trading-portfolio-margin/CHANGELOG.md +++ b/clients/derivatives-trading-portfolio-margin/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 8.0.1 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 8.0.0 - 2026-09-25 ### Changed (7) diff --git a/clients/derivatives-trading-portfolio-margin/docs/AccountApi.md b/clients/derivatives-trading-portfolio-margin/docs/AccountApi.md index 3445296a7..1944f7d84 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/AccountApi.md +++ b/clients/derivatives-trading-portfolio-margin/docs/AccountApi.md @@ -969,7 +969,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **symbol** | **String**| | [optional] | -| **incomeType** | [**IncomeType**](.md)| | [optional] [enum: TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, AUTO_EXCHANGE, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, POSITION_LIMIT_INCREASE_FEE] | +| **incomeType** | [**IncomeType**](.md)| | [optional] [enum: TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, POSITION_LIMIT_INCREASE_FEE] | | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | | **page** | **Long**| | [optional] | @@ -1693,7 +1693,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **symbol** | **String**| | [optional] | -| **incomeType** | [**IncomeType**](.md)| Income type. | [optional] [enum: TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, AUTO_EXCHANGE, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, POSITION_LIMIT_INCREASE_FEE] | +| **incomeType** | [**IncomeType**](.md)| Income type. | [optional] [enum: TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, POSITION_LIMIT_INCREASE_FEE] | | **startTime** | **Long**| Timestamp in ms to get funding from INCLUSIVE. | [optional] | | **endTime** | **Long**| Timestamp in ms to get funding until INCLUSIVE. | [optional] | | **page** | **Long**| Page number. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/AccountBalanceResponse1Inner.md b/clients/derivatives-trading-portfolio-margin/docs/AccountBalanceResponse1Inner.md index 1a3c9f671..80126a42b 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/AccountBalanceResponse1Inner.md +++ b/clients/derivatives-trading-portfolio-margin/docs/AccountBalanceResponse1Inner.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**asset** | **String** | asset name | [optional] | |**totalWalletBalance** | **String** | Total Wallet Balance. | [optional] | -|**crossMarginAsset** | **String** | Cross Margin Asset. | [optional] | +|**crossMarginAsset** | **String** | Cross Margin Asset. Equal to crossMarginFree + crossMarginLocked. | [optional] | |**crossMarginBorrowed** | **String** | Cross Margin Borrowed. | [optional] | |**crossMarginFree** | **String** | Cross Margin Free. | [optional] | |**crossMarginInterest** | **String** | Cross Margin Interest. | [optional] | diff --git a/clients/derivatives-trading-portfolio-margin/docs/IncomeType.md b/clients/derivatives-trading-portfolio-margin/docs/IncomeType.md index f5a3c915d..0fafcf4fa 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/IncomeType.md +++ b/clients/derivatives-trading-portfolio-margin/docs/IncomeType.md @@ -33,8 +33,6 @@ * `INTERNAL_TRANSFER` (value: `"INTERNAL_TRANSFER"`) -* `AUTO_EXCHANGE` (value: `"AUTO_EXCHANGE"`) - * `DELIVERED_SETTELMENT` (value: `"DELIVERED_SETTELMENT"`) * `COIN_SWAP_DEPOSIT` (value: `"COIN_SWAP_DEPOSIT"`) diff --git a/clients/derivatives-trading-portfolio-margin/docs/TradeApi.md b/clients/derivatives-trading-portfolio-margin/docs/TradeApi.md index 059660658..66bd8dfbe 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/TradeApi.md +++ b/clients/derivatives-trading-portfolio-margin/docs/TradeApi.md @@ -3464,7 +3464,7 @@ No authorization required Query User's Margin Force Orders (USER_DATA) -Query user's margin force orders > **Note:** Portfolio Margin accounts liquidated through the [Risk-Based Liquidation Adjustment](https://www.binance.com/en/support/faq/detail/662268636eb44b71af55c6c6a597d481) flow will not have any order or trade records returned by this endpoint. Query the capital flow endpoint instead: [Query Cross Isolated Margin Capital Flow](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-isolated-margin-capital-flow). Weight(IP): 1 Security Type: USER_DATA +Query user's margin force orders > **Note:** Portfolio Margin accounts liquidated through the Risk-Based Liquidation Adjustment flow will not have any order or trade records returned by this endpoint. Query the capital flow endpoint instead: Query Cross Isolated Margin Capital Flow. Weight(IP): 1 Security Type: USER_DATA ### Example ```java diff --git a/clients/derivatives-trading-portfolio-margin/docs/rest-api/migration-guide.md b/clients/derivatives-trading-portfolio-margin/docs/rest-api/migration-guide.md index ff7c74bda..d3a5dd614 100644 --- a/clients/derivatives-trading-portfolio-margin/docs/rest-api/migration-guide.md +++ b/clients/derivatives-trading-portfolio-margin/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-derivatives-trading-portfolio-margin - 8.0.0 + 8.0.1 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-derivatives-trading-portfolio-margin - 8.0.0 + 8.0.1 ``` diff --git a/clients/derivatives-trading-portfolio-margin/example_rest.md b/clients/derivatives-trading-portfolio-margin/example_rest.md index 2adf090c8..52bd18bcc 100644 --- a/clients/derivatives-trading-portfolio-margin/example_rest.md +++ b/clients/derivatives-trading-portfolio-margin/example_rest.md @@ -192,7 +192,7 @@ [GET /papi/v1/cm/forceOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-users-cm-force-orders) - queryUsersCmForceOrders - [QueryUsersCmForceOrdersExample.java:40](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersCmForceOrdersExample.java#L40) -[GET /papi/v1/margin/forceOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-users-margin-force-orders) - queryUsersMarginForceOrders - [QueryUsersMarginForceOrdersExample.java:42](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersMarginForceOrdersExample.java#L42) +[GET /papi/v1/margin/forceOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-users-margin-force-orders) - queryUsersMarginForceOrders - [QueryUsersMarginForceOrdersExample.java:39](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersMarginForceOrdersExample.java#L39) [GET /papi/v1/um/forceOrders](https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-users-um-force-orders) - queryUsersUmForceOrders - [QueryUsersUmForceOrdersExample.java:40](/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersUmForceOrdersExample.java#L40) diff --git a/clients/derivatives-trading-portfolio-margin/pom.xml b/clients/derivatives-trading-portfolio-margin/pom.xml index 9aea432e8..57274bebf 100644 --- a/clients/derivatives-trading-portfolio-margin/pom.xml +++ b/clients/derivatives-trading-portfolio-margin/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-derivatives-trading-portfolio-margin derivatives-trading-portfolio-margin - 8.0.0 + 8.0.1 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.2 + 2.5.3 \ No newline at end of file diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/AccountApi.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/AccountApi.java index af83ffdcf..add6d8f31 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/AccountApi.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/AccountApi.java @@ -96,7 +96,7 @@ public class AccountApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-portfolio-margin/8.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-portfolio-margin/8.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/DerivativesTradingPortfolioMarginRestApi.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/DerivativesTradingPortfolioMarginRestApi.java index 074f78b27..b75ac8e83 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/DerivativesTradingPortfolioMarginRestApi.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/DerivativesTradingPortfolioMarginRestApi.java @@ -2907,12 +2907,10 @@ public ApiResponse queryUsersCmForceOrders( /** * Query User's Margin Force Orders (USER_DATA) Query user's margin force orders > - * **Note:** Portfolio Margin accounts liquidated through the [Risk-Based Liquidation - * Adjustment](https://www.binance.com/en/support/faq/detail/662268636eb44b71af55c6c6a597d481) + * **Note:** Portfolio Margin accounts liquidated through the Risk-Based Liquidation Adjustment * flow will not have any order or trade records returned by this endpoint. Query the capital - * flow endpoint instead: [Query Cross Isolated Margin Capital - * Flow](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-isolated-margin-capital-flow). - * Weight(IP): 1 Security Type: USER_DATA + * flow endpoint instead: Query Cross Isolated Margin Capital Flow. Weight(IP): 1 Security Type: + * USER_DATA * * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/MarketDataApi.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/MarketDataApi.java index 48c800c40..3d6a8d29d 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/MarketDataApi.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/MarketDataApi.java @@ -40,7 +40,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-portfolio-margin/8.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-portfolio-margin/8.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/TradeApi.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/TradeApi.java index ed9cf7f7c..0b6787165 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/TradeApi.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/TradeApi.java @@ -113,7 +113,7 @@ public class TradeApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-portfolio-margin/8.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-portfolio-margin/8.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -9142,12 +9142,10 @@ private okhttp3.Call queryUsersMarginForceOrdersValidateBeforeCall( /** * Query User's Margin Force Orders (USER_DATA) Query user's margin force orders > - * **Note:** Portfolio Margin accounts liquidated through the [Risk-Based Liquidation - * Adjustment](https://www.binance.com/en/support/faq/detail/662268636eb44b71af55c6c6a597d481) + * **Note:** Portfolio Margin accounts liquidated through the Risk-Based Liquidation Adjustment * flow will not have any order or trade records returned by this endpoint. Query the capital - * flow endpoint instead: [Query Cross Isolated Margin Capital - * Flow](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-isolated-margin-capital-flow). - * Weight(IP): 1 Security Type: USER_DATA + * flow endpoint instead: Query Cross Isolated Margin Capital Flow. Weight(IP): 1 Security Type: + * USER_DATA * * @param startTime Timestamp in ms to get funding from INCLUSIVE. (optional) * @param endTime Timestamp in ms to get funding until INCLUSIVE. (optional) diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/UserDataStreamsApi.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/UserDataStreamsApi.java index 453ba0f8d..b35ea7d63 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/UserDataStreamsApi.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/api/UserDataStreamsApi.java @@ -42,7 +42,7 @@ public class UserDataStreamsApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-portfolio-margin/8.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-portfolio-margin/8.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountBalanceResponse1Inner.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountBalanceResponse1Inner.java index 45b9c1a4a..8818c7e77 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountBalanceResponse1Inner.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/AccountBalanceResponse1Inner.java @@ -162,7 +162,7 @@ public AccountBalanceResponse1Inner crossMarginAsset( } /** - * Cross Margin Asset. + * Cross Margin Asset. Equal to crossMarginFree + crossMarginLocked. * * @return crossMarginAsset */ diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/IncomeType.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/IncomeType.java index e5947d7e3..457f5209b 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/IncomeType.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/model/IncomeType.java @@ -52,8 +52,6 @@ public enum IncomeType { INTERNAL_TRANSFER("INTERNAL_TRANSFER"), - AUTO_EXCHANGE("AUTO_EXCHANGE"), - DELIVERED_SETTELMENT("DELIVERED_SETTELMENT"), COIN_SWAP_DEPOSIT("COIN_SWAP_DEPOSIT"), diff --git a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/api/DerivativesTradingPortfolioMarginWebSocketStreams.java b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/api/DerivativesTradingPortfolioMarginWebSocketStreams.java index 33bc0b877..da6e3cfe5 100644 --- a/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/api/DerivativesTradingPortfolioMarginWebSocketStreams.java +++ b/clients/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/websocket/stream/api/DerivativesTradingPortfolioMarginWebSocketStreams.java @@ -19,7 +19,7 @@ public class DerivativesTradingPortfolioMarginWebSocketStreams { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-portfolio-margin/8.0.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-portfolio-margin/8.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private final StreamConnectionInterface connection; diff --git a/clients/derivatives-trading-usds-futures/CHANGELOG.md b/clients/derivatives-trading-usds-futures/CHANGELOG.md index 780f9bed1..231a02760 100644 --- a/clients/derivatives-trading-usds-futures/CHANGELOG.md +++ b/clients/derivatives-trading-usds-futures/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 12.1.1 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 12.1.0 - 2026-09-21 ### Changed (5) diff --git a/clients/derivatives-trading-usds-futures/docs/rest-api/migration-guide.md b/clients/derivatives-trading-usds-futures/docs/rest-api/migration-guide.md index 6b1afe3a1..0c8b273a4 100644 --- a/clients/derivatives-trading-usds-futures/docs/rest-api/migration-guide.md +++ b/clients/derivatives-trading-usds-futures/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-derivatives-trading-usds-futures - 12.1.0 + 12.1.1 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-derivatives-trading-usds-futures - 12.1.0 + 12.1.1 ``` diff --git a/clients/derivatives-trading-usds-futures/example_rest.md b/clients/derivatives-trading-usds-futures/example_rest.md index 1f3487142..f4b59e5a1 100644 --- a/clients/derivatives-trading-usds-futures/example_rest.md +++ b/clients/derivatives-trading-usds-futures/example_rest.md @@ -10,7 +10,7 @@ [GET /fapi/v1/accountConfig](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#futures-account-configuration) - futuresAccountConfiguration - [FuturesAccountConfigurationExample.java:36](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesAccountConfigurationExample.java#L36) -[GET /fapi/v1/apiTradingStatus](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#futures-trading-quantitative-rules-indicators) - futuresTradingQuantitativeRulesIndicators - [FuturesTradingQuantitativeRulesIndicatorsExample.java:40](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesTradingQuantitativeRulesIndicatorsExample.java#L40) +[GET /fapi/v1/apiTradingStatus](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#futures-trading-quantitative-rules-indicators) - futuresTradingQuantitativeRulesIndicators - [FuturesTradingQuantitativeRulesIndicatorsExample.java:38](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesTradingQuantitativeRulesIndicatorsExample.java#L38) [GET /fapi/v1/feeBurn](https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/rest-api/account#get-bnb-burn-status) - getBnbBurnStatus - [GetBnbBurnStatusExample.java:37](/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/GetBnbBurnStatusExample.java#L37) diff --git a/clients/derivatives-trading-usds-futures/pom.xml b/clients/derivatives-trading-usds-futures/pom.xml index 70ee60f4b..5d30f66db 100644 --- a/clients/derivatives-trading-usds-futures/pom.xml +++ b/clients/derivatives-trading-usds-futures/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-derivatives-trading-usds-futures derivatives-trading-usds-futures - 12.1.0 + 12.1.1 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.2 + 2.5.3 \ No newline at end of file diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/AccountApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/AccountApi.java index 49de44901..77c36ce2d 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/AccountApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/AccountApi.java @@ -65,7 +65,7 @@ public class AccountApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-usds-futures/12.1.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-usds-futures/12.1.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -894,10 +894,9 @@ private okhttp3.Call futuresTradingQuantitativeRulesIndicatorsValidateBeforeCall /** * Futures Trading Quantitative Rules Indicators (USER_DATA) Futures trading quantitative rules - * indicators, for more information on this, please refer to the [Futures Trading Quantitative - * Rules](https://www.binance.com/en/support/faq/4f462ebe6ff445d4a170be7d9e897272) Weight: - - * **1** for a single symbol - **10** when the symbol parameter is omitted Security Type: - * USER_DATA + * indicators, for more information on this, please refer to the Futures Trading Quantitative + * Rules Weight: - **1** for a single symbol - **10** when the symbol parameter is omitted + * Security Type: USER_DATA * * @param symbol (optional) * @param recvWindow (optional) diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/ConvertApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/ConvertApi.java index b531794f6..6fdb373be 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/ConvertApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/ConvertApi.java @@ -49,7 +49,7 @@ public class ConvertApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-usds-futures/12.1.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-usds-futures/12.1.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/DerivativesTradingUsdsFuturesRestApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/DerivativesTradingUsdsFuturesRestApi.java index b015e722b..b3ae7d770 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/DerivativesTradingUsdsFuturesRestApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/DerivativesTradingUsdsFuturesRestApi.java @@ -268,10 +268,9 @@ public ApiResponse futuresAccountConfigurat /** * Futures Trading Quantitative Rules Indicators (USER_DATA) Futures trading quantitative rules - * indicators, for more information on this, please refer to the [Futures Trading Quantitative - * Rules](https://www.binance.com/en/support/faq/4f462ebe6ff445d4a170be7d9e897272) Weight: - - * **1** for a single symbol - **10** when the symbol parameter is omitted Security Type: - * USER_DATA + * indicators, for more information on this, please refer to the Futures Trading Quantitative + * Rules Weight: - **1** for a single symbol - **10** when the symbol parameter is omitted + * Security Type: USER_DATA * * @param symbol (optional) * @param recvWindow (optional) diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/MarketDataApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/MarketDataApi.java index 549e8074c..2d9491bad 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/MarketDataApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/MarketDataApi.java @@ -77,7 +77,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-usds-futures/12.1.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-usds-futures/12.1.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/PortfolioMarginEndpointsApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/PortfolioMarginEndpointsApi.java index f334e2c28..1a165bbdc 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/PortfolioMarginEndpointsApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/PortfolioMarginEndpointsApi.java @@ -42,7 +42,7 @@ public class PortfolioMarginEndpointsApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-usds-futures/12.1.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-usds-futures/12.1.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/TradeApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/TradeApi.java index a2bb69c95..defbbee5a 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/TradeApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/TradeApi.java @@ -92,7 +92,7 @@ public class TradeApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-usds-futures/12.1.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-usds-futures/12.1.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/UserDataStreamsApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/UserDataStreamsApi.java index 9fc82e70f..76f8498e8 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/UserDataStreamsApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/api/UserDataStreamsApi.java @@ -43,7 +43,7 @@ public class UserDataStreamsApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-usds-futures/12.1.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-usds-futures/12.1.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/DerivativesTradingUsdsFuturesWebSocketApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/DerivativesTradingUsdsFuturesWebSocketApi.java index 06edbdcfe..5191cd8fb 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/DerivativesTradingUsdsFuturesWebSocketApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/api/api/DerivativesTradingUsdsFuturesWebSocketApi.java @@ -50,7 +50,7 @@ public class DerivativesTradingUsdsFuturesWebSocketApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-usds-futures/12.1.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-usds-futures/12.1.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private final ConnectionInterface connection; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/DerivativesTradingUsdsFuturesWebSocketStreams.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/DerivativesTradingUsdsFuturesWebSocketStreams.java index 4cf98ae39..780debe9d 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/DerivativesTradingUsdsFuturesWebSocketStreams.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/DerivativesTradingUsdsFuturesWebSocketStreams.java @@ -60,7 +60,7 @@ public class DerivativesTradingUsdsFuturesWebSocketStreams { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-usds-futures/12.1.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-usds-futures/12.1.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private WebSocketClientConfiguration clientConfiguration; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/MarketApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/MarketApi.java index f36d1f5a5..5ccbfe095 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/MarketApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/MarketApi.java @@ -67,7 +67,7 @@ public class MarketApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-usds-futures/12.1.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-usds-futures/12.1.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private StreamConnectionInterface connection; diff --git a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/PublicApi.java b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/PublicApi.java index b2e0a89f4..ea18233a8 100644 --- a/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/PublicApi.java +++ b/clients/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/websocket/stream/api/PublicApi.java @@ -47,7 +47,7 @@ public class PublicApi { private static final String USER_AGENT = String.format( - "binance-derivatives-trading-usds-futures/12.1.0 (Java/%s; %s; %s)", + "binance-derivatives-trading-usds-futures/12.1.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private StreamConnectionInterface connection; diff --git a/clients/dual-investment/CHANGELOG.md b/clients/dual-investment/CHANGELOG.md index 9fbdd0bc0..44a52616b 100644 --- a/clients/dual-investment/CHANGELOG.md +++ b/clients/dual-investment/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 3.0.1 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 3.0.0 - 2026-07-29 ### Changed (6) diff --git a/clients/dual-investment/docs/rest-api/migration-guide.md b/clients/dual-investment/docs/rest-api/migration-guide.md index 3619bca1e..badd1d6d6 100644 --- a/clients/dual-investment/docs/rest-api/migration-guide.md +++ b/clients/dual-investment/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-dual-investment - 3.0.0 + 3.0.1 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-dual-investment - 3.0.0 + 3.0.1 ``` diff --git a/clients/dual-investment/pom.xml b/clients/dual-investment/pom.xml index 31f42b392..49a93421e 100644 --- a/clients/dual-investment/pom.xml +++ b/clients/dual-investment/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-dual-investment dual-investment - 3.0.0 + 3.0.1 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/api/MarketDataApi.java b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/api/MarketDataApi.java index 8754945e8..2f033719b 100644 --- a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/api/MarketDataApi.java +++ b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/api/MarketDataApi.java @@ -43,7 +43,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-dual-investment/3.0.0 (Java/%s; %s; %s)", + "binance-dual-investment/3.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/api/TradeApi.java b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/api/TradeApi.java index 36aabdff3..12867de83 100644 --- a/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/api/TradeApi.java +++ b/clients/dual-investment/src/main/java/com/binance/connector/client/dual_investment/rest/api/TradeApi.java @@ -50,7 +50,7 @@ public class TradeApi { private static final String USER_AGENT = String.format( - "binance-dual-investment/3.0.0 (Java/%s; %s; %s)", + "binance-dual-investment/3.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/fiat/CHANGELOG.md b/clients/fiat/CHANGELOG.md index 2d1197d48..df5f96f29 100644 --- a/clients/fiat/CHANGELOG.md +++ b/clients/fiat/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 3.0.2 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 3.0.1 - 2026-08-25 - Added `pix` to ApiPaymentMethod enum diff --git a/clients/fiat/docs/rest-api/migration-guide.md b/clients/fiat/docs/rest-api/migration-guide.md index 24e0b26d5..83835e71f 100644 --- a/clients/fiat/docs/rest-api/migration-guide.md +++ b/clients/fiat/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-fiat - 3.0.0 + 3.0.2 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-fiat - 3.0.0 + 3.0.2 ``` diff --git a/clients/fiat/pom.xml b/clients/fiat/pom.xml index f6f7ad91f..d623874e4 100644 --- a/clients/fiat/pom.xml +++ b/clients/fiat/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-fiat fiat - 3.0.1 + 3.0.2 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/api/DefaultApi.java b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/api/DefaultApi.java index 30d2f23dc..b787c6e7b 100644 --- a/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/api/DefaultApi.java +++ b/clients/fiat/src/main/java/com/binance/connector/client/fiat/rest/api/DefaultApi.java @@ -50,7 +50,7 @@ public class DefaultApi { private static final String USER_AGENT = String.format( - "binance-fiat/3.0.1 (Java/%s; %s; %s)", + "binance-fiat/3.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/gift-card/CHANGELOG.md b/clients/gift-card/CHANGELOG.md index ffdc2b883..3fa9029bb 100644 --- a/clients/gift-card/CHANGELOG.md +++ b/clients/gift-card/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2.0.1 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 2.0.0 - 2026-07-29 ### Changed (1) diff --git a/clients/gift-card/docs/MarketDataApi.md b/clients/gift-card/docs/MarketDataApi.md index e08884eb0..006c91450 100644 --- a/clients/gift-card/docs/MarketDataApi.md +++ b/clients/gift-card/docs/MarketDataApi.md @@ -18,7 +18,7 @@ All URIs are relative to *https://api.binance.com* Create a dual-token gift card (fixed value, discount feature) (TRADE) -* This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption. * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your funding wallet. * To get started with, please make sure: * You have a Binance account * You have passed KYB * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet * You need Enable Withdrawals for the API Key which requests this endpoint. Weight(IP): 1 Security Type: TRADE +* This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption. * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your Spot wallet. * To get started with, please make sure: * You have a Binance account * You have passed KYB * You have a sufficient balance(Gift Card amount and fee amount) in your Binance Spot wallet * You need Enable Withdrawals for the API Key which requests this endpoint. Weight(IP): 1 Security Type: TRADE ### Example ```java @@ -80,7 +80,7 @@ No authorization required Create a single-token gift card (USER_DATA) -This API is for creating a Binance Gift Card. To get started with, please make sure: * You have a Binance account * You have passed KYB * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet * You need `Enable Withdrawals` for the API Key which requests this endpoint. Weight(IP): 1 Security Type: USER_DATA +This API is for creating a Binance Gift Card. To get started with, please make sure: * You have a Binance account * You have passed KYB * You have a sufficient balance(Gift Card amount and fee amount) in your Binance Spot wallet * You need `Enable Withdrawals` for the API Key which requests this endpoint. Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -268,7 +268,7 @@ No authorization required Redeem a Binance Gift Card (USER_DATA) -This API is for redeeming a Binance Gift Card. Once redeemed, the coins will be deposited in your funding wallet. Weight(IP): 1 Security Type: USER_DATA Notes: - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`. - Sending `code` in encrypted format is more secure than plaintext. - To send encrypted `code`: - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`. - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`. - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day. +This API is for redeeming a Binance Gift Card. Once redeemed, the coins will be deposited in your Spot wallet. Weight(IP): 1 Security Type: USER_DATA Notes: - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`. - Sending `code` in encrypted format is more secure than plaintext. - To send encrypted `code`: - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`. - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`. - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day. ### Example ```java diff --git a/clients/gift-card/docs/rest-api/migration-guide.md b/clients/gift-card/docs/rest-api/migration-guide.md index e1c3943d5..7366cea97 100644 --- a/clients/gift-card/docs/rest-api/migration-guide.md +++ b/clients/gift-card/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-gift-card - 2.0.0 + 2.0.1 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-gift-card - 2.0.0 + 2.0.1 ``` diff --git a/clients/gift-card/pom.xml b/clients/gift-card/pom.xml index d168fb746..84f0e9e6d 100644 --- a/clients/gift-card/pom.xml +++ b/clients/gift-card/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-gift-card gift-card - 2.0.0 + 2.0.1 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/api/GiftCardRestApi.java b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/api/GiftCardRestApi.java index a63a3858a..e5e05891c 100644 --- a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/api/GiftCardRestApi.java +++ b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/api/GiftCardRestApi.java @@ -35,9 +35,9 @@ public GiftCardRestApi(ApiClient apiClient) { * This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable * to BTC equivalent to 100 USDT upon redemption. * Once successfully created, the amount of * baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from - * your funding wallet. * To get started with, please make sure: * You have a Binance account * - * You have passed KYB * You have a sufficient balance(Gift Card amount and fee amount) in your - * Binance funding wallet * You need Enable Withdrawals for the API Key which requests this + * your Spot wallet. * To get started with, please make sure: * You have a Binance account * You + * have passed KYB * You have a sufficient balance(Gift Card amount and fee amount) in your + * Binance Spot wallet * You need Enable Withdrawals for the API Key which requests this * endpoint. Weight(IP): 1 Security Type: TRADE * * @param createADualTokenGiftCardRequest (required) @@ -63,9 +63,9 @@ public ApiResponse createADualTokenGiftCard( /** * Create a single-token gift card (USER_DATA) This API is for creating a Binance Gift Card. To * get started with, please make sure: * You have a Binance account * You have passed KYB * You - * have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet * - * You need `Enable Withdrawals` for the API Key which requests this endpoint. - * Weight(IP): 1 Security Type: USER_DATA + * have a sufficient balance(Gift Card amount and fee amount) in your Binance Spot wallet * You + * need `Enable Withdrawals` for the API Key which requests this endpoint. Weight(IP): + * 1 Security Type: USER_DATA * * @param createASingleTokenGiftCardRequest (required) * @return ApiResponse<CreateASingleTokenGiftCardResponse> @@ -141,7 +141,7 @@ public ApiResponse fetchTokenLimit(String baseToken, Lo /** * Redeem a Binance Gift Card (USER_DATA) This API is for redeeming a Binance Gift Card. Once - * redeemed, the coins will be deposited in your funding wallet. Weight(IP): 1 Security Type: + * redeemed, the coins will be deposited in your Spot wallet. Weight(IP): 1 Security Type: * USER_DATA Notes: - Parameter `code` can be sent in two formats: * `Plaintext` and `Encrypted`. - Sending `code` in encrypted * format is more secure than plaintext. - To send encrypted `code`: - Fetch RSA diff --git a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/api/MarketDataApi.java b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/api/MarketDataApi.java index 8b7d55d04..537444b56 100644 --- a/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/api/MarketDataApi.java +++ b/clients/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/api/MarketDataApi.java @@ -52,7 +52,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-gift-card/2.0.0 (Java/%s; %s; %s)", + "binance-gift-card/2.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -224,9 +224,9 @@ private okhttp3.Call createADualTokenGiftCardValidateBeforeCall( * This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable * to BTC equivalent to 100 USDT upon redemption. * Once successfully created, the amount of * baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from - * your funding wallet. * To get started with, please make sure: * You have a Binance account * - * You have passed KYB * You have a sufficient balance(Gift Card amount and fee amount) in your - * Binance funding wallet * You need Enable Withdrawals for the API Key which requests this + * your Spot wallet. * To get started with, please make sure: * You have a Binance account * You + * have passed KYB * You have a sufficient balance(Gift Card amount and fee amount) in your + * Binance Spot wallet * You need Enable Withdrawals for the API Key which requests this * endpoint. Weight(IP): 1 Security Type: TRADE * * @param createADualTokenGiftCardRequest (required) @@ -382,9 +382,9 @@ private okhttp3.Call createASingleTokenGiftCardValidateBeforeCall( /** * Create a single-token gift card (USER_DATA) This API is for creating a Binance Gift Card. To * get started with, please make sure: * You have a Binance account * You have passed KYB * You - * have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet * - * You need `Enable Withdrawals` for the API Key which requests this endpoint. - * Weight(IP): 1 Security Type: USER_DATA + * have a sufficient balance(Gift Card amount and fee amount) in your Binance Spot wallet * You + * need `Enable Withdrawals` for the API Key which requests this endpoint. Weight(IP): + * 1 Security Type: USER_DATA * * @param createASingleTokenGiftCardRequest (required) * @return ApiResponse<CreateASingleTokenGiftCardResponse> @@ -808,7 +808,7 @@ private okhttp3.Call redeemABinanceGiftCardValidateBeforeCall( /** * Redeem a Binance Gift Card (USER_DATA) This API is for redeeming a Binance Gift Card. Once - * redeemed, the coins will be deposited in your funding wallet. Weight(IP): 1 Security Type: + * redeemed, the coins will be deposited in your Spot wallet. Weight(IP): 1 Security Type: * USER_DATA Notes: - Parameter `code` can be sent in two formats: * `Plaintext` and `Encrypted`. - Sending `code` in encrypted * format is more secure than plaintext. - To send encrypted `code`: - Fetch RSA diff --git a/clients/margin-trading/CHANGELOG.md b/clients/margin-trading/CHANGELOG.md index 0c206ca69..efd4f3a36 100644 --- a/clients/margin-trading/CHANGELOG.md +++ b/clients/margin-trading/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 7.0.4 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 7.0.3 - 2026-08-31 ### Changed (2) diff --git a/clients/margin-trading/docs/AccountApi.md b/clients/margin-trading/docs/AccountApi.md index 6c41ba125..e2f0f62f6 100644 --- a/clients/margin-trading/docs/AccountApi.md +++ b/clients/margin-trading/docs/AccountApi.md @@ -23,7 +23,7 @@ All URIs are relative to *https://api.binance.com* Adjust cross margin max leverage (USER_DATA) -Adjust cross margin max leverage Weight(UID): 3000, 1 times/min per IP Security Type: USER_DATA Notes: - The margin level need higher than the initial risk ratio of adjusted leverage, the initial risk ratio of 3x is 1.5 , the initial risk ratio of 5x is 1.25; The detail conditions on how to switch between Cross Margin Classic and Cross Margin Pro can refer to [the FAQ](https://www.binance.com/en/support/faq/how-to-activate-the-cross-margin-pro-mode-on-binance-e27786da05e743a694b8c625b3bc475d). +Adjust cross margin max leverage Weight(UID): 3000, 1 times/min per IP Security Type: USER_DATA Notes: - The margin level need higher than the initial risk ratio of adjusted leverage, the initial risk ratio of 3x is 1.5 , the initial risk ratio of 5x is 1.25; The detail conditions on how to switch between Cross Margin Classic and Cross Margin Pro can refer to the FAQ. ### Example ```java @@ -335,7 +335,7 @@ No authorization required Query Cross Isolated Margin Capital Flow (USER_DATA) -Query Cross Isolated Margin Capital Flow Weight(IP): 100 Security Type: USER_DATA Notes: - Only supports querying the data of the last 90 days - The time between startTime and endTime cannot be longer than 7 days. - If fromId is set, the data with id > fromId will be returned. Otherwise the latest data will be returned - To query isolated data, Symbol needs to be entered. +Query Cross Isolated Margin Capital Flow Weight(IP): 100 Security Type: USER_DATA Notes: - Only supports querying the data of the last 90 days - The time between startTime and endTime cannot be longer than 7 days. - If both startTime and endTime are omitted, the most recent 7 days are queried (endTime defaults to the current time, and startTime to the current time minus 7 days). - If startTime is provided without endTime, endTime defaults to startTime plus 7 days. - If endTime is provided without startTime, startTime defaults to endTime minus 7 days. - If fromId is set, the data with id > fromId within the queried time range will be returned. Otherwise the latest data within that range will be returned. fromId does not extend the time range; to retrieve older records, move startTime and endTime backwards in windows of up to 7 days. - To query isolated data, Symbol needs to be entered. ### Example ```java diff --git a/clients/margin-trading/docs/BorrowRepayApi.md b/clients/margin-trading/docs/BorrowRepayApi.md index 28eff05df..f4c0f4764 100644 --- a/clients/margin-trading/docs/BorrowRepayApi.md +++ b/clients/margin-trading/docs/BorrowRepayApi.md @@ -366,7 +366,7 @@ No authorization required Query Max Borrow (USER_DATA) -Query Max Borrow Weight(IP): 50 Security Type: USER_DATA Notes: - If isolatedSymbol is not sent, crossed margin data will be sent. - `borrowLimit` is also available from [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee) +Query Max Borrow Weight(IP): 50 Security Type: USER_DATA Notes: - If isolatedSymbol is not sent, crossed margin data will be sent. - `borrowLimit` is also available from https://www.binance.com/en/margin-fee ### Example ```java diff --git a/clients/margin-trading/docs/TradeApi.md b/clients/margin-trading/docs/TradeApi.md index c1e8b2b30..0ee4efca4 100644 --- a/clients/margin-trading/docs/TradeApi.md +++ b/clients/margin-trading/docs/TradeApi.md @@ -42,7 +42,7 @@ All URIs are relative to *https://api.binance.com* Create Special Key(Low-Latency Trading) (TRADE) -**Eligibility** - Binance Margin offers low-latency trading through a [special key](https://www.binance.com/en/support/faq/frequently-asked-questions-on-margin-special-api-key-3208663e900d4d2e9fec4140e1832f4e), available exclusively to users with VIP level 7 or higher. - If you are VIP level 6 or below, please contact your VIP manager for eligibility criterias. - All new Margin Special Key users are required to read, understand, and agree to the Margin Special Key Supplemental Product Terms at the master account level before creating a Margin Special Key. - Once signed at the master account level, the agreement applies to all sub-accounts. The master account and all sub-accounts (Cross Margin Classic and Portfolio Margin Pro) are authorized to create a Margin Special Key and are subject to the LiquidationLoan policy. For more information, please refer to [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e). **Supported Products:** - Cross Margin - Isolated Margin - Portfolio Margin Pro **Unsupported Products:** - Portfolio Margin We support several types of API keys: * Ed25519 (recommended) * HMAC * RSA We recommend to **use Ed25519 API keys** as it should provide the best performance and security out of all supported key types. We accept PKCS#8 (BEGIN PUBLIC KEY). For how to generate an RSA key pair to send API requests on Binance. Please refer to the document below [FAQ](https://www.binance.com/en/support/faq/how-to-generate-an-rsa-key-pair-to-send-api-requests-on-binance-2b79728f331e43079b27440d9d15c5db) . **How to use the Margin Special Key** - Use the below `sapi` endpoint to create your margin special API Key. - For accessing the Cross Margin account, do not send the `symbol` parameter. - For accessing the Isolated Margin account(s), pass the relevant `symbol` parameter in the API Key creation request. - Use the generated API Key (and Secret key, if applicable) to perform margin trading and listenKey generation via **Spot** REST API (`https://api.binance.com/api/v3/_*`) endpoints. Read [REST API](/products/spot/rest-api#signed-trade-and-user_data-endpoint-security) or [WebSocket API](/products/spot/web-socket-api#request-security) documentation to learn how to use different API keys You need to enable Permits “Enable Spot & Margin Trading” option for the API Key which requests this endpoint. Weight(UID): 1 Security Type: TRADE Response Notes: - Error Code Description - **UNSUPPORTED_OPERATION** : Portfolio Margin is an unsupported product, please change the account type to a supported margin product. - **Forbidden**: Cross Margin Pro accounts require additional agreements, please contact your relationship manager. +**Eligibility** - Binance Margin offers low-latency trading through a special key, available exclusively to users with VIP level 7 or higher. - If you are VIP level 6 or below, please contact your VIP manager for eligibility criterias. - All new Margin Special Key users are required to read, understand, and agree to the Margin Special Key Supplemental Product Terms at the master account level before creating a Margin Special Key. - Once signed at the master account level, the agreement applies to all sub-accounts. The master account and all sub-accounts (Cross Margin Classic and Portfolio Margin Pro) are authorized to create a Margin Special Key and are subject to the LiquidationLoan policy. For more information, please refer to FAQ. **Supported Products:** - Cross Margin - Isolated Margin - Portfolio Margin Pro **Unsupported Products:** - Portfolio Margin We support several types of API keys: * Ed25519 (recommended) * HMAC * RSA We recommend to **use Ed25519 API keys** as it should provide the best performance and security out of all supported key types. We accept PKCS#8 (BEGIN PUBLIC KEY). For how to generate an RSA key pair to send API requests on Binance. Please refer to the document below FAQ . **How to use the Margin Special Key** - Use the below `sapi` endpoint to create your margin special API Key. - For accessing the Cross Margin account, do not send the `symbol` parameter. - For accessing the Isolated Margin account(s), pass the relevant `symbol` parameter in the API Key creation request. - Use the generated API Key (and Secret key, if applicable) to perform margin trading and listenKey generation via **Spot** REST API (`https://api.binance.com/api/v3/_*`) endpoints. Read REST API or WebSocket API documentation to learn how to use different API keys You need to enable Permits “Enable Spot & Margin Trading” option for the API Key which requests this endpoint. Weight(UID): 1 Security Type: TRADE Response Notes: - Error Code Description - **UNSUPPORTED_OPERATION** : Portfolio Margin is an unsupported product, please change the account type to a supported margin product. - **Forbidden**: Cross Margin Pro accounts require additional agreements, please contact your relationship manager. ### Example ```java @@ -230,7 +230,7 @@ No authorization required Exit Special Key Mode (TRADE) -Exit the Margin Special Key mode for Cross Margin Classic accounts. **All outstanding liabilities under the Cross Margin Classic account must be fully repaid before calling this endpoint.** Deleting the Margin Special Key alone does not constitute a valid exit. When a user creates a Margin Special API Key, the account enters \"Special Key Mode\". Upon a successful request, the following actions will be performed atomically: 1. All existing Margin Special API Keys under the Cross Margin Classic mode account will be deleted. 2. All pre-execution margin checks (including Open-order-loss calculation) will revert to standard mode. 3. A cooldown period (default: 24 hours) will be enforced, during which the account will not be permitted to create new Margin Special API Keys. For more information, please refer to [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e). **Preconditions:** The following conditions must be met; otherwise the request will be rejected: - Account type must be **Cross Margin Classic**. - Account must currently be in **Special Key Mode**. If not, the request silently succeeds. - Account must **not be in liquidation**. - Account must **have no liability**. You need to enable \"Permits Enable Spot & Margin Trading\" option for the API Key which requests this endpoint. Weight(UID): 10 Security Type: TRADE +Exit the Margin Special Key mode for Cross Margin Classic accounts. **All outstanding liabilities under the Cross Margin Classic account must be fully repaid before calling this endpoint.** Deleting the Margin Special Key alone does not constitute a valid exit. When a user creates a Margin Special API Key, the account enters \"Special Key Mode\". Upon a successful request, the following actions will be performed atomically: 1. All existing Margin Special API Keys under the Cross Margin Classic mode account will be deleted. 2. All pre-execution margin checks (including Open-order-loss calculation) will revert to standard mode. 3. A cooldown period (default: 24 hours) will be enforced, during which the account will not be permitted to create new Margin Special API Keys. For more information, please refer to FAQ. **Preconditions:** The following conditions must be met; otherwise the request will be rejected: - Account type must be **Cross Margin Classic**. - Account must currently be in **Special Key Mode**. If not, the request silently succeeds. - Account must **not be in liquidation**. - Account must **have no liability**. You need to enable \"Permits Enable Spot & Margin Trading\" option for the API Key which requests this endpoint. Weight(UID): 10 Security Type: TRADE ### Example ```java @@ -954,7 +954,7 @@ No authorization required Margin Account New OTOCO (TRADE) -Post a new OTOCO order for margin account: - An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list comprised of 3 orders. - The first order is called the **working order** and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The behavior of the working order is the same as the OTO. - OTOCO has 2 pending orders (pending above and pending below), forming an OCO pair. The pending orders are only placed on the order book when the working order gets **fully filled**. - The rules of the pending above and pending below follow the same rules as the [Order List OCO](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oco). - OTOCOs add **3 orders** against the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` filter, and `MAX_NUM_ORDERS` filter. Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY Security Type: TRADE Notes: - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution - Depending on the `pendingAboveType`/`pendingBelowType` or `workingType`, some optional parameters will become mandatory: | Type | Additional mandatory parameters | Additional information | | ------------------------------------ | ------------------------------------------------------------ | ---------------------- | | `workingType` = `LIMIT` | `workingTimeInForce` | | | `pendingAboveType`= `LIMIT_MAKER` | `pendingAbovePrice` | | | `pendingAboveType`= `STOP_LOSS` | `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta` | | | `pendingAboveType`=`STOP_LOSS_LIMIT` | `pendingAbovePrice`, `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`, `pendingAboveTimeInForce` | | | `pendingBelowType`= `LIMIT_MAKER` | `pendingBelowPrice` | | | `pendingBelowType`= `STOP_LOSS` | `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta` | | | `pendingBelowType`=`STOP_LOSS_LIMIT` | `pendingBelowPrice`, `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta`, `pendingBelowTimeInForce` | | | `pendingAboveTrailingDelta` is provided | `pendingAbovePrice` | | | `pendingBelowTrailingDelta` is provided | `pendingBelowPrice` | | +Post a new OTOCO order for margin account: - An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list comprised of 3 orders. - The first order is called the **working order** and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The behavior of the working order is the same as the OTO. - OTOCO has 2 pending orders (pending above and pending below), forming an OCO pair. The pending orders are only placed on the order book when the working order gets **fully filled**. - The rules of the pending above and pending below follow the same rules as the Order List OCO. - OTOCOs add **3 orders** against the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` filter, and `MAX_NUM_ORDERS` filter. Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY Security Type: TRADE Notes: - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution - Depending on the `pendingAboveType`/`pendingBelowType` or `workingType`, some optional parameters will become mandatory: | Type | Additional mandatory parameters | Additional information | | ------------------------------------ | ------------------------------------------------------------ | ---------------------- | | `workingType` = `LIMIT` | `workingTimeInForce` | | | `pendingAboveType`= `LIMIT_MAKER` | `pendingAbovePrice` | | | `pendingAboveType`= `STOP_LOSS` | `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta` | | | `pendingAboveType`=`STOP_LOSS_LIMIT` | `pendingAbovePrice`, `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`, `pendingAboveTimeInForce` | | | `pendingBelowType`= `LIMIT_MAKER` | `pendingBelowPrice` | | | `pendingBelowType`= `STOP_LOSS` | `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta` | | | `pendingBelowType`=`STOP_LOSS_LIMIT` | `pendingBelowPrice`, `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta`, `pendingBelowTimeInForce` | | | `pendingAboveTrailingDelta` is provided | `pendingAbovePrice` | | | `pendingBelowTrailingDelta` is provided | `pendingBelowPrice` | | ### Example ```java diff --git a/clients/margin-trading/docs/rest-api/migration-guide.md b/clients/margin-trading/docs/rest-api/migration-guide.md index c1972fc80..9564e00ec 100644 --- a/clients/margin-trading/docs/rest-api/migration-guide.md +++ b/clients/margin-trading/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-margin-trading - 7.0.3 + 7.0.4 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-margin-trading - 7.0.3 + 7.0.4 ``` diff --git a/clients/margin-trading/example_rest.md b/clients/margin-trading/example_rest.md index c916eeda7..bb5733c67 100644 --- a/clients/margin-trading/example_rest.md +++ b/clients/margin-trading/example_rest.md @@ -1,6 +1,6 @@ ## Account -[POST /sapi/v1/margin/max-leverage](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#adjust-cross-margin-max-leverage) - adjustCrossMarginMaxLeverage - [AdjustCrossMarginMaxLeverageExample.java:42](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/AdjustCrossMarginMaxLeverageExample.java#L42) +[POST /sapi/v1/margin/max-leverage](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#adjust-cross-margin-max-leverage) - adjustCrossMarginMaxLeverage - [AdjustCrossMarginMaxLeverageExample.java:41](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/AdjustCrossMarginMaxLeverageExample.java#L41) [DELETE /sapi/v1/margin/isolated/account](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#disable-isolated-margin-account) - disableIsolatedMarginAccount - [DisableIsolatedMarginAccountExample.java:37](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/DisableIsolatedMarginAccountExample.java#L37) @@ -10,7 +10,7 @@ [GET /sapi/v1/margin/tradeCoeff](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#get-summary-of-margin-account) - getSummaryOfMarginAccount - [GetSummaryOfMarginAccountExample.java:36](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/GetSummaryOfMarginAccountExample.java#L36) -[GET /sapi/v1/margin/capital-flow](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-isolated-margin-capital-flow) - queryCrossIsolatedMarginCapitalFlow - [QueryCrossIsolatedMarginCapitalFlowExample.java:41](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossIsolatedMarginCapitalFlowExample.java#L41) +[GET /sapi/v1/margin/capital-flow](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-isolated-margin-capital-flow) - queryCrossIsolatedMarginCapitalFlow - [QueryCrossIsolatedMarginCapitalFlowExample.java:46](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossIsolatedMarginCapitalFlowExample.java#L46) [GET /sapi/v1/margin/account](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-margin-account-details) - queryCrossMarginAccountDetails - [QueryCrossMarginAccountDetailsExample.java:36](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossMarginAccountDetailsExample.java#L36) @@ -66,13 +66,13 @@ ## Trade -[POST /sapi/v1/margin/apiKey](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#create-special-key) - createSpecialKey - [CreateSpecialKeyExample.java:67](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/CreateSpecialKeyExample.java#L67) +[POST /sapi/v1/margin/apiKey](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#create-special-key) - createSpecialKey - [CreateSpecialKeyExample.java:62](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/CreateSpecialKeyExample.java#L62) [DELETE /sapi/v1/margin/apiKey](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#delete-special-key) - deleteSpecialKey - [DeleteSpecialKeyExample.java:43](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/DeleteSpecialKeyExample.java#L43) [PUT /sapi/v1/margin/apiKey/ip](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#edit-ip-for-special-key) - editIpForSpecialKey - [EditIpForSpecialKeyExample.java:37](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/EditIpForSpecialKeyExample.java#L37) -[POST /sapi/v1/margin/exit-special-key-mode](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#exit-special-key-mode) - exitSpecialKeyMode - [ExitSpecialKeyModeExample.java:52](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/ExitSpecialKeyModeExample.java#L52) +[POST /sapi/v1/margin/exit-special-key-mode](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#exit-special-key-mode) - exitSpecialKeyMode - [ExitSpecialKeyModeExample.java:50](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/ExitSpecialKeyModeExample.java#L50) [GET /sapi/v1/margin/forceLiquidationRec](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-force-liquidation-record) - getForceLiquidationRecord - [GetForceLiquidationRecordExample.java:37](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/GetForceLiquidationRecordExample.java#L37) @@ -94,7 +94,7 @@ [POST /sapi/v1/margin/order/oto](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oto) - marginAccountNewOto - [MarginAccountNewOtoExample.java:67](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOtoExample.java#L67) -[POST /sapi/v1/margin/order/otoco](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-otoco) - marginAccountNewOtoco - [MarginAccountNewOtocoExample.java:72](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOtocoExample.java#L72) +[POST /sapi/v1/margin/order/otoco](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-otoco) - marginAccountNewOtoco - [MarginAccountNewOtocoExample.java:70](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOtocoExample.java#L70) [POST /sapi/v1/margin/manual-liquidation](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-manual-liquidation) - marginManualLiquidation - [MarginManualLiquidationExample.java:40](/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginManualLiquidationExample.java#L40) diff --git a/clients/margin-trading/pom.xml b/clients/margin-trading/pom.xml index 4e783ba26..6c0c8b29d 100644 --- a/clients/margin-trading/pom.xml +++ b/clients/margin-trading/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-margin-trading margin-trading - 7.0.3 + 7.0.4 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/AccountApi.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/AccountApi.java index f6d2557bd..3c8ffafe0 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/AccountApi.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/AccountApi.java @@ -56,7 +56,7 @@ public class AccountApi { private static final String USER_AGENT = String.format( - "binance-margin-trading/7.0.3 (Java/%s; %s; %s)", + "binance-margin-trading/7.0.4 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -213,8 +213,7 @@ private okhttp3.Call adjustCrossMarginMaxLeverageValidateBeforeCall( * 3000, 1 times/min per IP Security Type: USER_DATA Notes: - The margin level need higher than * the initial risk ratio of adjusted leverage, the initial risk ratio of 3x is 1.5 , the * initial risk ratio of 5x is 1.25; The detail conditions on how to switch between Cross Margin - * Classic and Cross Margin Pro can refer to [the - * FAQ](https://www.binance.com/en/support/faq/how-to-activate-the-cross-margin-pro-mode-on-binance-e27786da05e743a694b8c625b3bc475d). + * Classic and Cross Margin Pro can refer to the FAQ. * * @param adjustCrossMarginMaxLeverageRequest (required) * @return ApiResponse<AdjustCrossMarginMaxLeverageResponse> @@ -977,9 +976,15 @@ private okhttp3.Call queryCrossIsolatedMarginCapitalFlowValidateBeforeCall( /** * Query Cross Isolated Margin Capital Flow (USER_DATA) Query Cross Isolated Margin Capital Flow * Weight(IP): 100 Security Type: USER_DATA Notes: - Only supports querying the data of the last - * 90 days - The time between startTime and endTime cannot be longer than 7 days. - If fromId is - * set, the data with id > fromId will be returned. Otherwise the latest data will be - * returned - To query isolated data, Symbol needs to be entered. + * 90 days - The time between startTime and endTime cannot be longer than 7 days. - If both + * startTime and endTime are omitted, the most recent 7 days are queried (endTime defaults to + * the current time, and startTime to the current time minus 7 days). - If startTime is provided + * without endTime, endTime defaults to startTime plus 7 days. - If endTime is provided without + * startTime, startTime defaults to endTime minus 7 days. - If fromId is set, the data with id + * > fromId within the queried time range will be returned. Otherwise the latest data within + * that range will be returned. fromId does not extend the time range; to retrieve older + * records, move startTime and endTime backwards in windows of up to 7 days. - To query isolated + * data, Symbol needs to be entered. * * @param asset (optional) * @param symbol Mandatory for Isolated data (optional) diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/BorrowRepayApi.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/BorrowRepayApi.java index a8450b1d7..b4e4c8504 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/BorrowRepayApi.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/BorrowRepayApi.java @@ -51,7 +51,7 @@ public class BorrowRepayApi { private static final String USER_AGENT = String.format( - "binance-margin-trading/7.0.3 (Java/%s; %s; %s)", + "binance-margin-trading/7.0.4 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -1180,8 +1180,7 @@ private okhttp3.Call queryMaxBorrowValidateBeforeCall( /** * Query Max Borrow (USER_DATA) Query Max Borrow Weight(IP): 50 Security Type: USER_DATA Notes: * - If isolatedSymbol is not sent, crossed margin data will be sent. - `borrowLimit` - * is also available from - * [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee) + * is also available from https://www.binance.com/en/margin-fee * * @param asset (required) * @param isolatedSymbol (optional) diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/MarginTradingRestApi.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/MarginTradingRestApi.java index 1e836a4b4..c646cb398 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/MarginTradingRestApi.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/MarginTradingRestApi.java @@ -108,8 +108,7 @@ public MarginTradingRestApi(ApiClient apiClient) { * 3000, 1 times/min per IP Security Type: USER_DATA Notes: - The margin level need higher than * the initial risk ratio of adjusted leverage, the initial risk ratio of 3x is 1.5 , the * initial risk ratio of 5x is 1.25; The detail conditions on how to switch between Cross Margin - * Classic and Cross Margin Pro can refer to [the - * FAQ](https://www.binance.com/en/support/faq/how-to-activate-the-cross-margin-pro-mode-on-binance-e27786da05e743a694b8c625b3bc475d). + * Classic and Cross Margin Pro can refer to the FAQ. * * @param adjustCrossMarginMaxLeverageRequest (required) * @return ApiResponse<AdjustCrossMarginMaxLeverageResponse> @@ -234,9 +233,15 @@ public ApiResponse getSummaryOfMarginAccount( /** * Query Cross Isolated Margin Capital Flow (USER_DATA) Query Cross Isolated Margin Capital Flow * Weight(IP): 100 Security Type: USER_DATA Notes: - Only supports querying the data of the last - * 90 days - The time between startTime and endTime cannot be longer than 7 days. - If fromId is - * set, the data with id > fromId will be returned. Otherwise the latest data will be - * returned - To query isolated data, Symbol needs to be entered. + * 90 days - The time between startTime and endTime cannot be longer than 7 days. - If both + * startTime and endTime are omitted, the most recent 7 days are queried (endTime defaults to + * the current time, and startTime to the current time minus 7 days). - If startTime is provided + * without endTime, endTime defaults to startTime plus 7 days. - If endTime is provided without + * startTime, startTime defaults to endTime minus 7 days. - If fromId is set, the data with id + * > fromId within the queried time range will be returned. Otherwise the latest data within + * that range will be returned. fromId does not extend the time range; to retrieve older + * records, move startTime and endTime backwards in windows of up to 7 days. - To query isolated + * data, Symbol needs to be entered. * * @param asset (optional) * @param symbol Mandatory for Isolated data (optional) @@ -601,8 +606,7 @@ public ApiResponse queryMarginInterestRa /** * Query Max Borrow (USER_DATA) Query Max Borrow Weight(IP): 50 Security Type: USER_DATA Notes: * - If isolatedSymbol is not sent, crossed margin data will be sent. - `borrowLimit` - * is also available from - * [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee) + * is also available from https://www.binance.com/en/margin-fee * * @param asset (required) * @param isolatedSymbol (optional) @@ -945,37 +949,31 @@ public ApiResponse queryMarginPriceindex(String s /** * Create Special Key(Low-Latency Trading) (TRADE) **Eligibility** - Binance Margin offers - * low-latency trading through a [special - * key](https://www.binance.com/en/support/faq/frequently-asked-questions-on-margin-special-api-key-3208663e900d4d2e9fec4140e1832f4e), - * available exclusively to users with VIP level 7 or higher. - If you are VIP level 6 or below, - * please contact your VIP manager for eligibility criterias. - All new Margin Special Key users - * are required to read, understand, and agree to the Margin Special Key Supplemental Product - * Terms at the master account level before creating a Margin Special Key. - Once signed at the - * master account level, the agreement applies to all sub-accounts. The master account and all - * sub-accounts (Cross Margin Classic and Portfolio Margin Pro) are authorized to create a - * Margin Special Key and are subject to the LiquidationLoan policy. For more information, - * please refer to - * [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e). - * **Supported Products:** - Cross Margin - Isolated Margin - Portfolio Margin Pro **Unsupported - * Products:** - Portfolio Margin We support several types of API keys: * Ed25519 (recommended) - * * HMAC * RSA We recommend to **use Ed25519 API keys** as it should provide the best - * performance and security out of all supported key types. We accept PKCS#8 (BEGIN PUBLIC KEY). - * For how to generate an RSA key pair to send API requests on Binance. Please refer to the - * document below - * [FAQ](https://www.binance.com/en/support/faq/how-to-generate-an-rsa-key-pair-to-send-api-requests-on-binance-2b79728f331e43079b27440d9d15c5db) - * . **How to use the Margin Special Key** - Use the below `sapi` endpoint to create - * your margin special API Key. - For accessing the Cross Margin account, do not send the + * low-latency trading through a special key, available exclusively to users with VIP level 7 or + * higher. - If you are VIP level 6 or below, please contact your VIP manager for eligibility + * criterias. - All new Margin Special Key users are required to read, understand, and agree to + * the Margin Special Key Supplemental Product Terms at the master account level before creating + * a Margin Special Key. - Once signed at the master account level, the agreement applies to all + * sub-accounts. The master account and all sub-accounts (Cross Margin Classic and Portfolio + * Margin Pro) are authorized to create a Margin Special Key and are subject to the + * LiquidationLoan policy. For more information, please refer to FAQ. **Supported Products:** - + * Cross Margin - Isolated Margin - Portfolio Margin Pro **Unsupported Products:** - Portfolio + * Margin We support several types of API keys: * Ed25519 (recommended) * HMAC * RSA We + * recommend to **use Ed25519 API keys** as it should provide the best performance and security + * out of all supported key types. We accept PKCS#8 (BEGIN PUBLIC KEY). For how to generate an + * RSA key pair to send API requests on Binance. Please refer to the document below FAQ . **How + * to use the Margin Special Key** - Use the below `sapi` endpoint to create your + * margin special API Key. - For accessing the Cross Margin account, do not send the * `symbol` parameter. - For accessing the Isolated Margin account(s), pass the * relevant `symbol` parameter in the API Key creation request. - Use the generated * API Key (and Secret key, if applicable) to perform margin trading and listenKey generation - * via **Spot** REST API (`https://api.binance.com/api/v3/_*`) endpoints. Read [REST - * API](/products/spot/rest-api#signed-trade-and-user_data-endpoint-security) or [WebSocket - * API](/products/spot/web-socket-api#request-security) documentation to learn how to use - * different API keys You need to enable Permits “Enable Spot & Margin Trading” option for - * the API Key which requests this endpoint. Weight(UID): 1 Security Type: TRADE Response Notes: - * - Error Code Description - **UNSUPPORTED_OPERATION** : Portfolio Margin is an unsupported - * product, please change the account type to a supported margin product. - **Forbidden**: Cross - * Margin Pro accounts require additional agreements, please contact your relationship manager. + * via **Spot** REST API (`https://api.binance.com/api/v3/_*`) endpoints. Read REST + * API or WebSocket API documentation to learn how to use different API keys You need to enable + * Permits “Enable Spot & Margin Trading” option for the API Key which requests this + * endpoint. Weight(UID): 1 Security Type: TRADE Response Notes: - Error Code Description - + * **UNSUPPORTED_OPERATION** : Portfolio Margin is an unsupported product, please change the + * account type to a supported margin product. - **Forbidden**: Cross Margin Pro accounts + * require additional agreements, please contact your relationship manager. * * @param createSpecialKeyRequest (required) * @return ApiResponse<CreateSpecialKeyResponse> @@ -1067,14 +1065,12 @@ public void editIpForSpecialKey(EditIpForSpecialKeyRequest editIpForSpecialKeyRe * mode account will be deleted. 2. All pre-execution margin checks (including Open-order-loss * calculation) will revert to standard mode. 3. A cooldown period (default: 24 hours) will be * enforced, during which the account will not be permitted to create new Margin Special API - * Keys. For more information, please refer to - * [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e). - * **Preconditions:** The following conditions must be met; otherwise the request will be - * rejected: - Account type must be **Cross Margin Classic**. - Account must currently be in - * **Special Key Mode**. If not, the request silently succeeds. - Account must **not be in - * liquidation**. - Account must **have no liability**. You need to enable \"Permits Enable - * Spot & Margin Trading\" option for the API Key which requests this endpoint. - * Weight(UID): 10 Security Type: TRADE + * Keys. For more information, please refer to FAQ. **Preconditions:** The following conditions + * must be met; otherwise the request will be rejected: - Account type must be **Cross Margin + * Classic**. - Account must currently be in **Special Key Mode**. If not, the request silently + * succeeds. - Account must **not be in liquidation**. - Account must **have no liability**. You + * need to enable \"Permits Enable Spot & Margin Trading\" option for the API Key + * which requests this endpoint. Weight(UID): 10 Security Type: TRADE * * @param exitSpecialKeyModeRequest (optional) * @return ApiResponse<Object> @@ -1423,16 +1419,14 @@ public ApiResponse marginAccountNewOto( * behavior of the working order is the same as the OTO. - OTOCO has 2 pending orders (pending * above and pending below), forming an OCO pair. The pending orders are only placed on the * order book when the working order gets **fully filled**. - The rules of the pending above and - * pending below follow the same rules as the [Order List - * OCO](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oco). - * - OTOCOs add **3 orders** against the unfilled order count, - * `EXCHANGE_MAX_NUM_ORDERS` filter, and `MAX_NUM_ORDERS` filter. Weight: - * 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY Security Type: - * TRADE Notes: - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid - * under high frequent new order/cancel order execution - Depending on the - * `pendingAboveType`/`pendingBelowType` or `workingType`, some - * optional parameters will become mandatory: | Type | Additional mandatory parameters | - * Additional information | | ------------------------------------ | + * pending below follow the same rules as the Order List OCO. - OTOCOs add **3 orders** against + * the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` filter, and + * `MAX_NUM_ORDERS` filter. Weight: 6(UID) or 1500(UID) when sideEffectType is + * MARGIN_BUY or AUTO_BORROW_REPAY Security Type: TRADE Notes: - autoRepayAtCancel is suggested + * to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order + * execution - Depending on the `pendingAboveType`/`pendingBelowType` or + * `workingType`, some optional parameters will become mandatory: | Type | Additional + * mandatory parameters | Additional information | | ------------------------------------ | * ------------------------------------------------------------ | ---------------------- | | * `workingType` = `LIMIT` | `workingTimeInForce` | | | * `pendingAboveType`= `LIMIT_MAKER` | `pendingAbovePrice` | diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/MarketDataApi.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/MarketDataApi.java index 2ddfa3f30..2b32814de 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/MarketDataApi.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/MarketDataApi.java @@ -55,7 +55,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-margin-trading/7.0.3 (Java/%s; %s; %s)", + "binance-margin-trading/7.0.4 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/TradeApi.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/TradeApi.java index e3cf819bc..9cab8e8dc 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/TradeApi.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/TradeApi.java @@ -80,7 +80,7 @@ public class TradeApi { private static final String USER_AGENT = String.format( - "binance-margin-trading/7.0.3 (Java/%s; %s; %s)", + "binance-margin-trading/7.0.4 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -248,37 +248,31 @@ private okhttp3.Call createSpecialKeyValidateBeforeCall( /** * Create Special Key(Low-Latency Trading) (TRADE) **Eligibility** - Binance Margin offers - * low-latency trading through a [special - * key](https://www.binance.com/en/support/faq/frequently-asked-questions-on-margin-special-api-key-3208663e900d4d2e9fec4140e1832f4e), - * available exclusively to users with VIP level 7 or higher. - If you are VIP level 6 or below, - * please contact your VIP manager for eligibility criterias. - All new Margin Special Key users - * are required to read, understand, and agree to the Margin Special Key Supplemental Product - * Terms at the master account level before creating a Margin Special Key. - Once signed at the - * master account level, the agreement applies to all sub-accounts. The master account and all - * sub-accounts (Cross Margin Classic and Portfolio Margin Pro) are authorized to create a - * Margin Special Key and are subject to the LiquidationLoan policy. For more information, - * please refer to - * [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e). - * **Supported Products:** - Cross Margin - Isolated Margin - Portfolio Margin Pro **Unsupported - * Products:** - Portfolio Margin We support several types of API keys: * Ed25519 (recommended) - * * HMAC * RSA We recommend to **use Ed25519 API keys** as it should provide the best - * performance and security out of all supported key types. We accept PKCS#8 (BEGIN PUBLIC KEY). - * For how to generate an RSA key pair to send API requests on Binance. Please refer to the - * document below - * [FAQ](https://www.binance.com/en/support/faq/how-to-generate-an-rsa-key-pair-to-send-api-requests-on-binance-2b79728f331e43079b27440d9d15c5db) - * . **How to use the Margin Special Key** - Use the below `sapi` endpoint to create - * your margin special API Key. - For accessing the Cross Margin account, do not send the + * low-latency trading through a special key, available exclusively to users with VIP level 7 or + * higher. - If you are VIP level 6 or below, please contact your VIP manager for eligibility + * criterias. - All new Margin Special Key users are required to read, understand, and agree to + * the Margin Special Key Supplemental Product Terms at the master account level before creating + * a Margin Special Key. - Once signed at the master account level, the agreement applies to all + * sub-accounts. The master account and all sub-accounts (Cross Margin Classic and Portfolio + * Margin Pro) are authorized to create a Margin Special Key and are subject to the + * LiquidationLoan policy. For more information, please refer to FAQ. **Supported Products:** - + * Cross Margin - Isolated Margin - Portfolio Margin Pro **Unsupported Products:** - Portfolio + * Margin We support several types of API keys: * Ed25519 (recommended) * HMAC * RSA We + * recommend to **use Ed25519 API keys** as it should provide the best performance and security + * out of all supported key types. We accept PKCS#8 (BEGIN PUBLIC KEY). For how to generate an + * RSA key pair to send API requests on Binance. Please refer to the document below FAQ . **How + * to use the Margin Special Key** - Use the below `sapi` endpoint to create your + * margin special API Key. - For accessing the Cross Margin account, do not send the * `symbol` parameter. - For accessing the Isolated Margin account(s), pass the * relevant `symbol` parameter in the API Key creation request. - Use the generated * API Key (and Secret key, if applicable) to perform margin trading and listenKey generation - * via **Spot** REST API (`https://api.binance.com/api/v3/_*`) endpoints. Read [REST - * API](/products/spot/rest-api#signed-trade-and-user_data-endpoint-security) or [WebSocket - * API](/products/spot/web-socket-api#request-security) documentation to learn how to use - * different API keys You need to enable Permits “Enable Spot & Margin Trading” option for - * the API Key which requests this endpoint. Weight(UID): 1 Security Type: TRADE Response Notes: - * - Error Code Description - **UNSUPPORTED_OPERATION** : Portfolio Margin is an unsupported - * product, please change the account type to a supported margin product. - **Forbidden**: Cross - * Margin Pro accounts require additional agreements, please contact your relationship manager. + * via **Spot** REST API (`https://api.binance.com/api/v3/_*`) endpoints. Read REST + * API or WebSocket API documentation to learn how to use different API keys You need to enable + * Permits “Enable Spot & Margin Trading” option for the API Key which requests this + * endpoint. Weight(UID): 1 Security Type: TRADE Response Notes: - Error Code Description - + * **UNSUPPORTED_OPERATION** : Portfolio Margin is an unsupported product, please change the + * account type to a supported margin product. - **Forbidden**: Cross Margin Pro accounts + * require additional agreements, please contact your relationship manager. * * @param createSpecialKeyRequest (required) * @return ApiResponse<CreateSpecialKeyResponse> @@ -725,14 +719,12 @@ private okhttp3.Call exitSpecialKeyModeValidateBeforeCall( * mode account will be deleted. 2. All pre-execution margin checks (including Open-order-loss * calculation) will revert to standard mode. 3. A cooldown period (default: 24 hours) will be * enforced, during which the account will not be permitted to create new Margin Special API - * Keys. For more information, please refer to - * [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e). - * **Preconditions:** The following conditions must be met; otherwise the request will be - * rejected: - Account type must be **Cross Margin Classic**. - Account must currently be in - * **Special Key Mode**. If not, the request silently succeeds. - Account must **not be in - * liquidation**. - Account must **have no liability**. You need to enable \"Permits Enable - * Spot & Margin Trading\" option for the API Key which requests this endpoint. - * Weight(UID): 10 Security Type: TRADE + * Keys. For more information, please refer to FAQ. **Preconditions:** The following conditions + * must be met; otherwise the request will be rejected: - Account type must be **Cross Margin + * Classic**. - Account must currently be in **Special Key Mode**. If not, the request silently + * succeeds. - Account must **not be in liquidation**. - Account must **have no liability**. You + * need to enable \"Permits Enable Spot & Margin Trading\" option for the API Key + * which requests this endpoint. Weight(UID): 10 Security Type: TRADE * * @param exitSpecialKeyModeRequest (optional) * @return ApiResponse<Object> @@ -3035,16 +3027,14 @@ private okhttp3.Call marginAccountNewOtocoValidateBeforeCall( * behavior of the working order is the same as the OTO. - OTOCO has 2 pending orders (pending * above and pending below), forming an OCO pair. The pending orders are only placed on the * order book when the working order gets **fully filled**. - The rules of the pending above and - * pending below follow the same rules as the [Order List - * OCO](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oco). - * - OTOCOs add **3 orders** against the unfilled order count, - * `EXCHANGE_MAX_NUM_ORDERS` filter, and `MAX_NUM_ORDERS` filter. Weight: - * 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY Security Type: - * TRADE Notes: - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid - * under high frequent new order/cancel order execution - Depending on the - * `pendingAboveType`/`pendingBelowType` or `workingType`, some - * optional parameters will become mandatory: | Type | Additional mandatory parameters | - * Additional information | | ------------------------------------ | + * pending below follow the same rules as the Order List OCO. - OTOCOs add **3 orders** against + * the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` filter, and + * `MAX_NUM_ORDERS` filter. Weight: 6(UID) or 1500(UID) when sideEffectType is + * MARGIN_BUY or AUTO_BORROW_REPAY Security Type: TRADE Notes: - autoRepayAtCancel is suggested + * to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order + * execution - Depending on the `pendingAboveType`/`pendingBelowType` or + * `workingType`, some optional parameters will become mandatory: | Type | Additional + * mandatory parameters | Additional information | | ------------------------------------ | * ------------------------------------------------------------ | ---------------------- | | * `workingType` = `LIMIT` | `workingTimeInForce` | | | * `pendingAboveType`= `LIMIT_MAKER` | `pendingAbovePrice` | diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/TransferApi.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/TransferApi.java index 59050ecfa..b9eb6286b 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/TransferApi.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/TransferApi.java @@ -44,7 +44,7 @@ public class TransferApi { private static final String USER_AGENT = String.format( - "binance-margin-trading/7.0.3 (Java/%s; %s; %s)", + "binance-margin-trading/7.0.4 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/UserDataStreamApi.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/UserDataStreamApi.java index 24dfbbb60..59a89adc7 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/UserDataStreamApi.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/api/UserDataStreamApi.java @@ -44,7 +44,7 @@ public class UserDataStreamApi { private static final String USER_AGENT = String.format( - "binance-margin-trading/7.0.3 (Java/%s; %s; %s)", + "binance-margin-trading/7.0.4 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/api/MarginTradingWebSocketStreams.java b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/api/MarginTradingWebSocketStreams.java index 22a081c35..3e07348e8 100644 --- a/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/api/MarginTradingWebSocketStreams.java +++ b/clients/margin-trading/src/main/java/com/binance/connector/client/margin_trading/websocket/stream/api/MarginTradingWebSocketStreams.java @@ -20,7 +20,7 @@ public class MarginTradingWebSocketStreams { private static final String USER_AGENT = String.format( - "binance-margin-trading/7.0.3 (Java/%s; %s; %s)", + "binance-margin-trading/7.0.4 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private final StreamConnectionInterface connection; diff --git a/clients/mining/CHANGELOG.md b/clients/mining/CHANGELOG.md index 23c48a765..159ae4b4b 100644 --- a/clients/mining/CHANGELOG.md +++ b/clients/mining/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 4.0.1 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 4.0.0 - 2026-07-29 ### Changed (1) diff --git a/clients/mining/docs/rest-api/migration-guide.md b/clients/mining/docs/rest-api/migration-guide.md index 7d3d766b1..6341280fd 100644 --- a/clients/mining/docs/rest-api/migration-guide.md +++ b/clients/mining/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-mining - 4.0.0 + 4.0.1 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-mining - 4.0.0 + 4.0.1 ``` diff --git a/clients/mining/pom.xml b/clients/mining/pom.xml index a844dfa9b..668d117a2 100644 --- a/clients/mining/pom.xml +++ b/clients/mining/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-mining mining - 4.0.0 + 4.0.1 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/api/DefaultApi.java b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/api/DefaultApi.java index fc485099d..df7cc53bf 100644 --- a/clients/mining/src/main/java/com/binance/connector/client/mining/rest/api/DefaultApi.java +++ b/clients/mining/src/main/java/com/binance/connector/client/mining/rest/api/DefaultApi.java @@ -57,7 +57,7 @@ public class DefaultApi { private static final String USER_AGENT = String.format( - "binance-mining/4.0.0 (Java/%s; %s; %s)", + "binance-mining/4.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/nft/CHANGELOG.md b/clients/nft/CHANGELOG.md deleted file mode 100644 index 9a88c2fba..000000000 --- a/clients/nft/CHANGELOG.md +++ /dev/null @@ -1,24 +0,0 @@ -# Changelog - -## 1.2.2 - 2026-04-30 - -- Update `binance/common` module to version `2.4.2`. - -## 1.2.1 - 2025-08-07 -- Update `binance/common` module to version `2.0.0`. -- Add `Content-Type` header only if there is a body. - -## 1.2.0 - 2025-07-08 - -- Update `binance/common` module to version `1.3.0`. -- Added `customHeaders` configuration. - -## 1.1.0 - 2025-05-02 - -- Update `binance/common` module to version `1.1.0`. -- Adding `proxyAuthenticator` support. -- URL Encode query params. - -## 1.0.0 - 2025-04-24 - -- Initial release \ No newline at end of file diff --git a/clients/nft/README.md b/clients/nft/README.md deleted file mode 100644 index aacda7ad4..000000000 --- a/clients/nft/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# Binance Java Nft Connector - -[![Open Issues](https://img.shields.io/github/issues/binance/binance-connector-java)](https://github.com/binance/binance-connector-java/issues) -[![Code Style: Spotless](https://img.shields.io/badge/code%20style-spotless-ff69b4)](https://github.com/diffplug/spotless) -[![Maven Central Version](https://img.shields.io/maven-central/v/io.github.binance/binance-nft)](https://central.sonatype.com/artifact/io.github.binance/binance-nft) -![Java Version](https://img.shields.io/badge/Java-%3E=11-brightgreen) -[![Known Vulnerabilities](https://snyk.io/test/github/binance/binance-connector-java/badge.svg)](https://snyk.io/test/github/binance/binance-connector-java) -[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) - -This is a client library for the Binance NFT API, enabling developers to interact programmatically with Binance's NFT trading platform. The library provides tools to launch and trade NFTs through the REST API: - -- [REST API](./src/main/java/com/binance/connector/client/nft/rest/api) - -## Table of Contents - -- [Supported Features](#supported-features) -- [Installation](#installation) -- [Documentation](#documentation) -- [REST APIs](#rest-apis) -- [Testing](#testing) -- [Migration Guide](#migration-guide) -- [Contributing](#contributing) -- [License](#license) - -## Supported Features - -- REST API Endpoints: - - `/sapi/v1/nft/*` -- Inclusion of test cases and examples for quick onboarding. - -## Installation - -To use this library, ensure your environment is running Java version **11** or newer. - -Then add dependency to pom.xml: - -```xml - - io.github.binance - binance-nft - 1.1.0 - -``` - -## Documentation - -For detailed information, refer to the [Binance API Documentation](https://developers.binance.com/docs/nft). - -### REST APIs - -All REST API endpoints are available through the [`rest`](./src/main/java/com/binance/connector/client/nft/rest) module. Note that some endpoints require authentication using your Binance API credentials. - -```java -import com.binance.connector.client.nft.rest.NftRestApiUtil; -import com.binance.connector.client.nft.rest.api.NftRestApi; -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.configuration.SignatureConfiguration; - -public static void main(String[] args) { - ClientConfiguration clientConfiguration = NftRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - NftRestApi api = new NftRestApi(clientConfiguration); -} -``` - -More examples can be found in the [`examples/rest`](./../../examples/nft/src/main/java/com/binance/connector/client/nft/rest) folder. - -#### Configuration Options - -The REST API supports the following advanced configuration options: - -- `proxy`: Proxy configuration for http client. -- `certificatePinner`: Certificate Pinner configuration for http client. -- `connectTimeout`: Timeout for requests in milliseconds (default: 1000 ms). -- `readTimeout`: Timeout for requests in milliseconds (default: 5000 ms). -- `compression`: Enable response compression (default: true). -- `retries`: Number of retry attempts for failed requests (default: 3). -- `backoff`: Delay in milliseconds between retries (default: 200 ms). -- `timeUnit`: TimeUnit to be returned by API (default MILLISECOND). -- `apiKey`: Binance API Key -- `secretKey`: Binance Secret Key, if using HMAC algorithm -- `privateKey`: RSA or ED25519 private key for authentication. -- `privateKeyPass`: Passphrase for the private key, if encrypted. - -##### Timeout - -You can configure a timeout for requests in milliseconds. If the request exceeds the specified timeout, it will be aborted. See the [Timeout example](./docs/rest-api/timeout.md) for detailed usage. - -##### Proxy - -The REST API supports HTTP/HTTPS proxy configurations. See the [Proxy example](./docs/rest-api/proxy.md) for detailed usage. - -##### Keep-Alive - -Enable HTTP keep-alive for persistent connections. See the [Keep-Alive example](./docs/rest-api/keepAlive.md) for detailed usage. - -##### Compression - -Enable or disable response compression. See the [Compression example](./docs/rest-api/compression.md) for detailed usage. - -##### Retries - -Configure the number of retry attempts and delay in milliseconds between retries for failed requests. See the [Retries example](./docs/rest-api/retries.md) for detailed usage. - -##### Key Pair Based Authentication - -The REST API supports key pair-based authentication for secure communication. You can use `RSA` or `ED25519` keys for signing requests. See the [Key Pair Based Authentication example](./docs/rest-api/key-pair-authentication.md) for detailed usage. - -##### Certificate Pinning - -To enhance security, you can use certificate pinning with the `httpsAgent` option in the configuration. This ensures the client only communicates with servers using specific certificates. See the [Certificate Pinning example](./docs/rest-api/certificate-pinning.md) for detailed usage. - -#### Error Handling - -The REST API provides detailed error types to help you handle issues effectively: - -- `ConnectorClientError`: General client error. - -See the [Error Handling example](./docs/rest-api/error-handling.md) for detailed usage. - -If `basePath` is not provided, it defaults to `https://api.binance.com`. - -## Testing - -To run the tests: - -```bash -mvn -f clients/pom.xml -pl nft test -``` - -The tests cover: - -- REST API endpoints -- Signature generation - -## Migration Guide - -If you are upgrading to the new modularized structure, refer to the [Migration Guide](./docs/rest-api/migration-guide.md) for detailed steps. - -## Contributing - -Contributions are welcome! - -Since this repository contains auto-generated code, we encourage you to start by opening a GitHub issue to discuss your ideas or suggest improvements. This helps ensure that changes align with the project's goals and auto-generation processes. - -To contribute: - -1. Open a GitHub issue describing your suggestion or the bug you've identified. -2. If it's determined that changes are necessary, the maintainers will merge the changes into the main branch. - -Please ensure that all tests pass if you're making a direct contribution. Submit a pull request only after discussing and confirming the change. - -Thank you for your contributions! - -## License - -This project is licensed under the MIT License. See the [LICENSE](../../LICENSE) file for details. \ No newline at end of file diff --git a/clients/nft/docs/GetNFTAssetResponse.md b/clients/nft/docs/GetNFTAssetResponse.md deleted file mode 100644 index 8c3d54b77..000000000 --- a/clients/nft/docs/GetNFTAssetResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# GetNFTAssetResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**total** | **Long** | | [optional] | -|**_list** | [**List<GetNFTAssetResponseListInner>**](GetNFTAssetResponseListInner.md) | | [optional] | - - - diff --git a/clients/nft/docs/GetNFTAssetResponseListInner.md b/clients/nft/docs/GetNFTAssetResponseListInner.md deleted file mode 100644 index 6bf1529dd..000000000 --- a/clients/nft/docs/GetNFTAssetResponseListInner.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# GetNFTAssetResponseListInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**network** | **String** | | [optional] | -|**contractAddress** | **String** | | [optional] | -|**tokenId** | **String** | | [optional] | - - - diff --git a/clients/nft/docs/GetNFTDepositHistoryResponse.md b/clients/nft/docs/GetNFTDepositHistoryResponse.md deleted file mode 100644 index 743318f73..000000000 --- a/clients/nft/docs/GetNFTDepositHistoryResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# GetNFTDepositHistoryResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**total** | **Long** | | [optional] | -|**_list** | [**List<GetNFTDepositHistoryResponseListInner>**](GetNFTDepositHistoryResponseListInner.md) | | [optional] | - - - diff --git a/clients/nft/docs/GetNFTDepositHistoryResponseListInner.md b/clients/nft/docs/GetNFTDepositHistoryResponseListInner.md deleted file mode 100644 index d5c168b96..000000000 --- a/clients/nft/docs/GetNFTDepositHistoryResponseListInner.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# GetNFTDepositHistoryResponseListInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**network** | **String** | | [optional] | -|**txID** | **String** | | [optional] | -|**contractAdrress** | **String** | | [optional] | -|**tokenId** | **String** | | [optional] | -|**timestamp** | **Long** | | [optional] | - - - diff --git a/clients/nft/docs/GetNFTTransactionHistoryResponse.md b/clients/nft/docs/GetNFTTransactionHistoryResponse.md deleted file mode 100644 index 45b46a2ac..000000000 --- a/clients/nft/docs/GetNFTTransactionHistoryResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# GetNFTTransactionHistoryResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**total** | **Long** | | [optional] | -|**_list** | [**List<GetNFTTransactionHistoryResponseListInner>**](GetNFTTransactionHistoryResponseListInner.md) | | [optional] | - - - diff --git a/clients/nft/docs/GetNFTTransactionHistoryResponseListInner.md b/clients/nft/docs/GetNFTTransactionHistoryResponseListInner.md deleted file mode 100644 index e5dae6797..000000000 --- a/clients/nft/docs/GetNFTTransactionHistoryResponseListInner.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# GetNFTTransactionHistoryResponseListInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**orderNo** | **String** | | [optional] | -|**tokens** | [**List<GetNFTTransactionHistoryResponseListInnerTokensInner>**](GetNFTTransactionHistoryResponseListInnerTokensInner.md) | | [optional] | -|**tradeTime** | **Long** | | [optional] | -|**tradeAmount** | **String** | | [optional] | -|**tradeCurrency** | **String** | | [optional] | - - - diff --git a/clients/nft/docs/GetNFTTransactionHistoryResponseListInnerTokensInner.md b/clients/nft/docs/GetNFTTransactionHistoryResponseListInnerTokensInner.md deleted file mode 100644 index bcd1a15f9..000000000 --- a/clients/nft/docs/GetNFTTransactionHistoryResponseListInnerTokensInner.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# GetNFTTransactionHistoryResponseListInnerTokensInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**network** | **String** | | [optional] | -|**tokenId** | **String** | | [optional] | -|**contractAddress** | **String** | | [optional] | - - - diff --git a/clients/nft/docs/GetNFTWithdrawHistoryResponse.md b/clients/nft/docs/GetNFTWithdrawHistoryResponse.md deleted file mode 100644 index 73280c60c..000000000 --- a/clients/nft/docs/GetNFTWithdrawHistoryResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# GetNFTWithdrawHistoryResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**total** | **Long** | | [optional] | -|**_list** | [**List<GetNFTWithdrawHistoryResponseListInner>**](GetNFTWithdrawHistoryResponseListInner.md) | | [optional] | - - - diff --git a/clients/nft/docs/GetNFTWithdrawHistoryResponseListInner.md b/clients/nft/docs/GetNFTWithdrawHistoryResponseListInner.md deleted file mode 100644 index 9733412b6..000000000 --- a/clients/nft/docs/GetNFTWithdrawHistoryResponseListInner.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# GetNFTWithdrawHistoryResponseListInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**network** | **String** | | [optional] | -|**txID** | **String** | | [optional] | -|**contractAdrress** | **String** | | [optional] | -|**tokenId** | **String** | | [optional] | -|**timestamp** | **Long** | | [optional] | -|**fee** | **Double** | | [optional] | -|**feeAsset** | **String** | | [optional] | - - - diff --git a/clients/nft/docs/NftApi.md b/clients/nft/docs/NftApi.md deleted file mode 100644 index 0fe54d1fd..000000000 --- a/clients/nft/docs/NftApi.md +++ /dev/null @@ -1,290 +0,0 @@ -# NftApi - -All URIs are relative to *https://api.binance.com* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**getNFTAsset**](NftApi.md#getNFTAsset) | **GET** /sapi/v1/nft/user/getAsset | Get NFT Asset(USER_DATA) | -| [**getNFTDepositHistory**](NftApi.md#getNFTDepositHistory) | **GET** /sapi/v1/nft/history/deposit | Get NFT Deposit History(USER_DATA) | -| [**getNFTTransactionHistory**](NftApi.md#getNFTTransactionHistory) | **GET** /sapi/v1/nft/history/transactions | Get NFT Transaction History(USER_DATA) | -| [**getNFTWithdrawHistory**](NftApi.md#getNFTWithdrawHistory) | **GET** /sapi/v1/nft/history/withdraw | Get NFT Withdraw History(USER_DATA) | - - - -# **getNFTAsset** -> GetNFTAssetResponse getNFTAsset(limit, page, recvWindow) - -Get NFT Asset(USER_DATA) - -Get NFT Asset Weight: 3000 - -### Example -```java -// Import classes: -import com.binance.connector.client.nft.ApiClient; -import com.binance.connector.client.nft.ApiException; -import com.binance.connector.client.nft.Configuration; -import com.binance.connector.client.nft.models.*; -import com.binance.connector.client.nft.rest.api.NftApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - NftApi apiInstance = new NftApi(defaultClient); - Long limit = 56L; // Long | Default 50, Max 50 - Long page = 56L; // Long | Default 1 - Long recvWindow = 56L; // Long | - try { - GetNFTAssetResponse result = apiInstance.getNFTAsset(limit, page, recvWindow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NftApi#getNFTAsset"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **limit** | **Long**| Default 50, Max 50 | [optional] | -| **page** | **Long**| Default 1 | [optional] | -| **recvWindow** | **Long**| | [optional] | - -### Return type - -[**GetNFTAssetResponse**](GetNFTAssetResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Get NFT Asset | - | - - -# **getNFTDepositHistory** -> GetNFTDepositHistoryResponse getNFTDepositHistory(startTime, endTime, limit, page, recvWindow) - -Get NFT Deposit History(USER_DATA) - -et NFT Deposit History * The max interval between startTime and endTime is 90 days. * If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight: 3000 - -### Example -```java -// Import classes: -import com.binance.connector.client.nft.ApiClient; -import com.binance.connector.client.nft.ApiException; -import com.binance.connector.client.nft.Configuration; -import com.binance.connector.client.nft.models.*; -import com.binance.connector.client.nft.rest.api.NftApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - NftApi apiInstance = new NftApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long limit = 56L; // Long | Default 50, Max 50 - Long page = 56L; // Long | Default 1 - Long recvWindow = 56L; // Long | - try { - GetNFTDepositHistoryResponse result = apiInstance.getNFTDepositHistory(startTime, endTime, limit, page, recvWindow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NftApi#getNFTDepositHistory"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | -| **limit** | **Long**| Default 50, Max 50 | [optional] | -| **page** | **Long**| Default 1 | [optional] | -| **recvWindow** | **Long**| | [optional] | - -### Return type - -[**GetNFTDepositHistoryResponse**](GetNFTDepositHistoryResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Get NFT Deposit History | - | - - -# **getNFTTransactionHistory** -> GetNFTTransactionHistoryResponse getNFTTransactionHistory(orderType, startTime, endTime, limit, page, recvWindow) - -Get NFT Transaction History(USER_DATA) - -Get NFT Transaction History * The max interval between startTime and endTime is 90 days. * If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight: 3000 - -### Example -```java -// Import classes: -import com.binance.connector.client.nft.ApiClient; -import com.binance.connector.client.nft.ApiException; -import com.binance.connector.client.nft.Configuration; -import com.binance.connector.client.nft.models.*; -import com.binance.connector.client.nft.rest.api.NftApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - NftApi apiInstance = new NftApi(defaultClient); - Long orderType = 56L; // Long | 0: purchase order, 1: sell order, 2: royalty income, 3: primary market order, 4: mint fee - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long limit = 56L; // Long | Default 50, Max 50 - Long page = 56L; // Long | Default 1 - Long recvWindow = 56L; // Long | - try { - GetNFTTransactionHistoryResponse result = apiInstance.getNFTTransactionHistory(orderType, startTime, endTime, limit, page, recvWindow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NftApi#getNFTTransactionHistory"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **orderType** | **Long**| 0: purchase order, 1: sell order, 2: royalty income, 3: primary market order, 4: mint fee | | -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | -| **limit** | **Long**| Default 50, Max 50 | [optional] | -| **page** | **Long**| Default 1 | [optional] | -| **recvWindow** | **Long**| | [optional] | - -### Return type - -[**GetNFTTransactionHistoryResponse**](GetNFTTransactionHistoryResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Get NFT Transaction History | - | - - -# **getNFTWithdrawHistory** -> GetNFTWithdrawHistoryResponse getNFTWithdrawHistory(startTime, endTime, limit, page, recvWindow) - -Get NFT Withdraw History(USER_DATA) - -Get NFT Withdraw History * The max interval between startTime and endTime is 90 days. * If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight: 3000 - -### Example -```java -// Import classes: -import com.binance.connector.client.nft.ApiClient; -import com.binance.connector.client.nft.ApiException; -import com.binance.connector.client.nft.Configuration; -import com.binance.connector.client.nft.models.*; -import com.binance.connector.client.nft.rest.api.NftApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.binance.com"); - - NftApi apiInstance = new NftApi(defaultClient); - Long startTime = 56L; // Long | - Long endTime = 56L; // Long | - Long limit = 56L; // Long | Default 50, Max 50 - Long page = 56L; // Long | Default 1 - Long recvWindow = 56L; // Long | - try { - GetNFTWithdrawHistoryResponse result = apiInstance.getNFTWithdrawHistory(startTime, endTime, limit, page, recvWindow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NftApi#getNFTWithdrawHistory"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **startTime** | **Long**| | [optional] | -| **endTime** | **Long**| | [optional] | -| **limit** | **Long**| Default 50, Max 50 | [optional] | -| **page** | **Long**| Default 1 | [optional] | -| **recvWindow** | **Long**| | [optional] | - -### Return type - -[**GetNFTWithdrawHistoryResponse**](GetNFTWithdrawHistoryResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Get NFT Withdraw History | - | - diff --git a/clients/nft/docs/rest-api/certificate-pinning.md b/clients/nft/docs/rest-api/certificate-pinning.md deleted file mode 100644 index e193eec11..000000000 --- a/clients/nft/docs/rest-api/certificate-pinning.md +++ /dev/null @@ -1,31 +0,0 @@ -# Certificate Pinning -```java - import com.binance.connector.client.nft.rest.NftRestApiUtil; - import com.binance.connector.client.nft.rest.api.NftRestApi; - import com.binance.connector.client.common.ApiException; - import com.binance.connector.client.common.ApiResponse; - import com.binance.connector.client.common.configuration.ClientConfiguration; - import com.binance.connector.client.common.configuration.SignatureConfiguration; - - // Expected pinned public key (SPKI SHA-256 hash) - // You can extract it from the certificate using openssl: - // openssl s_client -connect your-api.com:443 /dev/null | openssl x509 -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | base64 - public static final String PINNED_PUBLIC_KEY = "YOUR-PINNED-PUBLIC-KEY"; - - - public static void main(String[] args) { - ClientConfiguration clientConfiguration = NftRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - - CertificatePinner certificatePinner = new CertificatePinner.Builder() - .add("your-api.com", PINNED_PUBLIC_KEY) - .build(); - - clientConfiguration.setCertificatePinner(certificatePinner); - - NftRestApi api = new NftRestApi(clientConfiguration); - } -``` \ No newline at end of file diff --git a/clients/nft/docs/rest-api/compression.md b/clients/nft/docs/rest-api/compression.md deleted file mode 100644 index cfc31f5ff..000000000 --- a/clients/nft/docs/rest-api/compression.md +++ /dev/null @@ -1,20 +0,0 @@ -# Compression Configuration - -```java - import com.binance.connector.client.nft.rest.NftRestApiUtil; - import com.binance.connector.client.nft.rest.api.NftRestApi; - import com.binance.connector.client.common.ApiException; - import com.binance.connector.client.common.ApiResponse; - import com.binance.connector.client.common.configuration.ClientConfiguration; - import com.binance.connector.client.common.configuration.SignatureConfiguration; - - public static void main(String[] args) { - ClientConfiguration clientConfiguration = NftRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - clientConfiguration.setCompression(false); //disable compression - NftRestApi api = new NftRestApi(clientConfiguration); - } -``` \ No newline at end of file diff --git a/clients/nft/docs/rest-api/error-handling.md b/clients/nft/docs/rest-api/error-handling.md deleted file mode 100644 index 5e157c5fd..000000000 --- a/clients/nft/docs/rest-api/error-handling.md +++ /dev/null @@ -1,17 +0,0 @@ -# Error Handling - -```java - String symbol = "BNBUSDT"; - try { - ApiResponse response = getApi().accountCommission(symbol); - System.out.println(response.getData()); - } catch (ApiException exception) { - // get http code - int httpCode = exception.getCode(); - // get error message - String message = exception.getMessage(); - // headers are in lowercase - List retryafter = exception.getResponseHeaders().get("retry-after"); - System.out.println(retryafter); - } -``` \ No newline at end of file diff --git a/clients/nft/docs/rest-api/key-pair-authentication.md b/clients/nft/docs/rest-api/key-pair-authentication.md deleted file mode 100644 index ddc487dce..000000000 --- a/clients/nft/docs/rest-api/key-pair-authentication.md +++ /dev/null @@ -1,20 +0,0 @@ -# Key Pair Based Authentication - -```java - import com.binance.connector.client.nft.rest.NftRestApiUtil; - import com.binance.connector.client.nft.rest.api.NftRestApi; - import com.binance.connector.client.common.ApiException; - import com.binance.connector.client.common.ApiResponse; - import com.binance.connector.client.common.configuration.ClientConfiguration; - import com.binance.connector.client.common.configuration.SignatureConfiguration; - - public static void main(String[] args) { - ClientConfiguration clientConfiguration = NftRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); // Provide the private key directly as a string or specify the path to a private key file (e.g., '/path/to/private_key.pem') - signatureConfiguration.setPrivateKeyPass("your_passphrase"); // Optional: Required if the private key is encrypted - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - NftRestApi api = new NftRestApi(clientConfiguration); - } -``` \ No newline at end of file diff --git a/clients/nft/docs/rest-api/migration-guide.md b/clients/nft/docs/rest-api/migration-guide.md deleted file mode 100644 index bc3837234..000000000 --- a/clients/nft/docs/rest-api/migration-guide.md +++ /dev/null @@ -1,144 +0,0 @@ -# Migration Guide: Binance Nft Connector Modularization - -With the transition to a modularized structure, the Binance Connector has been split into separate NPM libraries, each focusing on a distinct product (e.g., Auto Invest, Futures, etc.). - ---- - -## Key Changes - -1. **Package Name**: - The modularised Nft Connector has been moved to a new package: - - **Old:** -```xml - - io.github.binance - binance-connector-java - 3.0.5 - -``` - **New:** -```xml - - io.github.binance - binance-nft - 1.2.1 - -``` - -2**Imports**: - Update your import paths. - - **Old:** - -```java -import com.binance.connector.client.SpotClient; -``` - - **New:** - -```java -import com.binance.connector.client.nft.rest.api.NftRestApi; -``` - -4. **Configuration and Client Initialization**: - The new structure keeps the existing configuration options but modularized clients into `NftRestApi`. - - **Old:** - -```java -SpotClient client = new SpotClientImpl(PrivateConfig.API_KEY, PrivateConfig.SECRET_KEY); -String result = client.(parameters); -System.out.println(result); -``` - - - **New:** - -```java - ClientConfiguration clientConfiguration = AlgoRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - - NftRestApi api = new NftRestApi(clientConfiguration); -``` - -5. **Examples and Documentation**: - Updated examples can be found in the new repository folders: - - REST API: `examples/nft/` - ---- - -## Migration Steps - -### 1. Replace the maven dependency - -Replace the maven dependency: - -```xml - - io.github.binance - binance-connector-java - 3.0.5 - -``` - -by: - -```xml - - io.github.binance - binance-nft - 1.2.1 - -``` - -### 3. Update Import Paths - -Replace all occurrences of: - -```java -import com.binance.connector.client.SpotClient; -``` - -With: - -```java -import com.binance.connector.client.nft.rest.api.NftRestApi; -``` - -### 4. Update Client Initialization - -Adjust your code to use the modularized structure. For example: - -**Old:** - -```java -SpotClient client = new SpotClientImpl(PrivateConfig.API_KEY, PrivateConfig.SECRET_KEY); -``` - -**New:** - -```java - ClientConfiguration clientConfiguration = NftRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - clientConfiguration.setCompression(false); //disable compression - NftRestApi api = new NftRestApi(clientConfiguration); -``` - -### 5. Test and Verify - -Run your application to ensure everything works as expected. Refer to the new documentation for any advanced features or configuration options. - ---- - -## Additional Notes - -- **Future Modular Packages**: Similar packages for other products (e.g., Wallet, Staking) will follow this pattern. - -For more details, refer to the updated [README](../../README.md) and [Examples](../../../../examples/). \ No newline at end of file diff --git a/clients/nft/docs/rest-api/proxy.md b/clients/nft/docs/rest-api/proxy.md deleted file mode 100644 index 58f3f500c..000000000 --- a/clients/nft/docs/rest-api/proxy.md +++ /dev/null @@ -1,45 +0,0 @@ -# Proxy Configuration - -```java - import com.binance.connector.client.nft.rest.NftRestApiUtil; - import com.binance.connector.client.nft.rest.api.NftRestApi; - import com.binance.connector.client.common.configuration.ClientConfiguration; - import com.binance.connector.client.common.configuration.SignatureConfiguration; - import okhttp3.Authenticator; - import okhttp3.Credentials; - import okhttp3.Request; - import okhttp3.Response; - import okhttp3.Route; - - import java.io.IOException; - import java.net.InetSocketAddress; - import java.net.Proxy; - - public static void main(String[] args) { - ClientConfiguration clientConfiguration = NftRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - - // Create the HTTP proxy - Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("host", 123)); - // Add the proxy to the configuration - clientConfiguration.setProxy(proxy); - - // Create the Proxy Authenticator - Authenticator proxyAuthenticator = new Authenticator() { - @Override public Request authenticate(Route route, Response response) throws IOException { - String credential = Credentials.basic("username", "password"); - return response.request().newBuilder() - .header("Proxy-Authorization", credential) - .build(); - } - }; - - // Add the proxy authenticator to the configuration - clientConfiguration.setProxyAuthenticator(proxyAuthenticator); - - NftRestApi api = new NftRestApi(clientConfiguration); - } -``` \ No newline at end of file diff --git a/clients/nft/docs/rest-api/retries.md b/clients/nft/docs/rest-api/retries.md deleted file mode 100644 index 7e5f279e0..000000000 --- a/clients/nft/docs/rest-api/retries.md +++ /dev/null @@ -1,25 +0,0 @@ -# Retries Configuration - -```java - import com.binance.connector.client.nft.rest.NftRestApiUtil; - import com.binance.connector.client.nft.rest.api.NftRestApi; - import com.binance.connector.client.common.ApiException; - import com.binance.connector.client.common.ApiResponse; - import com.binance.connector.client.common.configuration.ClientConfiguration; - import com.binance.connector.client.common.configuration.SignatureConfiguration; - - public static void main(String[] args) { - ClientConfiguration clientConfiguration = NftRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - - // Retry up to 5 times - clientConfiguration.setRetries(5); - // 500ms between retries - clientConfiguration.setBackOff(500); - - NftRestApi api = new NftRestApi(clientConfiguration); - } -``` \ No newline at end of file diff --git a/clients/nft/docs/rest-api/timeout.md b/clients/nft/docs/rest-api/timeout.md deleted file mode 100644 index 227ae9433..000000000 --- a/clients/nft/docs/rest-api/timeout.md +++ /dev/null @@ -1,25 +0,0 @@ -# Retries Configuration - -```java - import com.binance.connector.client.nft.rest.NftRestApiUtil; - import com.binance.connector.client.nft.rest.api.NftRestApi; - import com.binance.connector.client.common.ApiException; - import com.binance.connector.client.common.ApiResponse; - import com.binance.connector.client.common.configuration.ClientConfiguration; - import com.binance.connector.client.common.configuration.SignatureConfiguration; - - public static void main(String[] args) { - ClientConfiguration clientConfiguration = NftRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - - // Connect timeout of 500ms - clientConfiguration.setConnectTimeout(500); - // Read timeout of 1s - clientConfiguration.setReadTimeout(1000); - - NftRestApi api = new NftRestApi(clientConfiguration); - } -``` \ No newline at end of file diff --git a/clients/nft/example_rest.md b/clients/nft/example_rest.md deleted file mode 100644 index 1e2ff310b..000000000 --- a/clients/nft/example_rest.md +++ /dev/null @@ -1,10 +0,0 @@ -## Nft - -[GET /sapi/v1/nft/user/getAsset](https://developers.binance.com/docs/nft/rest-api/Get-NFT-Asset) - getNFTAsset - [GetNFTAssetExample.java:46](/examples/nft/src/main/java/com/binance/connector/client/nft/rest/nft/GetNFTAssetExample.java#L46) - -[GET /sapi/v1/nft/history/deposit](https://developers.binance.com/docs/nft/rest-api/Get-NFT-Deposit-History) - getNFTDepositHistory - [GetNFTDepositHistoryExample.java:48](/examples/nft/src/main/java/com/binance/connector/client/nft/rest/nft/GetNFTDepositHistoryExample.java#L48) - -[GET /sapi/v1/nft/history/transactions](https://developers.binance.com/docs/nft/rest-api/Get-NFT-Transaction-History) - getNFTTransactionHistory - [GetNFTTransactionHistoryExample.java:48](/examples/nft/src/main/java/com/binance/connector/client/nft/rest/nft/GetNFTTransactionHistoryExample.java#L48) - -[GET /sapi/v1/nft/history/withdraw](https://developers.binance.com/docs/nft/rest-api/Get-NFT-Withdraw-History) - getNFTWithdrawHistory - [GetNFTWithdrawHistoryExample.java:48](/examples/nft/src/main/java/com/binance/connector/client/nft/rest/nft/GetNFTWithdrawHistoryExample.java#L48) - diff --git a/clients/nft/pom.xml b/clients/nft/pom.xml deleted file mode 100644 index 5ae7fc32f..000000000 --- a/clients/nft/pom.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - 4.0.0 - binance-nft - nft - 1.2.2 - jar - - - io.github.binance - binance-connector-java-clients - 1.1.3 - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - -parameters - - - - - - - - io.github.binance - binance-common - 2.5.1 - - - \ No newline at end of file diff --git a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/JSON.java b/clients/nft/src/main/java/com/binance/connector/client/nft/rest/JSON.java deleted file mode 100644 index 1ce0b45fe..000000000 --- a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/JSON.java +++ /dev/null @@ -1,438 +0,0 @@ -/* - * Binance NFT REST API - * OpenAPI Specification for the Binance NFT REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * 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.binance.connector.client.nft.rest; - -import com.binance.connector.client.common.DecimalFormatter; -import com.binance.connector.client.common.websocket.service.DeserializeExclusionStrategy; -import com.binance.connector.client.common.websocket.service.SerializeExclusionStrategy; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonElement; -import com.google.gson.JsonParseException; -import com.google.gson.JsonPrimitive; -import com.google.gson.JsonSerializer; -import com.google.gson.TypeAdapter; -import com.google.gson.internal.bind.util.ISO8601Utils; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.gsonfire.GsonFireBuilder; -import java.io.IOException; -import java.io.StringReader; -import java.lang.reflect.Type; -import java.text.DateFormat; -import java.text.DecimalFormat; -import java.text.ParseException; -import java.text.ParsePosition; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.Date; -import java.util.Map; -import okio.ByteString; - -/* - * A JSON utility class - * - * NOTE: in the future, this class may be converted to static, which may break - * backward-compatibility - */ -public class JSON { - private static Gson gson; - private static boolean isLenientOnJson = false; - private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); - private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); - private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = - new OffsetDateTimeTypeAdapter(); - private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); - private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); - - @SuppressWarnings("unchecked") - public static GsonBuilder createGson() { - GsonFireBuilder fireBuilder = new GsonFireBuilder(); - GsonBuilder builder = fireBuilder.createGsonBuilder(); - return builder; - } - - private static String getDiscriminatorValue( - JsonElement readElement, String discriminatorField) { - JsonElement element = readElement.getAsJsonObject().get(discriminatorField); - if (null == element) { - throw new IllegalArgumentException( - "missing discriminator field: <" + discriminatorField + ">"); - } - return element.getAsString(); - } - - /** - * Returns the Java class that implements the OpenAPI schema for the specified discriminator - * value. - * - * @param classByDiscriminatorValue The map of discriminator values to Java classes. - * @param discriminatorValue The value of the OpenAPI discriminator in the input data. - * @return The Java class that implements the OpenAPI schema - */ - private static Class getClassByDiscriminator( - Map classByDiscriminatorValue, String discriminatorValue) { - Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); - if (null == clazz) { - throw new IllegalArgumentException( - "cannot determine model class of name: <" + discriminatorValue + ">"); - } - return clazz; - } - - static { - GsonBuilder gsonBuilder = createGson(); - gsonBuilder - .registerTypeAdapter( - Double.class, - (JsonSerializer) - (src, typeOfSrc, context) -> { - DecimalFormat df = DecimalFormatter.getFormatter(); - return new JsonPrimitive(df.format(src)); - }) - .addSerializationExclusionStrategy(new SerializeExclusionStrategy()) - .addDeserializationExclusionStrategy(new DeserializeExclusionStrategy()); - gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); - gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); - gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); - gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); - gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.nft.rest.model.GetNFTAssetResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.nft.rest.model.GetNFTAssetResponseListInner - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.nft.rest.model.GetNFTDepositHistoryResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.nft.rest.model - .GetNFTDepositHistoryResponseListInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.nft.rest.model.GetNFTTransactionHistoryResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.nft.rest.model - .GetNFTTransactionHistoryResponseListInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.nft.rest.model - .GetNFTTransactionHistoryResponseListInnerTokensInner - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.nft.rest.model.GetNFTWithdrawHistoryResponse - .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.binance.connector.client.nft.rest.model - .GetNFTWithdrawHistoryResponseListInner.CustomTypeAdapterFactory()); - gson = gsonBuilder.create(); - } - - /** - * Get Gson. - * - * @return Gson - */ - public static Gson getGson() { - return gson; - } - - /** - * Set Gson. - * - * @param gson Gson - */ - public static void setGson(Gson gson) { - JSON.gson = gson; - } - - public static void setLenientOnJson(boolean lenientOnJson) { - isLenientOnJson = lenientOnJson; - } - - /** - * Serialize the given Java object into JSON string. - * - * @param obj Object - * @return String representation of the JSON - */ - public static String serialize(Object obj) { - return gson.toJson(obj); - } - - /** - * Deserialize the given JSON string to Java object. - * - * @param Type - * @param body The JSON string - * @param returnType The type to deserialize into - * @return The deserialized Java object - */ - @SuppressWarnings("unchecked") - public static T deserialize(String body, Type returnType) { - try { - if (isLenientOnJson) { - JsonReader jsonReader = new JsonReader(new StringReader(body)); - // see - // https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) - jsonReader.setLenient(true); - return gson.fromJson(jsonReader, returnType); - } else { - return gson.fromJson(body, returnType); - } - } catch (JsonParseException e) { - // Fallback processing when failed to parse JSON form response body: - // return the response body string directly for the String return type; - if (returnType.equals(String.class)) { - return (T) body; - } else { - throw (e); - } - } - } - - /** Gson TypeAdapter for Byte Array type */ - public static class ByteArrayAdapter extends TypeAdapter { - - @Override - public void write(JsonWriter out, byte[] value) throws IOException { - if (value == null) { - out.nullValue(); - } else { - out.value(ByteString.of(value).base64()); - } - } - - @Override - public byte[] read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String bytesAsBase64 = in.nextString(); - ByteString byteString = ByteString.decodeBase64(bytesAsBase64); - return byteString.toByteArray(); - } - } - } - - /** Gson TypeAdapter for JSR310 OffsetDateTime type */ - public static class OffsetDateTimeTypeAdapter extends TypeAdapter { - - private DateTimeFormatter formatter; - - public OffsetDateTimeTypeAdapter() { - this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); - } - - public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { - this.formatter = formatter; - } - - public void setFormat(DateTimeFormatter dateFormat) { - this.formatter = dateFormat; - } - - @Override - public void write(JsonWriter out, OffsetDateTime date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } - } - - @Override - public OffsetDateTime read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - if (date.endsWith("+0000")) { - date = date.substring(0, date.length() - 5) + "Z"; - } - return OffsetDateTime.parse(date, formatter); - } - } - } - - /** Gson TypeAdapter for JSR310 LocalDate type */ - public static class LocalDateTypeAdapter extends TypeAdapter { - - private DateTimeFormatter formatter; - - public LocalDateTypeAdapter() { - this(DateTimeFormatter.ISO_LOCAL_DATE); - } - - public LocalDateTypeAdapter(DateTimeFormatter formatter) { - this.formatter = formatter; - } - - public void setFormat(DateTimeFormatter dateFormat) { - this.formatter = dateFormat; - } - - @Override - public void write(JsonWriter out, LocalDate date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } - } - - @Override - public LocalDate read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - return LocalDate.parse(date, formatter); - } - } - } - - public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - offsetDateTimeTypeAdapter.setFormat(dateFormat); - } - - public static void setLocalDateFormat(DateTimeFormatter dateFormat) { - localDateTypeAdapter.setFormat(dateFormat); - } - - /** - * Gson TypeAdapter for java.sql.Date type If the dateFormat is null, a simple "yyyy-MM-dd" - * format will be used (more efficient than SimpleDateFormat). - */ - public static class SqlDateTypeAdapter extends TypeAdapter { - - private DateFormat dateFormat; - - public SqlDateTypeAdapter() {} - - public SqlDateTypeAdapter(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - public void setFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - @Override - public void write(JsonWriter out, java.sql.Date date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - String value; - if (dateFormat != null) { - value = dateFormat.format(date); - } else { - value = date.toString(); - } - out.value(value); - } - } - - @Override - public java.sql.Date read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - try { - if (dateFormat != null) { - return new java.sql.Date(dateFormat.parse(date).getTime()); - } - return new java.sql.Date( - ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); - } catch (ParseException e) { - throw new JsonParseException(e); - } - } - } - } - - /** - * Gson TypeAdapter for java.util.Date type If the dateFormat is null, ISO8601Utils will be - * used. - */ - public static class DateTypeAdapter extends TypeAdapter { - - private DateFormat dateFormat; - - public DateTypeAdapter() {} - - public DateTypeAdapter(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - public void setFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - @Override - public void write(JsonWriter out, Date date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - String value; - if (dateFormat != null) { - value = dateFormat.format(date); - } else { - value = ISO8601Utils.format(date, true); - } - out.value(value); - } - } - - @Override - public Date read(JsonReader in) throws IOException { - try { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - try { - if (dateFormat != null) { - return dateFormat.parse(date); - } - return ISO8601Utils.parse(date, new ParsePosition(0)); - } catch (ParseException e) { - throw new JsonParseException(e); - } - } - } catch (IllegalArgumentException e) { - throw new JsonParseException(e); - } - } - } - - public static void setDateFormat(DateFormat dateFormat) { - dateTypeAdapter.setFormat(dateFormat); - } - - public static void setSqlDateFormat(DateFormat dateFormat) { - sqlDateTypeAdapter.setFormat(dateFormat); - } -} diff --git a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/NftRestApiUtil.java b/clients/nft/src/main/java/com/binance/connector/client/nft/rest/NftRestApiUtil.java deleted file mode 100644 index 5d5a803f5..000000000 --- a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/NftRestApiUtil.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.binance.connector.client.nft.rest; - -import com.binance.connector.client.common.ApiClient; -import com.binance.connector.client.common.configuration.ClientConfiguration; - -public class NftRestApiUtil { - private static final String BASE_URL = "https://api.binance.com"; - private static final boolean HAS_TIME_UNIT = false; - - public static ClientConfiguration getClientConfiguration() { - ClientConfiguration clientConfiguration = new ClientConfiguration(); - if (!HAS_TIME_UNIT) { - clientConfiguration.setTimeUnit(null); - } - clientConfiguration.setUrl(BASE_URL); - return clientConfiguration; - } - - public static ApiClient getDefaultClient(ClientConfiguration configuration) { - ApiClient apiClient = new ApiClient(configuration); - apiClient.setJson(JSON.getGson()); - - return apiClient; - } -} diff --git a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/api/NftApi.java b/clients/nft/src/main/java/com/binance/connector/client/nft/rest/api/NftApi.java deleted file mode 100644 index 4d4b407c8..000000000 --- a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/api/NftApi.java +++ /dev/null @@ -1,758 +0,0 @@ -/* - * Binance NFT REST API - * OpenAPI Specification for the Binance NFT REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * 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.binance.connector.client.nft.rest.api; - -import com.binance.connector.client.common.ApiClient; -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.Pair; -import com.binance.connector.client.common.SystemUtil; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.exception.ConstraintViolationException; -import com.binance.connector.client.nft.rest.model.GetNFTAssetResponse; -import com.binance.connector.client.nft.rest.model.GetNFTDepositHistoryResponse; -import com.binance.connector.client.nft.rest.model.GetNFTTransactionHistoryResponse; -import com.binance.connector.client.nft.rest.model.GetNFTWithdrawHistoryResponse; -import com.google.gson.reflect.TypeToken; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.Validation; -import jakarta.validation.Validator; -import jakarta.validation.constraints.*; -import jakarta.validation.executable.ExecutableValidator; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator; - -public class NftApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - private static final String USER_AGENT = - String.format( - "binance-nft/1.2.1 (Java/%s; %s; %s)", - SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); - private static final boolean HAS_TIME_UNIT = false; - - public NftApi(ClientConfiguration clientConfiguration) { - this(new ApiClient(clientConfiguration)); - } - - public NftApi(ApiClient apiClient) { - apiClient.setUserAgent(USER_AGENT); - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for getNFTAsset - * - * @param limit Default 50, Max 50 (optional) - * @param page Default 1 (optional) - * @param recvWindow (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get NFT Asset -
- * - * @see Get NFT - * Asset(USER_DATA) Documentation - */ - private okhttp3.Call getNFTAssetCall(Long limit, Long page, Long recvWindow) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/nft/user/getAsset"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getNFTAssetValidateBeforeCall(Long limit, Long page, Long recvWindow) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {limit, page, recvWindow}; - Method method = - this.getClass().getMethod("getNFTAsset", Long.class, Long.class, Long.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return getNFTAssetCall(limit, page, recvWindow); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Get NFT Asset(USER_DATA) Get NFT Asset Weight: 3000 - * - * @param limit Default 50, Max 50 (optional) - * @param page Default 1 (optional) - * @param recvWindow (optional) - * @return ApiResponse<GetNFTAssetResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get NFT Asset -
- * - * @see Get NFT - * Asset(USER_DATA) Documentation - */ - public ApiResponse getNFTAsset(Long limit, Long page, Long recvWindow) - throws ApiException { - okhttp3.Call localVarCall = getNFTAssetValidateBeforeCall(limit, page, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Build call for getNFTDepositHistory - * - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 50, Max 50 (optional) - * @param page Default 1 (optional) - * @param recvWindow (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get NFT Deposit History -
- * - * @see Get - * NFT Deposit History(USER_DATA) Documentation - */ - private okhttp3.Call getNFTDepositHistoryCall( - Long startTime, Long endTime, Long limit, Long page, Long recvWindow) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/nft/history/deposit"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (startTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("startTime", startTime)); - } - - if (endTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("endTime", endTime)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getNFTDepositHistoryValidateBeforeCall( - Long startTime, Long endTime, Long limit, Long page, Long recvWindow) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {startTime, endTime, limit, page, recvWindow}; - Method method = - this.getClass() - .getMethod( - "getNFTDepositHistory", - Long.class, - Long.class, - Long.class, - Long.class, - Long.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return getNFTDepositHistoryCall(startTime, endTime, limit, page, recvWindow); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Get NFT Deposit History(USER_DATA) et NFT Deposit History * The max interval between - * startTime and endTime is 90 days. * If startTime and endTime are not sent, the recent 7 - * days' data will be returned. Weight: 3000 - * - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 50, Max 50 (optional) - * @param page Default 1 (optional) - * @param recvWindow (optional) - * @return ApiResponse<GetNFTDepositHistoryResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get NFT Deposit History -
- * - * @see Get - * NFT Deposit History(USER_DATA) Documentation - */ - public ApiResponse getNFTDepositHistory( - Long startTime, Long endTime, Long limit, Long page, Long recvWindow) - throws ApiException { - okhttp3.Call localVarCall = - getNFTDepositHistoryValidateBeforeCall(startTime, endTime, limit, page, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Build call for getNFTTransactionHistory - * - * @param orderType 0: purchase order, 1: sell order, 2: royalty income, 3: primary market - * order, 4: mint fee (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 50, Max 50 (optional) - * @param page Default 1 (optional) - * @param recvWindow (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get NFT Transaction History -
- * - * @see Get - * NFT Transaction History(USER_DATA) Documentation - */ - private okhttp3.Call getNFTTransactionHistoryCall( - Long orderType, Long startTime, Long endTime, Long limit, Long page, Long recvWindow) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/nft/history/transactions"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (orderType != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("orderType", orderType)); - } - - if (startTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("startTime", startTime)); - } - - if (endTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("endTime", endTime)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getNFTTransactionHistoryValidateBeforeCall( - Long orderType, Long startTime, Long endTime, Long limit, Long page, Long recvWindow) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {orderType, startTime, endTime, limit, page, recvWindow}; - Method method = - this.getClass() - .getMethod( - "getNFTTransactionHistory", - Long.class, - Long.class, - Long.class, - Long.class, - Long.class, - Long.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return getNFTTransactionHistoryCall( - orderType, startTime, endTime, limit, page, recvWindow); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Get NFT Transaction History(USER_DATA) Get NFT Transaction History * The max interval between - * startTime and endTime is 90 days. * If startTime and endTime are not sent, the recent 7 - * days' data will be returned. Weight: 3000 - * - * @param orderType 0: purchase order, 1: sell order, 2: royalty income, 3: primary market - * order, 4: mint fee (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 50, Max 50 (optional) - * @param page Default 1 (optional) - * @param recvWindow (optional) - * @return ApiResponse<GetNFTTransactionHistoryResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get NFT Transaction History -
- * - * @see Get - * NFT Transaction History(USER_DATA) Documentation - */ - public ApiResponse getNFTTransactionHistory( - @NotNull Long orderType, - Long startTime, - Long endTime, - Long limit, - Long page, - Long recvWindow) - throws ApiException { - okhttp3.Call localVarCall = - getNFTTransactionHistoryValidateBeforeCall( - orderType, startTime, endTime, limit, page, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Build call for getNFTWithdrawHistory - * - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 50, Max 50 (optional) - * @param page Default 1 (optional) - * @param recvWindow (optional) - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get NFT Withdraw History -
- * - * @see Get - * NFT Withdraw History(USER_DATA) Documentation - */ - private okhttp3.Call getNFTWithdrawHistoryCall( - Long startTime, Long endTime, Long limit, Long page, Long recvWindow) - throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] {}; - - // Determine Base Path to Use - if (localCustomBaseUrl != null) { - basePath = localCustomBaseUrl; - } else if (localBasePaths.length > 0) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/sapi/v1/nft/history/withdraw"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (startTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("startTime", startTime)); - } - - if (endTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("endTime", endTime)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (recvWindow != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("recvWindow", recvWindow)); - } - - final String[] localVarAccepts = {"application/json"}; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; - final String localVarContentType = - localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (!localVarFormParams.isEmpty() && localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - Set localVarAuthNames = new HashSet<>(); - localVarAuthNames.add("binanceSignature"); - if (HAS_TIME_UNIT) { - localVarAuthNames.add("timeUnit"); - } - return localVarApiClient.buildCall( - basePath, - localVarPath, - "GET", - localVarQueryParams, - localVarCollectionQueryParams, - localVarPostBody, - localVarHeaderParams, - localVarCookieParams, - localVarFormParams, - localVarAuthNames); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getNFTWithdrawHistoryValidateBeforeCall( - Long startTime, Long endTime, Long limit, Long page, Long recvWindow) - throws ApiException { - try { - Validator validator = - Validation.byDefaultProvider() - .configure() - .messageInterpolator(new ParameterMessageInterpolator()) - .buildValidatorFactory() - .getValidator(); - ExecutableValidator executableValidator = validator.forExecutables(); - - Object[] parameterValues = {startTime, endTime, limit, page, recvWindow}; - Method method = - this.getClass() - .getMethod( - "getNFTWithdrawHistory", - Long.class, - Long.class, - Long.class, - Long.class, - Long.class); - Set> violations = - executableValidator.validateParameters(this, method, parameterValues); - - if (violations.size() == 0) { - return getNFTWithdrawHistoryCall(startTime, endTime, limit, page, recvWindow); - } else { - throw new ConstraintViolationException((Set) violations); - } - } catch (NoSuchMethodException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } catch (SecurityException e) { - e.printStackTrace(); - throw new ApiException(e.getMessage()); - } - } - - /** - * Get NFT Withdraw History(USER_DATA) Get NFT Withdraw History * The max interval between - * startTime and endTime is 90 days. * If startTime and endTime are not sent, the recent 7 - * days' data will be returned. Weight: 3000 - * - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 50, Max 50 (optional) - * @param page Default 1 (optional) - * @param recvWindow (optional) - * @return ApiResponse<GetNFTWithdrawHistoryResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get NFT Withdraw History -
- * - * @see Get - * NFT Withdraw History(USER_DATA) Documentation - */ - public ApiResponse getNFTWithdrawHistory( - Long startTime, Long endTime, Long limit, Long page, Long recvWindow) - throws ApiException { - okhttp3.Call localVarCall = - getNFTWithdrawHistoryValidateBeforeCall( - startTime, endTime, limit, page, recvWindow); - java.lang.reflect.Type localVarReturnType = - new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } -} diff --git a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/api/NftRestApi.java b/clients/nft/src/main/java/com/binance/connector/client/nft/rest/api/NftRestApi.java deleted file mode 100644 index f1e4a79ab..000000000 --- a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/api/NftRestApi.java +++ /dev/null @@ -1,139 +0,0 @@ -package com.binance.connector.client.nft.rest.api; - -import com.binance.connector.client.common.ApiClient; -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.nft.rest.NftRestApiUtil; -import com.binance.connector.client.nft.rest.model.GetNFTAssetResponse; -import com.binance.connector.client.nft.rest.model.GetNFTDepositHistoryResponse; -import com.binance.connector.client.nft.rest.model.GetNFTTransactionHistoryResponse; -import com.binance.connector.client.nft.rest.model.GetNFTWithdrawHistoryResponse; - -public class NftRestApi { - - private final NftApi nftApi; - - public NftRestApi(ClientConfiguration configuration) { - this(NftRestApiUtil.getDefaultClient(configuration)); - } - - public NftRestApi(ApiClient apiClient) { - this.nftApi = new NftApi(apiClient); - } - - /** - * Get NFT Asset(USER_DATA) Get NFT Asset Weight: 3000 - * - * @param limit Default 50, Max 50 (optional) - * @param page Default 1 (optional) - * @param recvWindow (optional) - * @return ApiResponse<GetNFTAssetResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get NFT Asset -
- * - * @see Get NFT - * Asset(USER_DATA) Documentation - */ - public ApiResponse getNFTAsset(Long limit, Long page, Long recvWindow) - throws ApiException { - return nftApi.getNFTAsset(limit, page, recvWindow); - } - - /** - * Get NFT Deposit History(USER_DATA) et NFT Deposit History * The max interval between - * startTime and endTime is 90 days. * If startTime and endTime are not sent, the recent 7 - * days' data will be returned. Weight: 3000 - * - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 50, Max 50 (optional) - * @param page Default 1 (optional) - * @param recvWindow (optional) - * @return ApiResponse<GetNFTDepositHistoryResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get NFT Deposit History -
- * - * @see Get - * NFT Deposit History(USER_DATA) Documentation - */ - public ApiResponse getNFTDepositHistory( - Long startTime, Long endTime, Long limit, Long page, Long recvWindow) - throws ApiException { - return nftApi.getNFTDepositHistory(startTime, endTime, limit, page, recvWindow); - } - - /** - * Get NFT Transaction History(USER_DATA) Get NFT Transaction History * The max interval between - * startTime and endTime is 90 days. * If startTime and endTime are not sent, the recent 7 - * days' data will be returned. Weight: 3000 - * - * @param orderType 0: purchase order, 1: sell order, 2: royalty income, 3: primary market - * order, 4: mint fee (required) - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 50, Max 50 (optional) - * @param page Default 1 (optional) - * @param recvWindow (optional) - * @return ApiResponse<GetNFTTransactionHistoryResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get NFT Transaction History -
- * - * @see Get - * NFT Transaction History(USER_DATA) Documentation - */ - public ApiResponse getNFTTransactionHistory( - Long orderType, Long startTime, Long endTime, Long limit, Long page, Long recvWindow) - throws ApiException { - return nftApi.getNFTTransactionHistory( - orderType, startTime, endTime, limit, page, recvWindow); - } - - /** - * Get NFT Withdraw History(USER_DATA) Get NFT Withdraw History * The max interval between - * startTime and endTime is 90 days. * If startTime and endTime are not sent, the recent 7 - * days' data will be returned. Weight: 3000 - * - * @param startTime (optional) - * @param endTime (optional) - * @param limit Default 50, Max 50 (optional) - * @param page Default 1 (optional) - * @param recvWindow (optional) - * @return ApiResponse<GetNFTWithdrawHistoryResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the - * response body - * @http.response.details - * - * - * - * - *
Response Details
Status Code Description Response Headers
200 Get NFT Withdraw History -
- * - * @see Get - * NFT Withdraw History(USER_DATA) Documentation - */ - public ApiResponse getNFTWithdrawHistory( - Long startTime, Long endTime, Long limit, Long page, Long recvWindow) - throws ApiException { - return nftApi.getNFTWithdrawHistory(startTime, endTime, limit, page, recvWindow); - } -} diff --git a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTAssetResponse.java b/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTAssetResponse.java deleted file mode 100644 index 47a34f610..000000000 --- a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTAssetResponse.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Binance NFT REST API - * OpenAPI Specification for the Binance NFT REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * 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.binance.connector.client.nft.rest.model; - -import com.binance.connector.client.nft.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** GetNFTAssetResponse */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetNFTAssetResponse { - public static final String SERIALIZED_NAME_TOTAL = "total"; - - @SerializedName(SERIALIZED_NAME_TOTAL) - @jakarta.annotation.Nullable - private Long total; - - public static final String SERIALIZED_NAME_LIST = "list"; - - @SerializedName(SERIALIZED_NAME_LIST) - @jakarta.annotation.Nullable - private List<@Valid GetNFTAssetResponseListInner> _list; - - public GetNFTAssetResponse() {} - - public GetNFTAssetResponse total(@jakarta.annotation.Nullable Long total) { - this.total = total; - return this; - } - - /** - * Get total - * - * @return total - */ - @jakarta.annotation.Nullable - public Long getTotal() { - return total; - } - - public void setTotal(@jakarta.annotation.Nullable Long total) { - this.total = total; - } - - public GetNFTAssetResponse _list( - @jakarta.annotation.Nullable List<@Valid GetNFTAssetResponseListInner> _list) { - this._list = _list; - return this; - } - - public GetNFTAssetResponse addListItem(GetNFTAssetResponseListInner _listItem) { - if (this._list == null) { - this._list = new ArrayList<>(); - } - this._list.add(_listItem); - return this; - } - - /** - * Get _list - * - * @return _list - */ - @jakarta.annotation.Nullable - @Valid - public List<@Valid GetNFTAssetResponseListInner> getList() { - return _list; - } - - public void setList( - @jakarta.annotation.Nullable List<@Valid GetNFTAssetResponseListInner> _list) { - this._list = _list; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetNFTAssetResponse getNFTAssetResponse = (GetNFTAssetResponse) o; - return Objects.equals(this.total, getNFTAssetResponse.total) - && Objects.equals(this._list, getNFTAssetResponse._list); - } - - @Override - public int hashCode() { - return Objects.hash(total, _list); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetNFTAssetResponse {\n"); - sb.append(" total: ").append(toIndentedString(total)).append("\n"); - sb.append(" _list: ").append(toIndentedString(_list)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object totalValue = getTotal(); - String totalValueAsString = ""; - totalValueAsString = totalValue.toString(); - sb.append("total=").append(urlEncode(totalValueAsString)).append(""); - Object _listValue = getList(); - String _listValueAsString = ""; - _listValueAsString = - (String) - ((Collection) _listValue) - .stream().map(Object::toString).collect(Collectors.joining(",")); - sb.append("_list=").append(urlEncode(_listValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * 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 "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("total"); - openapiFields.add("list"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to GetNFTAssetResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetNFTAssetResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in GetNFTAssetResponse is not found in" - + " the empty JSON string", - GetNFTAssetResponse.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("list") != null && !jsonObj.get("list").isJsonNull()) { - JsonArray jsonArray_list = jsonObj.getAsJsonArray("list"); - if (jsonArray_list != null) { - // ensure the json data is an array - if (!jsonObj.get("list").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `list` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("list").toString())); - } - - // validate the optional field `list` (array) - for (int i = 0; i < jsonArray_list.size(); i++) { - GetNFTAssetResponseListInner.validateJsonElement(jsonArray_list.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetNFTAssetResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetNFTAssetResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(GetNFTAssetResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, GetNFTAssetResponse value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetNFTAssetResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GetNFTAssetResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetNFTAssetResponse - * @throws IOException if the JSON string is invalid with respect to GetNFTAssetResponse - */ - public static GetNFTAssetResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetNFTAssetResponse.class); - } - - /** - * Convert an instance of GetNFTAssetResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTAssetResponseListInner.java b/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTAssetResponseListInner.java deleted file mode 100644 index 016e029d8..000000000 --- a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTAssetResponseListInner.java +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Binance NFT REST API - * OpenAPI Specification for the Binance NFT REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * 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.binance.connector.client.nft.rest.model; - -import com.binance.connector.client.nft.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** GetNFTAssetResponseListInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetNFTAssetResponseListInner { - public static final String SERIALIZED_NAME_NETWORK = "network"; - - @SerializedName(SERIALIZED_NAME_NETWORK) - @jakarta.annotation.Nullable - private String network; - - public static final String SERIALIZED_NAME_CONTRACT_ADDRESS = "contractAddress"; - - @SerializedName(SERIALIZED_NAME_CONTRACT_ADDRESS) - @jakarta.annotation.Nullable - private String contractAddress; - - public static final String SERIALIZED_NAME_TOKEN_ID = "tokenId"; - - @SerializedName(SERIALIZED_NAME_TOKEN_ID) - @jakarta.annotation.Nullable - private String tokenId; - - public GetNFTAssetResponseListInner() {} - - public GetNFTAssetResponseListInner network(@jakarta.annotation.Nullable String network) { - this.network = network; - return this; - } - - /** - * Get network - * - * @return network - */ - @jakarta.annotation.Nullable - public String getNetwork() { - return network; - } - - public void setNetwork(@jakarta.annotation.Nullable String network) { - this.network = network; - } - - public GetNFTAssetResponseListInner contractAddress( - @jakarta.annotation.Nullable String contractAddress) { - this.contractAddress = contractAddress; - return this; - } - - /** - * Get contractAddress - * - * @return contractAddress - */ - @jakarta.annotation.Nullable - public String getContractAddress() { - return contractAddress; - } - - public void setContractAddress(@jakarta.annotation.Nullable String contractAddress) { - this.contractAddress = contractAddress; - } - - public GetNFTAssetResponseListInner tokenId(@jakarta.annotation.Nullable String tokenId) { - this.tokenId = tokenId; - return this; - } - - /** - * Get tokenId - * - * @return tokenId - */ - @jakarta.annotation.Nullable - public String getTokenId() { - return tokenId; - } - - public void setTokenId(@jakarta.annotation.Nullable String tokenId) { - this.tokenId = tokenId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetNFTAssetResponseListInner getNFTAssetResponseListInner = - (GetNFTAssetResponseListInner) o; - return Objects.equals(this.network, getNFTAssetResponseListInner.network) - && Objects.equals( - this.contractAddress, getNFTAssetResponseListInner.contractAddress) - && Objects.equals(this.tokenId, getNFTAssetResponseListInner.tokenId); - } - - @Override - public int hashCode() { - return Objects.hash(network, contractAddress, tokenId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetNFTAssetResponseListInner {\n"); - sb.append(" network: ").append(toIndentedString(network)).append("\n"); - sb.append(" contractAddress: ").append(toIndentedString(contractAddress)).append("\n"); - sb.append(" tokenId: ").append(toIndentedString(tokenId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object networkValue = getNetwork(); - String networkValueAsString = ""; - networkValueAsString = networkValue.toString(); - sb.append("network=").append(urlEncode(networkValueAsString)).append(""); - Object contractAddressValue = getContractAddress(); - String contractAddressValueAsString = ""; - contractAddressValueAsString = contractAddressValue.toString(); - sb.append("contractAddress=").append(urlEncode(contractAddressValueAsString)).append(""); - Object tokenIdValue = getTokenId(); - String tokenIdValueAsString = ""; - tokenIdValueAsString = tokenIdValue.toString(); - sb.append("tokenId=").append(urlEncode(tokenIdValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * 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 "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("network"); - openapiFields.add("contractAddress"); - openapiFields.add("tokenId"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * GetNFTAssetResponseListInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetNFTAssetResponseListInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in GetNFTAssetResponseListInner is not" - + " found in the empty JSON string", - GetNFTAssetResponseListInner.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("network") != null && !jsonObj.get("network").isJsonNull()) - && !jsonObj.get("network").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `network` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("network").toString())); - } - if ((jsonObj.get("contractAddress") != null && !jsonObj.get("contractAddress").isJsonNull()) - && !jsonObj.get("contractAddress").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `contractAddress` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("contractAddress").toString())); - } - if ((jsonObj.get("tokenId") != null && !jsonObj.get("tokenId").isJsonNull()) - && !jsonObj.get("tokenId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tokenId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("tokenId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetNFTAssetResponseListInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetNFTAssetResponseListInner' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(GetNFTAssetResponseListInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, GetNFTAssetResponseListInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetNFTAssetResponseListInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GetNFTAssetResponseListInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetNFTAssetResponseListInner - * @throws IOException if the JSON string is invalid with respect to - * GetNFTAssetResponseListInner - */ - public static GetNFTAssetResponseListInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetNFTAssetResponseListInner.class); - } - - /** - * Convert an instance of GetNFTAssetResponseListInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTDepositHistoryResponse.java b/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTDepositHistoryResponse.java deleted file mode 100644 index 7ff8aca08..000000000 --- a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTDepositHistoryResponse.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Binance NFT REST API - * OpenAPI Specification for the Binance NFT REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * 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.binance.connector.client.nft.rest.model; - -import com.binance.connector.client.nft.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** GetNFTDepositHistoryResponse */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetNFTDepositHistoryResponse { - public static final String SERIALIZED_NAME_TOTAL = "total"; - - @SerializedName(SERIALIZED_NAME_TOTAL) - @jakarta.annotation.Nullable - private Long total; - - public static final String SERIALIZED_NAME_LIST = "list"; - - @SerializedName(SERIALIZED_NAME_LIST) - @jakarta.annotation.Nullable - private List<@Valid GetNFTDepositHistoryResponseListInner> _list; - - public GetNFTDepositHistoryResponse() {} - - public GetNFTDepositHistoryResponse total(@jakarta.annotation.Nullable Long total) { - this.total = total; - return this; - } - - /** - * Get total - * - * @return total - */ - @jakarta.annotation.Nullable - public Long getTotal() { - return total; - } - - public void setTotal(@jakarta.annotation.Nullable Long total) { - this.total = total; - } - - public GetNFTDepositHistoryResponse _list( - @jakarta.annotation.Nullable List<@Valid GetNFTDepositHistoryResponseListInner> _list) { - this._list = _list; - return this; - } - - public GetNFTDepositHistoryResponse addListItem( - GetNFTDepositHistoryResponseListInner _listItem) { - if (this._list == null) { - this._list = new ArrayList<>(); - } - this._list.add(_listItem); - return this; - } - - /** - * Get _list - * - * @return _list - */ - @jakarta.annotation.Nullable - @Valid - public List<@Valid GetNFTDepositHistoryResponseListInner> getList() { - return _list; - } - - public void setList( - @jakarta.annotation.Nullable List<@Valid GetNFTDepositHistoryResponseListInner> _list) { - this._list = _list; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetNFTDepositHistoryResponse getNFTDepositHistoryResponse = - (GetNFTDepositHistoryResponse) o; - return Objects.equals(this.total, getNFTDepositHistoryResponse.total) - && Objects.equals(this._list, getNFTDepositHistoryResponse._list); - } - - @Override - public int hashCode() { - return Objects.hash(total, _list); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetNFTDepositHistoryResponse {\n"); - sb.append(" total: ").append(toIndentedString(total)).append("\n"); - sb.append(" _list: ").append(toIndentedString(_list)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object totalValue = getTotal(); - String totalValueAsString = ""; - totalValueAsString = totalValue.toString(); - sb.append("total=").append(urlEncode(totalValueAsString)).append(""); - Object _listValue = getList(); - String _listValueAsString = ""; - _listValueAsString = - (String) - ((Collection) _listValue) - .stream().map(Object::toString).collect(Collectors.joining(",")); - sb.append("_list=").append(urlEncode(_listValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * 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 "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("total"); - openapiFields.add("list"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * GetNFTDepositHistoryResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetNFTDepositHistoryResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in GetNFTDepositHistoryResponse is not" - + " found in the empty JSON string", - GetNFTDepositHistoryResponse.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("list") != null && !jsonObj.get("list").isJsonNull()) { - JsonArray jsonArray_list = jsonObj.getAsJsonArray("list"); - if (jsonArray_list != null) { - // ensure the json data is an array - if (!jsonObj.get("list").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `list` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("list").toString())); - } - - // validate the optional field `list` (array) - for (int i = 0; i < jsonArray_list.size(); i++) { - GetNFTDepositHistoryResponseListInner.validateJsonElement( - jsonArray_list.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetNFTDepositHistoryResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetNFTDepositHistoryResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(GetNFTDepositHistoryResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, GetNFTDepositHistoryResponse value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetNFTDepositHistoryResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GetNFTDepositHistoryResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetNFTDepositHistoryResponse - * @throws IOException if the JSON string is invalid with respect to - * GetNFTDepositHistoryResponse - */ - public static GetNFTDepositHistoryResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetNFTDepositHistoryResponse.class); - } - - /** - * Convert an instance of GetNFTDepositHistoryResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTDepositHistoryResponseListInner.java b/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTDepositHistoryResponseListInner.java deleted file mode 100644 index a1e159ce7..000000000 --- a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTDepositHistoryResponseListInner.java +++ /dev/null @@ -1,376 +0,0 @@ -/* - * Binance NFT REST API - * OpenAPI Specification for the Binance NFT REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * 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.binance.connector.client.nft.rest.model; - -import com.binance.connector.client.nft.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** GetNFTDepositHistoryResponseListInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetNFTDepositHistoryResponseListInner { - public static final String SERIALIZED_NAME_NETWORK = "network"; - - @SerializedName(SERIALIZED_NAME_NETWORK) - @jakarta.annotation.Nullable - private String network; - - public static final String SERIALIZED_NAME_TX_I_D = "txID"; - - @SerializedName(SERIALIZED_NAME_TX_I_D) - @jakarta.annotation.Nullable - private String txID; - - public static final String SERIALIZED_NAME_CONTRACT_ADRRESS = "contractAdrress"; - - @SerializedName(SERIALIZED_NAME_CONTRACT_ADRRESS) - @jakarta.annotation.Nullable - private String contractAdrress; - - public static final String SERIALIZED_NAME_TOKEN_ID = "tokenId"; - - @SerializedName(SERIALIZED_NAME_TOKEN_ID) - @jakarta.annotation.Nullable - private String tokenId; - - public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp"; - - @SerializedName(SERIALIZED_NAME_TIMESTAMP) - @jakarta.annotation.Nullable - private Long timestamp; - - public GetNFTDepositHistoryResponseListInner() {} - - public GetNFTDepositHistoryResponseListInner network( - @jakarta.annotation.Nullable String network) { - this.network = network; - return this; - } - - /** - * Get network - * - * @return network - */ - @jakarta.annotation.Nullable - public String getNetwork() { - return network; - } - - public void setNetwork(@jakarta.annotation.Nullable String network) { - this.network = network; - } - - public GetNFTDepositHistoryResponseListInner txID(@jakarta.annotation.Nullable String txID) { - this.txID = txID; - return this; - } - - /** - * Get txID - * - * @return txID - */ - @jakarta.annotation.Nullable - public String getTxID() { - return txID; - } - - public void setTxID(@jakarta.annotation.Nullable String txID) { - this.txID = txID; - } - - public GetNFTDepositHistoryResponseListInner contractAdrress( - @jakarta.annotation.Nullable String contractAdrress) { - this.contractAdrress = contractAdrress; - return this; - } - - /** - * Get contractAdrress - * - * @return contractAdrress - */ - @jakarta.annotation.Nullable - public String getContractAdrress() { - return contractAdrress; - } - - public void setContractAdrress(@jakarta.annotation.Nullable String contractAdrress) { - this.contractAdrress = contractAdrress; - } - - public GetNFTDepositHistoryResponseListInner tokenId( - @jakarta.annotation.Nullable String tokenId) { - this.tokenId = tokenId; - return this; - } - - /** - * Get tokenId - * - * @return tokenId - */ - @jakarta.annotation.Nullable - public String getTokenId() { - return tokenId; - } - - public void setTokenId(@jakarta.annotation.Nullable String tokenId) { - this.tokenId = tokenId; - } - - public GetNFTDepositHistoryResponseListInner timestamp( - @jakarta.annotation.Nullable Long timestamp) { - this.timestamp = timestamp; - return this; - } - - /** - * Get timestamp - * - * @return timestamp - */ - @jakarta.annotation.Nullable - public Long getTimestamp() { - return timestamp; - } - - public void setTimestamp(@jakarta.annotation.Nullable Long timestamp) { - this.timestamp = timestamp; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetNFTDepositHistoryResponseListInner getNFTDepositHistoryResponseListInner = - (GetNFTDepositHistoryResponseListInner) o; - return Objects.equals(this.network, getNFTDepositHistoryResponseListInner.network) - && Objects.equals(this.txID, getNFTDepositHistoryResponseListInner.txID) - && Objects.equals( - this.contractAdrress, getNFTDepositHistoryResponseListInner.contractAdrress) - && Objects.equals(this.tokenId, getNFTDepositHistoryResponseListInner.tokenId) - && Objects.equals(this.timestamp, getNFTDepositHistoryResponseListInner.timestamp); - } - - @Override - public int hashCode() { - return Objects.hash(network, txID, contractAdrress, tokenId, timestamp); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetNFTDepositHistoryResponseListInner {\n"); - sb.append(" network: ").append(toIndentedString(network)).append("\n"); - sb.append(" txID: ").append(toIndentedString(txID)).append("\n"); - sb.append(" contractAdrress: ").append(toIndentedString(contractAdrress)).append("\n"); - sb.append(" tokenId: ").append(toIndentedString(tokenId)).append("\n"); - sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object networkValue = getNetwork(); - String networkValueAsString = ""; - networkValueAsString = networkValue.toString(); - sb.append("network=").append(urlEncode(networkValueAsString)).append(""); - Object txIDValue = getTxID(); - String txIDValueAsString = ""; - txIDValueAsString = txIDValue.toString(); - sb.append("txID=").append(urlEncode(txIDValueAsString)).append(""); - Object contractAdrressValue = getContractAdrress(); - String contractAdrressValueAsString = ""; - contractAdrressValueAsString = contractAdrressValue.toString(); - sb.append("contractAdrress=").append(urlEncode(contractAdrressValueAsString)).append(""); - Object tokenIdValue = getTokenId(); - String tokenIdValueAsString = ""; - tokenIdValueAsString = tokenIdValue.toString(); - sb.append("tokenId=").append(urlEncode(tokenIdValueAsString)).append(""); - Object timestampValue = getTimestamp(); - String timestampValueAsString = ""; - timestampValueAsString = timestampValue.toString(); - sb.append("timestamp=").append(urlEncode(timestampValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * 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 "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("network"); - openapiFields.add("txID"); - openapiFields.add("contractAdrress"); - openapiFields.add("tokenId"); - openapiFields.add("timestamp"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * GetNFTDepositHistoryResponseListInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetNFTDepositHistoryResponseListInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in GetNFTDepositHistoryResponseListInner" - + " is not found in the empty JSON string", - GetNFTDepositHistoryResponseListInner.openapiRequiredFields - .toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("network") != null && !jsonObj.get("network").isJsonNull()) - && !jsonObj.get("network").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `network` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("network").toString())); - } - if ((jsonObj.get("txID") != null && !jsonObj.get("txID").isJsonNull()) - && !jsonObj.get("txID").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `txID` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("txID").toString())); - } - if ((jsonObj.get("contractAdrress") != null && !jsonObj.get("contractAdrress").isJsonNull()) - && !jsonObj.get("contractAdrress").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `contractAdrress` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("contractAdrress").toString())); - } - if ((jsonObj.get("tokenId") != null && !jsonObj.get("tokenId").isJsonNull()) - && !jsonObj.get("tokenId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tokenId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("tokenId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetNFTDepositHistoryResponseListInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetNFTDepositHistoryResponseListInner' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(GetNFTDepositHistoryResponseListInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, GetNFTDepositHistoryResponseListInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetNFTDepositHistoryResponseListInner read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GetNFTDepositHistoryResponseListInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetNFTDepositHistoryResponseListInner - * @throws IOException if the JSON string is invalid with respect to - * GetNFTDepositHistoryResponseListInner - */ - public static GetNFTDepositHistoryResponseListInner fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, GetNFTDepositHistoryResponseListInner.class); - } - - /** - * Convert an instance of GetNFTDepositHistoryResponseListInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTTransactionHistoryResponse.java b/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTTransactionHistoryResponse.java deleted file mode 100644 index 22346d1e4..000000000 --- a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTTransactionHistoryResponse.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Binance NFT REST API - * OpenAPI Specification for the Binance NFT REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * 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.binance.connector.client.nft.rest.model; - -import com.binance.connector.client.nft.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** GetNFTTransactionHistoryResponse */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetNFTTransactionHistoryResponse { - public static final String SERIALIZED_NAME_TOTAL = "total"; - - @SerializedName(SERIALIZED_NAME_TOTAL) - @jakarta.annotation.Nullable - private Long total; - - public static final String SERIALIZED_NAME_LIST = "list"; - - @SerializedName(SERIALIZED_NAME_LIST) - @jakarta.annotation.Nullable - private List<@Valid GetNFTTransactionHistoryResponseListInner> _list; - - public GetNFTTransactionHistoryResponse() {} - - public GetNFTTransactionHistoryResponse total(@jakarta.annotation.Nullable Long total) { - this.total = total; - return this; - } - - /** - * Get total - * - * @return total - */ - @jakarta.annotation.Nullable - public Long getTotal() { - return total; - } - - public void setTotal(@jakarta.annotation.Nullable Long total) { - this.total = total; - } - - public GetNFTTransactionHistoryResponse _list( - @jakarta.annotation.Nullable - List<@Valid GetNFTTransactionHistoryResponseListInner> _list) { - this._list = _list; - return this; - } - - public GetNFTTransactionHistoryResponse addListItem( - GetNFTTransactionHistoryResponseListInner _listItem) { - if (this._list == null) { - this._list = new ArrayList<>(); - } - this._list.add(_listItem); - return this; - } - - /** - * Get _list - * - * @return _list - */ - @jakarta.annotation.Nullable - @Valid - public List<@Valid GetNFTTransactionHistoryResponseListInner> getList() { - return _list; - } - - public void setList( - @jakarta.annotation.Nullable - List<@Valid GetNFTTransactionHistoryResponseListInner> _list) { - this._list = _list; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetNFTTransactionHistoryResponse getNFTTransactionHistoryResponse = - (GetNFTTransactionHistoryResponse) o; - return Objects.equals(this.total, getNFTTransactionHistoryResponse.total) - && Objects.equals(this._list, getNFTTransactionHistoryResponse._list); - } - - @Override - public int hashCode() { - return Objects.hash(total, _list); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetNFTTransactionHistoryResponse {\n"); - sb.append(" total: ").append(toIndentedString(total)).append("\n"); - sb.append(" _list: ").append(toIndentedString(_list)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object totalValue = getTotal(); - String totalValueAsString = ""; - totalValueAsString = totalValue.toString(); - sb.append("total=").append(urlEncode(totalValueAsString)).append(""); - Object _listValue = getList(); - String _listValueAsString = ""; - _listValueAsString = - (String) - ((Collection) _listValue) - .stream().map(Object::toString).collect(Collectors.joining(",")); - sb.append("_list=").append(urlEncode(_listValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * 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 "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("total"); - openapiFields.add("list"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * GetNFTTransactionHistoryResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetNFTTransactionHistoryResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in GetNFTTransactionHistoryResponse is" - + " not found in the empty JSON string", - GetNFTTransactionHistoryResponse.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("list") != null && !jsonObj.get("list").isJsonNull()) { - JsonArray jsonArray_list = jsonObj.getAsJsonArray("list"); - if (jsonArray_list != null) { - // ensure the json data is an array - if (!jsonObj.get("list").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `list` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("list").toString())); - } - - // validate the optional field `list` (array) - for (int i = 0; i < jsonArray_list.size(); i++) { - GetNFTTransactionHistoryResponseListInner.validateJsonElement( - jsonArray_list.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetNFTTransactionHistoryResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetNFTTransactionHistoryResponse' and - // its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(GetNFTTransactionHistoryResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, GetNFTTransactionHistoryResponse value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetNFTTransactionHistoryResponse read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GetNFTTransactionHistoryResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetNFTTransactionHistoryResponse - * @throws IOException if the JSON string is invalid with respect to - * GetNFTTransactionHistoryResponse - */ - public static GetNFTTransactionHistoryResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetNFTTransactionHistoryResponse.class); - } - - /** - * Convert an instance of GetNFTTransactionHistoryResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTTransactionHistoryResponseListInner.java b/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTTransactionHistoryResponseListInner.java deleted file mode 100644 index 9d3ba5a02..000000000 --- a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTTransactionHistoryResponseListInner.java +++ /dev/null @@ -1,416 +0,0 @@ -/* - * Binance NFT REST API - * OpenAPI Specification for the Binance NFT REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * 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.binance.connector.client.nft.rest.model; - -import com.binance.connector.client.nft.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** GetNFTTransactionHistoryResponseListInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetNFTTransactionHistoryResponseListInner { - public static final String SERIALIZED_NAME_ORDER_NO = "orderNo"; - - @SerializedName(SERIALIZED_NAME_ORDER_NO) - @jakarta.annotation.Nullable - private String orderNo; - - public static final String SERIALIZED_NAME_TOKENS = "tokens"; - - @SerializedName(SERIALIZED_NAME_TOKENS) - @jakarta.annotation.Nullable - private List<@Valid GetNFTTransactionHistoryResponseListInnerTokensInner> tokens; - - public static final String SERIALIZED_NAME_TRADE_TIME = "tradeTime"; - - @SerializedName(SERIALIZED_NAME_TRADE_TIME) - @jakarta.annotation.Nullable - private Long tradeTime; - - public static final String SERIALIZED_NAME_TRADE_AMOUNT = "tradeAmount"; - - @SerializedName(SERIALIZED_NAME_TRADE_AMOUNT) - @jakarta.annotation.Nullable - private String tradeAmount; - - public static final String SERIALIZED_NAME_TRADE_CURRENCY = "tradeCurrency"; - - @SerializedName(SERIALIZED_NAME_TRADE_CURRENCY) - @jakarta.annotation.Nullable - private String tradeCurrency; - - public GetNFTTransactionHistoryResponseListInner() {} - - public GetNFTTransactionHistoryResponseListInner orderNo( - @jakarta.annotation.Nullable String orderNo) { - this.orderNo = orderNo; - return this; - } - - /** - * Get orderNo - * - * @return orderNo - */ - @jakarta.annotation.Nullable - public String getOrderNo() { - return orderNo; - } - - public void setOrderNo(@jakarta.annotation.Nullable String orderNo) { - this.orderNo = orderNo; - } - - public GetNFTTransactionHistoryResponseListInner tokens( - @jakarta.annotation.Nullable - List<@Valid GetNFTTransactionHistoryResponseListInnerTokensInner> tokens) { - this.tokens = tokens; - return this; - } - - public GetNFTTransactionHistoryResponseListInner addTokensItem( - GetNFTTransactionHistoryResponseListInnerTokensInner tokensItem) { - if (this.tokens == null) { - this.tokens = new ArrayList<>(); - } - this.tokens.add(tokensItem); - return this; - } - - /** - * Get tokens - * - * @return tokens - */ - @jakarta.annotation.Nullable - @Valid - public List<@Valid GetNFTTransactionHistoryResponseListInnerTokensInner> getTokens() { - return tokens; - } - - public void setTokens( - @jakarta.annotation.Nullable - List<@Valid GetNFTTransactionHistoryResponseListInnerTokensInner> tokens) { - this.tokens = tokens; - } - - public GetNFTTransactionHistoryResponseListInner tradeTime( - @jakarta.annotation.Nullable Long tradeTime) { - this.tradeTime = tradeTime; - return this; - } - - /** - * Get tradeTime - * - * @return tradeTime - */ - @jakarta.annotation.Nullable - public Long getTradeTime() { - return tradeTime; - } - - public void setTradeTime(@jakarta.annotation.Nullable Long tradeTime) { - this.tradeTime = tradeTime; - } - - public GetNFTTransactionHistoryResponseListInner tradeAmount( - @jakarta.annotation.Nullable String tradeAmount) { - this.tradeAmount = tradeAmount; - return this; - } - - /** - * Get tradeAmount - * - * @return tradeAmount - */ - @jakarta.annotation.Nullable - public String getTradeAmount() { - return tradeAmount; - } - - public void setTradeAmount(@jakarta.annotation.Nullable String tradeAmount) { - this.tradeAmount = tradeAmount; - } - - public GetNFTTransactionHistoryResponseListInner tradeCurrency( - @jakarta.annotation.Nullable String tradeCurrency) { - this.tradeCurrency = tradeCurrency; - return this; - } - - /** - * Get tradeCurrency - * - * @return tradeCurrency - */ - @jakarta.annotation.Nullable - public String getTradeCurrency() { - return tradeCurrency; - } - - public void setTradeCurrency(@jakarta.annotation.Nullable String tradeCurrency) { - this.tradeCurrency = tradeCurrency; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetNFTTransactionHistoryResponseListInner getNFTTransactionHistoryResponseListInner = - (GetNFTTransactionHistoryResponseListInner) o; - return Objects.equals(this.orderNo, getNFTTransactionHistoryResponseListInner.orderNo) - && Objects.equals(this.tokens, getNFTTransactionHistoryResponseListInner.tokens) - && Objects.equals( - this.tradeTime, getNFTTransactionHistoryResponseListInner.tradeTime) - && Objects.equals( - this.tradeAmount, getNFTTransactionHistoryResponseListInner.tradeAmount) - && Objects.equals( - this.tradeCurrency, - getNFTTransactionHistoryResponseListInner.tradeCurrency); - } - - @Override - public int hashCode() { - return Objects.hash(orderNo, tokens, tradeTime, tradeAmount, tradeCurrency); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetNFTTransactionHistoryResponseListInner {\n"); - sb.append(" orderNo: ").append(toIndentedString(orderNo)).append("\n"); - sb.append(" tokens: ").append(toIndentedString(tokens)).append("\n"); - sb.append(" tradeTime: ").append(toIndentedString(tradeTime)).append("\n"); - sb.append(" tradeAmount: ").append(toIndentedString(tradeAmount)).append("\n"); - sb.append(" tradeCurrency: ").append(toIndentedString(tradeCurrency)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object orderNoValue = getOrderNo(); - String orderNoValueAsString = ""; - orderNoValueAsString = orderNoValue.toString(); - sb.append("orderNo=").append(urlEncode(orderNoValueAsString)).append(""); - Object tokensValue = getTokens(); - String tokensValueAsString = ""; - tokensValueAsString = - (String) - ((Collection) tokensValue) - .stream().map(Object::toString).collect(Collectors.joining(",")); - sb.append("tokens=").append(urlEncode(tokensValueAsString)).append(""); - Object tradeTimeValue = getTradeTime(); - String tradeTimeValueAsString = ""; - tradeTimeValueAsString = tradeTimeValue.toString(); - sb.append("tradeTime=").append(urlEncode(tradeTimeValueAsString)).append(""); - Object tradeAmountValue = getTradeAmount(); - String tradeAmountValueAsString = ""; - tradeAmountValueAsString = tradeAmountValue.toString(); - sb.append("tradeAmount=").append(urlEncode(tradeAmountValueAsString)).append(""); - Object tradeCurrencyValue = getTradeCurrency(); - String tradeCurrencyValueAsString = ""; - tradeCurrencyValueAsString = tradeCurrencyValue.toString(); - sb.append("tradeCurrency=").append(urlEncode(tradeCurrencyValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * 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 "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("orderNo"); - openapiFields.add("tokens"); - openapiFields.add("tradeTime"); - openapiFields.add("tradeAmount"); - openapiFields.add("tradeCurrency"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * GetNFTTransactionHistoryResponseListInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetNFTTransactionHistoryResponseListInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " GetNFTTransactionHistoryResponseListInner is not found in" - + " the empty JSON string", - GetNFTTransactionHistoryResponseListInner.openapiRequiredFields - .toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("orderNo") != null && !jsonObj.get("orderNo").isJsonNull()) - && !jsonObj.get("orderNo").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `orderNo` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("orderNo").toString())); - } - if (jsonObj.get("tokens") != null && !jsonObj.get("tokens").isJsonNull()) { - JsonArray jsonArraytokens = jsonObj.getAsJsonArray("tokens"); - if (jsonArraytokens != null) { - // ensure the json data is an array - if (!jsonObj.get("tokens").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tokens` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("tokens").toString())); - } - - // validate the optional field `tokens` (array) - for (int i = 0; i < jsonArraytokens.size(); i++) { - GetNFTTransactionHistoryResponseListInnerTokensInner.validateJsonElement( - jsonArraytokens.get(i)); - } - ; - } - } - if ((jsonObj.get("tradeAmount") != null && !jsonObj.get("tradeAmount").isJsonNull()) - && !jsonObj.get("tradeAmount").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tradeAmount` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("tradeAmount").toString())); - } - if ((jsonObj.get("tradeCurrency") != null && !jsonObj.get("tradeCurrency").isJsonNull()) - && !jsonObj.get("tradeCurrency").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tradeCurrency` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("tradeCurrency").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetNFTTransactionHistoryResponseListInner.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'GetNFTTransactionHistoryResponseListInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(GetNFTTransactionHistoryResponseListInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, GetNFTTransactionHistoryResponseListInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetNFTTransactionHistoryResponseListInner read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GetNFTTransactionHistoryResponseListInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetNFTTransactionHistoryResponseListInner - * @throws IOException if the JSON string is invalid with respect to - * GetNFTTransactionHistoryResponseListInner - */ - public static GetNFTTransactionHistoryResponseListInner fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, GetNFTTransactionHistoryResponseListInner.class); - } - - /** - * Convert an instance of GetNFTTransactionHistoryResponseListInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTTransactionHistoryResponseListInnerTokensInner.java b/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTTransactionHistoryResponseListInnerTokensInner.java deleted file mode 100644 index ce26c23e0..000000000 --- a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTTransactionHistoryResponseListInnerTokensInner.java +++ /dev/null @@ -1,316 +0,0 @@ -/* - * Binance NFT REST API - * OpenAPI Specification for the Binance NFT REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * 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.binance.connector.client.nft.rest.model; - -import com.binance.connector.client.nft.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** GetNFTTransactionHistoryResponseListInnerTokensInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetNFTTransactionHistoryResponseListInnerTokensInner { - public static final String SERIALIZED_NAME_NETWORK = "network"; - - @SerializedName(SERIALIZED_NAME_NETWORK) - @jakarta.annotation.Nullable - private String network; - - public static final String SERIALIZED_NAME_TOKEN_ID = "tokenId"; - - @SerializedName(SERIALIZED_NAME_TOKEN_ID) - @jakarta.annotation.Nullable - private String tokenId; - - public static final String SERIALIZED_NAME_CONTRACT_ADDRESS = "contractAddress"; - - @SerializedName(SERIALIZED_NAME_CONTRACT_ADDRESS) - @jakarta.annotation.Nullable - private String contractAddress; - - public GetNFTTransactionHistoryResponseListInnerTokensInner() {} - - public GetNFTTransactionHistoryResponseListInnerTokensInner network( - @jakarta.annotation.Nullable String network) { - this.network = network; - return this; - } - - /** - * Get network - * - * @return network - */ - @jakarta.annotation.Nullable - public String getNetwork() { - return network; - } - - public void setNetwork(@jakarta.annotation.Nullable String network) { - this.network = network; - } - - public GetNFTTransactionHistoryResponseListInnerTokensInner tokenId( - @jakarta.annotation.Nullable String tokenId) { - this.tokenId = tokenId; - return this; - } - - /** - * Get tokenId - * - * @return tokenId - */ - @jakarta.annotation.Nullable - public String getTokenId() { - return tokenId; - } - - public void setTokenId(@jakarta.annotation.Nullable String tokenId) { - this.tokenId = tokenId; - } - - public GetNFTTransactionHistoryResponseListInnerTokensInner contractAddress( - @jakarta.annotation.Nullable String contractAddress) { - this.contractAddress = contractAddress; - return this; - } - - /** - * Get contractAddress - * - * @return contractAddress - */ - @jakarta.annotation.Nullable - public String getContractAddress() { - return contractAddress; - } - - public void setContractAddress(@jakarta.annotation.Nullable String contractAddress) { - this.contractAddress = contractAddress; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetNFTTransactionHistoryResponseListInnerTokensInner - getNFTTransactionHistoryResponseListInnerTokensInner = - (GetNFTTransactionHistoryResponseListInnerTokensInner) o; - return Objects.equals( - this.network, getNFTTransactionHistoryResponseListInnerTokensInner.network) - && Objects.equals( - this.tokenId, getNFTTransactionHistoryResponseListInnerTokensInner.tokenId) - && Objects.equals( - this.contractAddress, - getNFTTransactionHistoryResponseListInnerTokensInner.contractAddress); - } - - @Override - public int hashCode() { - return Objects.hash(network, tokenId, contractAddress); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetNFTTransactionHistoryResponseListInnerTokensInner {\n"); - sb.append(" network: ").append(toIndentedString(network)).append("\n"); - sb.append(" tokenId: ").append(toIndentedString(tokenId)).append("\n"); - sb.append(" contractAddress: ").append(toIndentedString(contractAddress)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object networkValue = getNetwork(); - String networkValueAsString = ""; - networkValueAsString = networkValue.toString(); - sb.append("network=").append(urlEncode(networkValueAsString)).append(""); - Object tokenIdValue = getTokenId(); - String tokenIdValueAsString = ""; - tokenIdValueAsString = tokenIdValue.toString(); - sb.append("tokenId=").append(urlEncode(tokenIdValueAsString)).append(""); - Object contractAddressValue = getContractAddress(); - String contractAddressValueAsString = ""; - contractAddressValueAsString = contractAddressValue.toString(); - sb.append("contractAddress=").append(urlEncode(contractAddressValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * 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 "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("network"); - openapiFields.add("tokenId"); - openapiFields.add("contractAddress"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * GetNFTTransactionHistoryResponseListInnerTokensInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetNFTTransactionHistoryResponseListInnerTokensInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in" - + " GetNFTTransactionHistoryResponseListInnerTokensInner is not" - + " found in the empty JSON string", - GetNFTTransactionHistoryResponseListInnerTokensInner - .openapiRequiredFields - .toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("network") != null && !jsonObj.get("network").isJsonNull()) - && !jsonObj.get("network").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `network` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("network").toString())); - } - if ((jsonObj.get("tokenId") != null && !jsonObj.get("tokenId").isJsonNull()) - && !jsonObj.get("tokenId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tokenId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("tokenId").toString())); - } - if ((jsonObj.get("contractAddress") != null && !jsonObj.get("contractAddress").isJsonNull()) - && !jsonObj.get("contractAddress").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `contractAddress` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("contractAddress").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetNFTTransactionHistoryResponseListInnerTokensInner.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'GetNFTTransactionHistoryResponseListInnerTokensInner' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, - TypeToken.get( - GetNFTTransactionHistoryResponseListInnerTokensInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, - GetNFTTransactionHistoryResponseListInnerTokensInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetNFTTransactionHistoryResponseListInnerTokensInner read( - JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GetNFTTransactionHistoryResponseListInnerTokensInner given an JSON - * string - * - * @param jsonString JSON string - * @return An instance of GetNFTTransactionHistoryResponseListInnerTokensInner - * @throws IOException if the JSON string is invalid with respect to - * GetNFTTransactionHistoryResponseListInnerTokensInner - */ - public static GetNFTTransactionHistoryResponseListInnerTokensInner fromJson(String jsonString) - throws IOException { - return JSON.getGson() - .fromJson(jsonString, GetNFTTransactionHistoryResponseListInnerTokensInner.class); - } - - /** - * Convert an instance of GetNFTTransactionHistoryResponseListInnerTokensInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTWithdrawHistoryResponse.java b/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTWithdrawHistoryResponse.java deleted file mode 100644 index c0ca55313..000000000 --- a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTWithdrawHistoryResponse.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Binance NFT REST API - * OpenAPI Specification for the Binance NFT REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * 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.binance.connector.client.nft.rest.model; - -import com.binance.connector.client.nft.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; -import org.hibernate.validator.constraints.*; - -/** GetNFTWithdrawHistoryResponse */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetNFTWithdrawHistoryResponse { - public static final String SERIALIZED_NAME_TOTAL = "total"; - - @SerializedName(SERIALIZED_NAME_TOTAL) - @jakarta.annotation.Nullable - private Long total; - - public static final String SERIALIZED_NAME_LIST = "list"; - - @SerializedName(SERIALIZED_NAME_LIST) - @jakarta.annotation.Nullable - private List<@Valid GetNFTWithdrawHistoryResponseListInner> _list; - - public GetNFTWithdrawHistoryResponse() {} - - public GetNFTWithdrawHistoryResponse total(@jakarta.annotation.Nullable Long total) { - this.total = total; - return this; - } - - /** - * Get total - * - * @return total - */ - @jakarta.annotation.Nullable - public Long getTotal() { - return total; - } - - public void setTotal(@jakarta.annotation.Nullable Long total) { - this.total = total; - } - - public GetNFTWithdrawHistoryResponse _list( - @jakarta.annotation.Nullable - List<@Valid GetNFTWithdrawHistoryResponseListInner> _list) { - this._list = _list; - return this; - } - - public GetNFTWithdrawHistoryResponse addListItem( - GetNFTWithdrawHistoryResponseListInner _listItem) { - if (this._list == null) { - this._list = new ArrayList<>(); - } - this._list.add(_listItem); - return this; - } - - /** - * Get _list - * - * @return _list - */ - @jakarta.annotation.Nullable - @Valid - public List<@Valid GetNFTWithdrawHistoryResponseListInner> getList() { - return _list; - } - - public void setList( - @jakarta.annotation.Nullable - List<@Valid GetNFTWithdrawHistoryResponseListInner> _list) { - this._list = _list; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetNFTWithdrawHistoryResponse getNFTWithdrawHistoryResponse = - (GetNFTWithdrawHistoryResponse) o; - return Objects.equals(this.total, getNFTWithdrawHistoryResponse.total) - && Objects.equals(this._list, getNFTWithdrawHistoryResponse._list); - } - - @Override - public int hashCode() { - return Objects.hash(total, _list); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetNFTWithdrawHistoryResponse {\n"); - sb.append(" total: ").append(toIndentedString(total)).append("\n"); - sb.append(" _list: ").append(toIndentedString(_list)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object totalValue = getTotal(); - String totalValueAsString = ""; - totalValueAsString = totalValue.toString(); - sb.append("total=").append(urlEncode(totalValueAsString)).append(""); - Object _listValue = getList(); - String _listValueAsString = ""; - _listValueAsString = - (String) - ((Collection) _listValue) - .stream().map(Object::toString).collect(Collectors.joining(",")); - sb.append("_list=").append(urlEncode(_listValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * 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 "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("total"); - openapiFields.add("list"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * GetNFTWithdrawHistoryResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetNFTWithdrawHistoryResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in GetNFTWithdrawHistoryResponse is not" - + " found in the empty JSON string", - GetNFTWithdrawHistoryResponse.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("list") != null && !jsonObj.get("list").isJsonNull()) { - JsonArray jsonArray_list = jsonObj.getAsJsonArray("list"); - if (jsonArray_list != null) { - // ensure the json data is an array - if (!jsonObj.get("list").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `list` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("list").toString())); - } - - // validate the optional field `list` (array) - for (int i = 0; i < jsonArray_list.size(); i++) { - GetNFTWithdrawHistoryResponseListInner.validateJsonElement( - jsonArray_list.get(i)); - } - ; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetNFTWithdrawHistoryResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetNFTWithdrawHistoryResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(GetNFTWithdrawHistoryResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, GetNFTWithdrawHistoryResponse value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetNFTWithdrawHistoryResponse read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GetNFTWithdrawHistoryResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetNFTWithdrawHistoryResponse - * @throws IOException if the JSON string is invalid with respect to - * GetNFTWithdrawHistoryResponse - */ - public static GetNFTWithdrawHistoryResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetNFTWithdrawHistoryResponse.class); - } - - /** - * Convert an instance of GetNFTWithdrawHistoryResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTWithdrawHistoryResponseListInner.java b/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTWithdrawHistoryResponseListInner.java deleted file mode 100644 index 240a204fa..000000000 --- a/clients/nft/src/main/java/com/binance/connector/client/nft/rest/model/GetNFTWithdrawHistoryResponseListInner.java +++ /dev/null @@ -1,452 +0,0 @@ -/* - * Binance NFT REST API - * OpenAPI Specification for the Binance NFT REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * 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.binance.connector.client.nft.rest.model; - -import com.binance.connector.client.nft.rest.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; -import jakarta.validation.constraints.*; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.HashSet; -import java.util.Objects; -import org.hibernate.validator.constraints.*; - -/** GetNFTWithdrawHistoryResponseListInner */ -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.12.0") -public class GetNFTWithdrawHistoryResponseListInner { - public static final String SERIALIZED_NAME_NETWORK = "network"; - - @SerializedName(SERIALIZED_NAME_NETWORK) - @jakarta.annotation.Nullable - private String network; - - public static final String SERIALIZED_NAME_TX_I_D = "txID"; - - @SerializedName(SERIALIZED_NAME_TX_I_D) - @jakarta.annotation.Nullable - private String txID; - - public static final String SERIALIZED_NAME_CONTRACT_ADRRESS = "contractAdrress"; - - @SerializedName(SERIALIZED_NAME_CONTRACT_ADRRESS) - @jakarta.annotation.Nullable - private String contractAdrress; - - public static final String SERIALIZED_NAME_TOKEN_ID = "tokenId"; - - @SerializedName(SERIALIZED_NAME_TOKEN_ID) - @jakarta.annotation.Nullable - private String tokenId; - - public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp"; - - @SerializedName(SERIALIZED_NAME_TIMESTAMP) - @jakarta.annotation.Nullable - private Long timestamp; - - public static final String SERIALIZED_NAME_FEE = "fee"; - - @SerializedName(SERIALIZED_NAME_FEE) - @jakarta.annotation.Nullable - private Double fee; - - public static final String SERIALIZED_NAME_FEE_ASSET = "feeAsset"; - - @SerializedName(SERIALIZED_NAME_FEE_ASSET) - @jakarta.annotation.Nullable - private String feeAsset; - - public GetNFTWithdrawHistoryResponseListInner() {} - - public GetNFTWithdrawHistoryResponseListInner network( - @jakarta.annotation.Nullable String network) { - this.network = network; - return this; - } - - /** - * Get network - * - * @return network - */ - @jakarta.annotation.Nullable - public String getNetwork() { - return network; - } - - public void setNetwork(@jakarta.annotation.Nullable String network) { - this.network = network; - } - - public GetNFTWithdrawHistoryResponseListInner txID(@jakarta.annotation.Nullable String txID) { - this.txID = txID; - return this; - } - - /** - * Get txID - * - * @return txID - */ - @jakarta.annotation.Nullable - public String getTxID() { - return txID; - } - - public void setTxID(@jakarta.annotation.Nullable String txID) { - this.txID = txID; - } - - public GetNFTWithdrawHistoryResponseListInner contractAdrress( - @jakarta.annotation.Nullable String contractAdrress) { - this.contractAdrress = contractAdrress; - return this; - } - - /** - * Get contractAdrress - * - * @return contractAdrress - */ - @jakarta.annotation.Nullable - public String getContractAdrress() { - return contractAdrress; - } - - public void setContractAdrress(@jakarta.annotation.Nullable String contractAdrress) { - this.contractAdrress = contractAdrress; - } - - public GetNFTWithdrawHistoryResponseListInner tokenId( - @jakarta.annotation.Nullable String tokenId) { - this.tokenId = tokenId; - return this; - } - - /** - * Get tokenId - * - * @return tokenId - */ - @jakarta.annotation.Nullable - public String getTokenId() { - return tokenId; - } - - public void setTokenId(@jakarta.annotation.Nullable String tokenId) { - this.tokenId = tokenId; - } - - public GetNFTWithdrawHistoryResponseListInner timestamp( - @jakarta.annotation.Nullable Long timestamp) { - this.timestamp = timestamp; - return this; - } - - /** - * Get timestamp - * - * @return timestamp - */ - @jakarta.annotation.Nullable - public Long getTimestamp() { - return timestamp; - } - - public void setTimestamp(@jakarta.annotation.Nullable Long timestamp) { - this.timestamp = timestamp; - } - - public GetNFTWithdrawHistoryResponseListInner fee(@jakarta.annotation.Nullable Double fee) { - this.fee = fee; - return this; - } - - /** - * Get fee - * - * @return fee - */ - @jakarta.annotation.Nullable - @Valid - public Double getFee() { - return fee; - } - - public void setFee(@jakarta.annotation.Nullable Double fee) { - this.fee = fee; - } - - public GetNFTWithdrawHistoryResponseListInner feeAsset( - @jakarta.annotation.Nullable String feeAsset) { - this.feeAsset = feeAsset; - return this; - } - - /** - * Get feeAsset - * - * @return feeAsset - */ - @jakarta.annotation.Nullable - public String getFeeAsset() { - return feeAsset; - } - - public void setFeeAsset(@jakarta.annotation.Nullable String feeAsset) { - this.feeAsset = feeAsset; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetNFTWithdrawHistoryResponseListInner getNFTWithdrawHistoryResponseListInner = - (GetNFTWithdrawHistoryResponseListInner) o; - return Objects.equals(this.network, getNFTWithdrawHistoryResponseListInner.network) - && Objects.equals(this.txID, getNFTWithdrawHistoryResponseListInner.txID) - && Objects.equals( - this.contractAdrress, - getNFTWithdrawHistoryResponseListInner.contractAdrress) - && Objects.equals(this.tokenId, getNFTWithdrawHistoryResponseListInner.tokenId) - && Objects.equals(this.timestamp, getNFTWithdrawHistoryResponseListInner.timestamp) - && Objects.equals(this.fee, getNFTWithdrawHistoryResponseListInner.fee) - && Objects.equals(this.feeAsset, getNFTWithdrawHistoryResponseListInner.feeAsset); - } - - @Override - public int hashCode() { - return Objects.hash(network, txID, contractAdrress, tokenId, timestamp, fee, feeAsset); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetNFTWithdrawHistoryResponseListInner {\n"); - sb.append(" network: ").append(toIndentedString(network)).append("\n"); - sb.append(" txID: ").append(toIndentedString(txID)).append("\n"); - sb.append(" contractAdrress: ").append(toIndentedString(contractAdrress)).append("\n"); - sb.append(" tokenId: ").append(toIndentedString(tokenId)).append("\n"); - sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); - sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); - sb.append(" feeAsset: ").append(toIndentedString(feeAsset)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object networkValue = getNetwork(); - String networkValueAsString = ""; - networkValueAsString = networkValue.toString(); - sb.append("network=").append(urlEncode(networkValueAsString)).append(""); - Object txIDValue = getTxID(); - String txIDValueAsString = ""; - txIDValueAsString = txIDValue.toString(); - sb.append("txID=").append(urlEncode(txIDValueAsString)).append(""); - Object contractAdrressValue = getContractAdrress(); - String contractAdrressValueAsString = ""; - contractAdrressValueAsString = contractAdrressValue.toString(); - sb.append("contractAdrress=").append(urlEncode(contractAdrressValueAsString)).append(""); - Object tokenIdValue = getTokenId(); - String tokenIdValueAsString = ""; - tokenIdValueAsString = tokenIdValue.toString(); - sb.append("tokenId=").append(urlEncode(tokenIdValueAsString)).append(""); - Object timestampValue = getTimestamp(); - String timestampValueAsString = ""; - timestampValueAsString = timestampValue.toString(); - sb.append("timestamp=").append(urlEncode(timestampValueAsString)).append(""); - Object feeValue = getFee(); - String feeValueAsString = ""; - feeValueAsString = feeValue.toString(); - sb.append("fee=").append(urlEncode(feeValueAsString)).append(""); - Object feeAssetValue = getFeeAsset(); - String feeAssetValueAsString = ""; - feeAssetValueAsString = feeAssetValue.toString(); - sb.append("feeAsset=").append(urlEncode(feeAssetValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } - } - - /** - * 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 "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("network"); - openapiFields.add("txID"); - openapiFields.add("contractAdrress"); - openapiFields.add("tokenId"); - openapiFields.add("timestamp"); - openapiFields.add("fee"); - openapiFields.add("feeAsset"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to - * GetNFTWithdrawHistoryResponseListInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetNFTWithdrawHistoryResponseListInner.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in GetNFTWithdrawHistoryResponseListInner" - + " is not found in the empty JSON string", - GetNFTWithdrawHistoryResponseListInner.openapiRequiredFields - .toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("network") != null && !jsonObj.get("network").isJsonNull()) - && !jsonObj.get("network").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `network` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("network").toString())); - } - if ((jsonObj.get("txID") != null && !jsonObj.get("txID").isJsonNull()) - && !jsonObj.get("txID").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `txID` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("txID").toString())); - } - if ((jsonObj.get("contractAdrress") != null && !jsonObj.get("contractAdrress").isJsonNull()) - && !jsonObj.get("contractAdrress").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `contractAdrress` to be a primitive type in the" - + " JSON string but got `%s`", - jsonObj.get("contractAdrress").toString())); - } - if ((jsonObj.get("tokenId") != null && !jsonObj.get("tokenId").isJsonNull()) - && !jsonObj.get("tokenId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `tokenId` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("tokenId").toString())); - } - if ((jsonObj.get("feeAsset") != null && !jsonObj.get("feeAsset").isJsonNull()) - && !jsonObj.get("feeAsset").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `feeAsset` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("feeAsset").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetNFTWithdrawHistoryResponseListInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetNFTWithdrawHistoryResponseListInner' - // and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(GetNFTWithdrawHistoryResponseListInner.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write( - JsonWriter out, GetNFTWithdrawHistoryResponseListInner value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public GetNFTWithdrawHistoryResponseListInner read(JsonReader in) - throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of GetNFTWithdrawHistoryResponseListInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetNFTWithdrawHistoryResponseListInner - * @throws IOException if the JSON string is invalid with respect to - * GetNFTWithdrawHistoryResponseListInner - */ - public static GetNFTWithdrawHistoryResponseListInner fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, GetNFTWithdrawHistoryResponseListInner.class); - } - - /** - * Convert an instance of GetNFTWithdrawHistoryResponseListInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/clients/nft/src/test/java/com/binance/connector/client/nft/rest/api/NftApiTest.java b/clients/nft/src/test/java/com/binance/connector/client/nft/rest/api/NftApiTest.java deleted file mode 100644 index 3d995b60d..000000000 --- a/clients/nft/src/test/java/com/binance/connector/client/nft/rest/api/NftApiTest.java +++ /dev/null @@ -1,229 +0,0 @@ -/* - * Binance NFT REST API - * OpenAPI Specification for the Binance NFT REST API - * - * The version of the OpenAPI document: 1.0.0 - * - * - * 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.binance.connector.client.nft.rest.api; - -import static org.junit.Assert.assertEquals; - -import com.binance.connector.client.common.ApiClient; -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.auth.BinanceAuthenticationFactory; -import com.binance.connector.client.common.auth.SignatureAuthentication; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.configuration.SignatureConfiguration; -import com.binance.connector.client.common.sign.HmacSignatureGenerator; -import com.binance.connector.client.common.sign.SignatureGenerator; -import com.binance.connector.client.nft.rest.model.GetNFTAssetResponse; -import com.binance.connector.client.nft.rest.model.GetNFTDepositHistoryResponse; -import com.binance.connector.client.nft.rest.model.GetNFTTransactionHistoryResponse; -import com.binance.connector.client.nft.rest.model.GetNFTWithdrawHistoryResponse; -import jakarta.validation.constraints.*; -import okhttp3.Call; -import okhttp3.Request; -import org.bouncycastle.crypto.CryptoException; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; - -/** API tests for NftApi */ -public class NftApiTest { - - private NftApi api; - private ApiClient apiClientSpy; - private SignatureGenerator signatureGeneratorSpy; - - @BeforeEach - public void initApiClient() throws ApiException { - ClientConfiguration clientConfiguration = new ClientConfiguration(); - clientConfiguration.setUrl("http://localhost:8080"); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setSecretKey("secretKey"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - - HmacSignatureGenerator signatureGenerator = - new HmacSignatureGenerator(signatureConfiguration.getSecretKey()); - signatureGeneratorSpy = Mockito.spy(signatureGenerator); - SignatureAuthentication signatureAuthentication = - new SignatureAuthentication( - signatureConfiguration.getApiKey(), signatureGeneratorSpy); - SignatureAuthentication authenticationSpy = Mockito.spy(signatureAuthentication); - Mockito.doReturn("1736393892000").when(authenticationSpy).buildTimestamp(); - - BinanceAuthenticationFactory factoryMock = Mockito.mock(BinanceAuthenticationFactory.class); - Mockito.doReturn(authenticationSpy) - .when(factoryMock) - .getAuthentication(signatureConfiguration); - - ApiClient apiClient = new ApiClient(clientConfiguration, factoryMock); - - apiClientSpy = Mockito.spy(apiClient); - Mockito.doReturn(new ApiResponse<>(200, null)) - .when(apiClientSpy) - .execute(Mockito.any(), Mockito.any(java.lang.reflect.Type.class)); - Mockito.doReturn(new ApiResponse<>(200, null)).when(apiClientSpy).execute(Mockito.any()); - Mockito.doReturn("1736393892000").when(apiClientSpy).buildTimestamp(); - - api = new NftApi(apiClientSpy); - } - - /** - * Get NFT Asset(USER_DATA) - * - *

Get NFT Asset Weight: 3000 - * - * @throws ApiException if the Api call fails - */ - @Test - public void getNFTAssetTest() throws ApiException, CryptoException { - Long limit = 50L; - Long page = 1L; - Long recvWindow = 5000L; - ApiResponse response = api.getNFTAsset(limit, page, recvWindow); - - ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); - Mockito.verify(apiClientSpy) - .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); - - ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); - Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - - Call captorValue = callArgumentCaptor.getValue(); - Request actualRequest = captorValue.request(); - - assertEquals( - "limit=50&page=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "5111b91bf27f3938e85071b5d76e42dc08a8c10ea7c9201b0236b1f3cc50a948", - actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/nft/user/getAsset", actualRequest.url().encodedPath()); - } - - /** - * Get NFT Deposit History(USER_DATA) - * - *

et NFT Deposit History * The max interval between startTime and endTime is 90 days. * If - * startTime and endTime are not sent, the recent 7 days' data will be returned. Weight: - * 3000 - * - * @throws ApiException if the Api call fails - */ - @Test - public void getNFTDepositHistoryTest() throws ApiException, CryptoException { - Long startTime = 1623319461670L; - Long endTime = 1641782889000L; - Long limit = 50L; - Long page = 1L; - Long recvWindow = 5000L; - ApiResponse response = - api.getNFTDepositHistory(startTime, endTime, limit, page, recvWindow); - - ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); - Mockito.verify(apiClientSpy) - .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); - - ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); - Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - - Call captorValue = callArgumentCaptor.getValue(); - Request actualRequest = captorValue.request(); - - assertEquals( - "startTime=1623319461670&endTime=1641782889000&limit=50&page=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "a4d596d527181ed42d35b1ac58fcc2e9ccef2cc02eb1391766771b74ad107cad", - actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/nft/history/deposit", actualRequest.url().encodedPath()); - } - - /** - * Get NFT Transaction History(USER_DATA) - * - *

Get NFT Transaction History * The max interval between startTime and endTime is 90 days. * - * If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight: - * 3000 - * - * @throws ApiException if the Api call fails - */ - @Test - public void getNFTTransactionHistoryTest() throws ApiException, CryptoException { - Long orderType = 0L; - Long startTime = 1623319461670L; - Long endTime = 1641782889000L; - Long limit = 50L; - Long page = 1L; - Long recvWindow = 5000L; - ApiResponse response = - api.getNFTTransactionHistory( - orderType, startTime, endTime, limit, page, recvWindow); - - ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); - Mockito.verify(apiClientSpy) - .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); - - ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); - Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - - Call captorValue = callArgumentCaptor.getValue(); - Request actualRequest = captorValue.request(); - - assertEquals( - "orderType=0&startTime=1623319461670&endTime=1641782889000&limit=50&page=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "fc895dc30c73da0e233617fe27ea2b42147507e942ff2c038db7188764459721", - actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/nft/history/transactions", actualRequest.url().encodedPath()); - } - - /** - * Get NFT Withdraw History(USER_DATA) - * - *

Get NFT Withdraw History * The max interval between startTime and endTime is 90 days. * If - * startTime and endTime are not sent, the recent 7 days' data will be returned. Weight: - * 3000 - * - * @throws ApiException if the Api call fails - */ - @Test - public void getNFTWithdrawHistoryTest() throws ApiException, CryptoException { - Long startTime = 1623319461670L; - Long endTime = 1641782889000L; - Long limit = 50L; - Long page = 1L; - Long recvWindow = 5000L; - ApiResponse response = - api.getNFTWithdrawHistory(startTime, endTime, limit, page, recvWindow); - - ArgumentCaptor callArgumentCaptor = ArgumentCaptor.forClass(Call.class); - Mockito.verify(apiClientSpy) - .execute(callArgumentCaptor.capture(), Mockito.any(java.lang.reflect.Type.class)); - - ArgumentCaptor signInputCaptor = ArgumentCaptor.forClass(String.class); - Mockito.verify(signatureGeneratorSpy).signAsString(signInputCaptor.capture()); - - Call captorValue = callArgumentCaptor.getValue(); - Request actualRequest = captorValue.request(); - - assertEquals( - "startTime=1623319461670&endTime=1641782889000&limit=50&page=1&recvWindow=5000×tamp=1736393892000", - signInputCaptor.getValue()); - assertEquals( - "a4d596d527181ed42d35b1ac58fcc2e9ccef2cc02eb1391766771b74ad107cad", - actualRequest.url().queryParameter("signature")); - assertEquals("/sapi/v1/nft/history/withdraw", actualRequest.url().encodedPath()); - } -} diff --git a/clients/pay/CHANGELOG.md b/clients/pay/CHANGELOG.md index ff2745608..90eb9f6c7 100644 --- a/clients/pay/CHANGELOG.md +++ b/clients/pay/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 5.0.1 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 5.0.0 - 2026-07-29 ### Changed (1) diff --git a/clients/pay/docs/rest-api/migration-guide.md b/clients/pay/docs/rest-api/migration-guide.md index 6c36cfc83..253231856 100644 --- a/clients/pay/docs/rest-api/migration-guide.md +++ b/clients/pay/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-pay - 5.0.0 + 5.0.1 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-pay - 5.0.0 + 5.0.1 ``` diff --git a/clients/pay/pom.xml b/clients/pay/pom.xml index 35ce66b26..593b41c65 100644 --- a/clients/pay/pom.xml +++ b/clients/pay/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-pay pay - 5.0.0 + 5.0.1 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/api/DefaultApi.java b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/api/DefaultApi.java index 98fa53d73..cd6bd4245 100644 --- a/clients/pay/src/main/java/com/binance/connector/client/pay/rest/api/DefaultApi.java +++ b/clients/pay/src/main/java/com/binance/connector/client/pay/rest/api/DefaultApi.java @@ -42,7 +42,7 @@ public class DefaultApi { private static final String USER_AGENT = String.format( - "binance-pay/5.0.0 (Java/%s; %s; %s)", + "binance-pay/5.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/pom.xml b/clients/pom.xml index 6bbf4d9af..cde6238bb 100644 --- a/clients/pom.xml +++ b/clients/pom.xml @@ -5,7 +5,7 @@ binance-connector-java-clients pom binance-connector-java-clients - 1.1.3 + 1.1.4 https://github.com/binance/binance-connector-java Java connector to Binance APIs @@ -33,7 +33,6 @@ gift-card margin-trading mining - nft pay rebate simple-earn @@ -404,7 +403,7 @@ 2.12.1 3.18.0 0.2.6 - 2.22.1 + 2.22.3 3.0.0 3.1.1 5.10.3 diff --git a/clients/rebate/CHANGELOG.md b/clients/rebate/CHANGELOG.md index c1484745f..d907e4f92 100644 --- a/clients/rebate/CHANGELOG.md +++ b/clients/rebate/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2.0.1 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 2.0.0 - 2026-07-29 - Update descriptions and examples. diff --git a/clients/rebate/docs/rest-api/migration-guide.md b/clients/rebate/docs/rest-api/migration-guide.md index e589ec2fc..7bd26edef 100644 --- a/clients/rebate/docs/rest-api/migration-guide.md +++ b/clients/rebate/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-rebate - 2.0.0 + 2.0.1 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-rebate - 2.0.0 + 2.0.1 ``` diff --git a/clients/rebate/pom.xml b/clients/rebate/pom.xml index 25fa58c17..9109be2cc 100644 --- a/clients/rebate/pom.xml +++ b/clients/rebate/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-rebate rebate - 2.0.0 + 2.0.1 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/api/DefaultApi.java b/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/api/DefaultApi.java index 23971e500..c21bbfbf9 100644 --- a/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/api/DefaultApi.java +++ b/clients/rebate/src/main/java/com/binance/connector/client/rebate/rest/api/DefaultApi.java @@ -42,7 +42,7 @@ public class DefaultApi { private static final String USER_AGENT = String.format( - "binance-rebate/2.0.0 (Java/%s; %s; %s)", + "binance-rebate/2.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/simple-earn/CHANGELOG.md b/clients/simple-earn/CHANGELOG.md index 2a0f58c95..6e171150f 100644 --- a/clients/simple-earn/CHANGELOG.md +++ b/clients/simple-earn/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 7.0.2 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 7.0.1 - 2026-08-25 ### Changed (1) diff --git a/clients/simple-earn/docs/rest-api/migration-guide.md b/clients/simple-earn/docs/rest-api/migration-guide.md index dce837fee..54c0b3eb2 100644 --- a/clients/simple-earn/docs/rest-api/migration-guide.md +++ b/clients/simple-earn/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-simple-earn - 7.0.0 + 7.0.2 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-simple-earn - 7.0.0 + 7.0.2 ``` diff --git a/clients/simple-earn/pom.xml b/clients/simple-earn/pom.xml index f86c5e00c..dd54ed693 100644 --- a/clients/simple-earn/pom.xml +++ b/clients/simple-earn/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-simple-earn simple-earn - 7.0.1 + 7.0.2 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/BfusdApi.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/BfusdApi.java index 8a1eed540..c9183dd9d 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/BfusdApi.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/BfusdApi.java @@ -54,7 +54,7 @@ public class BfusdApi { private static final String USER_AGENT = String.format( - "binance-simple-earn/7.0.1 (Java/%s; %s; %s)", + "binance-simple-earn/7.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/FlexibleLockedApi.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/FlexibleLockedApi.java index 064a8e85b..ec7703f43 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/FlexibleLockedApi.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/FlexibleLockedApi.java @@ -76,7 +76,7 @@ public class FlexibleLockedApi { private static final String USER_AGENT = String.format( - "binance-simple-earn/7.0.1 (Java/%s; %s; %s)", + "binance-simple-earn/7.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/RwusdApi.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/RwusdApi.java index 6a82e4398..ec7184ba0 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/RwusdApi.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/RwusdApi.java @@ -54,7 +54,7 @@ public class RwusdApi { private static final String USER_AGENT = String.format( - "binance-simple-earn/7.0.1 (Java/%s; %s; %s)", + "binance-simple-earn/7.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/YieldArenaApi.java b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/YieldArenaApi.java index b48b4db1b..5d6a47559 100644 --- a/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/YieldArenaApi.java +++ b/clients/simple-earn/src/main/java/com/binance/connector/client/simple_earn/rest/api/YieldArenaApi.java @@ -42,7 +42,7 @@ public class YieldArenaApi { private static final String USER_AGENT = String.format( - "binance-simple-earn/7.0.1 (Java/%s; %s; %s)", + "binance-simple-earn/7.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/spot/CHANGELOG.md b/clients/spot/CHANGELOG.md index 8ff401769..fdfa6318c 100644 --- a/clients/spot/CHANGELOG.md +++ b/clients/spot/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 11.0.2 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 11.0.0 - 2026-07-29 ### Changed (76) diff --git a/clients/spot/docs/AccountApi.md b/clients/spot/docs/AccountApi.md index 01a5110e9..92ce3406f 100644 --- a/clients/spot/docs/AccountApi.md +++ b/clients/spot/docs/AccountApi.md @@ -398,7 +398,7 @@ No authorization required Query Relevant Filters (USER_DATA) -Retrieves the list of [filters](/products/spot/filters) relevant to an account on a given symbol. This is the only method that shows if an account has [`MAX_ASSET`](/products/spot/filters#max_asset) filters applied to it. Weight(IP): 40 Security Type: USER_DATA Notes: **Data Source:** Memory +Retrieves the list of filters relevant to an account on a given symbol. This is the only method that shows if an account has `MAX_ASSET` filters applied to it. Weight(IP): 40 Security Type: USER_DATA Notes: **Data Source:** Memory ### Example ```java @@ -522,7 +522,7 @@ No authorization required Account trade history (USER_DATA) -Query information about all your trades, filtered by time range. Weight: Condition| Weight| ---| --- |Without orderId|20| |With orderId|5| Security Type: USER_DATA Notes: Data Source: Memory => Database Notes: - If `fromId` is specified, return trades with trade ID >= `fromId`. - If `startTime` and/or `endTime` are specified, trades are filtered by execution time (`time`). - `fromId` cannot be used together with `startTime` and `endTime`. - If `orderId` is specified, only trades related to that order are returned. - `startTime` and `endTime` cannot be used together with `orderId`. - If no condition is specified, the most recent trades are returned. - The time between `startTime` and `endTime` can't be longer than 24 hours. +Query information about all your trades, filtered by time range. Weight: Condition| Weight| ---| --- |Without orderId|20| |With orderId|5| Security Type: USER_DATA Notes: **Data Source:** Memory => Database Notes: - If `fromId` is specified, return trades with trade ID >= `fromId`. - If `startTime` and/or `endTime` are specified, trades are filtered by execution time (`time`). - `fromId` cannot be used together with `startTime` and `endTime`. - If `orderId` is specified, only trades related to that order are returned. - `startTime` and `endTime` cannot be used together with `orderId`. - If no condition is specified, the most recent trades are returned. - The time between `startTime` and `endTime` can't be longer than 24 hours. ### Example ```java @@ -646,7 +646,7 @@ No authorization required Current open orders (USER_DATA) -Query execution status of all open orders. If you need to continuously monitor order status updates, please consider using WebSocket Streams: * `userDataStream.subscribe` if on an authenticated session * `userDataStream.subscribe.signature` if subscribing through signature subscription Weight: | Parameter | Weight | | --------- | ------ | | `symbol` | 6 | | none | 80 | Security Type: USER_DATA Notes: Data Source: Memory => Database +Query execution status of all open orders. If you need to continuously monitor order status updates, please consider using WebSocket Streams: * `userDataStream.subscribe` if on an authenticated session * `userDataStream.subscribe.signature` if subscribing through signature subscription Weight: | Parameter | Weight | | --------- | ------ | | `symbol` | 6 | | none | 80 | Security Type: USER_DATA Notes: **Data Source:** Memory => Database Response Notes: **Note:** The payload above does not show all fields that can appear. Please refer to Conditional fields in Order Responses. ### Example ```java @@ -832,7 +832,7 @@ No authorization required Query order (USER_DATA) -Check execution status of an order. Weight(IP): 4 Security Type: USER_DATA Notes: **Data Source:** Memory => Database Notes: * If both `orderId` and `origClientOrderId` are provided, the `orderId` is searched first, then the `origClientOrderId` from that result is checked against that order. If both conditions are not met the request will be rejected. * For some historical orders the `cummulativeQuoteQty` response field may be negative, meaning the data is not available at this time. +Check execution status of an order. Weight(IP): 4 Security Type: USER_DATA Notes: **Data Source:** Memory => Database Notes: * If both `orderId` and `origClientOrderId` are provided, the `orderId` is searched first, then the `origClientOrderId` from that result is checked against that order. If both conditions are not met the request will be rejected. * For some historical orders the `cummulativeQuoteQty` response field may be negative, meaning the data is not available at this time. Response Notes: **Note:** The payload above does not show all fields that can appear. Please refer to Conditional fields in Order Responses. ### Example ```java diff --git a/clients/spot/docs/AccountRateLimitsOrdersResponse.md b/clients/spot/docs/AccountRateLimitsOrdersResponse.md index 05cb75f49..c8dad6088 100644 --- a/clients/spot/docs/AccountRateLimitsOrdersResponse.md +++ b/clients/spot/docs/AccountRateLimitsOrdersResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<AccountRateLimitsOrdersResponseResultInner>**](AccountRateLimitsOrdersResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<AccountRateLimitsOrdersResponseRateLimitsInner>**](AccountRateLimitsOrdersResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/AccountRateLimitsOrdersResponseRateLimitsInner.md b/clients/spot/docs/AccountRateLimitsOrdersResponseRateLimitsInner.md new file mode 100644 index 000000000..840dca02b --- /dev/null +++ b/clients/spot/docs/AccountRateLimitsOrdersResponseRateLimitsInner.md @@ -0,0 +1,17 @@ + + +# AccountRateLimitsOrdersResponseRateLimitsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rateLimitType** | **String** | | [optional] | +|**interval** | **String** | | [optional] | +|**intervalNum** | **Long** | | [optional] | +|**limit** | **Long** | | [optional] | +|**count** | **Long** | | [optional] | + + + diff --git a/clients/spot/docs/AvgPriceResponseRateLimitsInner.md b/clients/spot/docs/AvgPriceResponseRateLimitsInner.md new file mode 100644 index 000000000..7cba899ec --- /dev/null +++ b/clients/spot/docs/AvgPriceResponseRateLimitsInner.md @@ -0,0 +1,17 @@ + + +# AvgPriceResponseRateLimitsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rateLimitType** | **String** | | [optional] | +|**interval** | **String** | | [optional] | +|**intervalNum** | **Long** | | [optional] | +|**limit** | **Long** | | [optional] | +|**count** | **Long** | | [optional] | + + + diff --git a/clients/spot/docs/DefaultApi.md b/clients/spot/docs/DefaultApi.md index 70c050934..4292b9757 100644 --- a/clients/spot/docs/DefaultApi.md +++ b/clients/spot/docs/DefaultApi.md @@ -14,7 +14,7 @@ All URIs are relative to *http://localhost* | [**kline**](DefaultApi.md#kline) | **POST** /<symbol>@kline_<interval> | Kline/Candlestick Streams for UTC | | [**klineOffset**](DefaultApi.md#klineOffset) | **POST** /<symbol>@kline_<interval>@+08:00 | Kline/Candlestick Streams with timezone offset | | [**miniTicker**](DefaultApi.md#miniTicker) | **POST** /<symbol>@miniTicker | Individual Symbol Mini Ticker Stream | -| [**partialBookDepth**](DefaultApi.md#partialBookDepth) | **POST** /<symbol>@depth<levels>@<updateSpeed> | WebSocket Partial Book Depth Streams | +| [**partialBookDepth**](DefaultApi.md#partialBookDepth) | **POST** /<symbol>@depth<levels>@<updateSpeed> | Partial Book Depth Streams | | [**referencePrice**](DefaultApi.md#referencePrice) | **POST** /<symbol>@referencePrice | Reference Price Streams | | [**rollingWindowTicker**](DefaultApi.md#rollingWindowTicker) | **POST** /<symbol>@ticker_<windowSize> | Individual Symbol Rolling Window Statistics Streams | | [**ticker**](DefaultApi.md#ticker) | **POST** /<symbol>@ticker | Individual Symbol Ticker Streams | @@ -523,7 +523,7 @@ No authorization required Kline/Candlestick Streams with timezone offset -The Kline/Candlestick Stream push updates to the current klines/candlestick every second in `UTC+8` timezone **Kline/Candlestick chart intervals:** Supported intervals: See Kline/Candlestick chart intervals **UTC+8 timezone offset:** - Kline intervals open and close in the UTC+8 timezone. For example the 1d klines will open at the beginning of the UTC+8 day, and close at the end of the UTC+8 day. - Note that E (event time), t (start time) and T (close time) in the payload are Unix timestamps, which are always interpreted in UTC. Update Speed: 1000ms for `1s`, 2000ms for the other intervals +The Kline/Candlestick Stream push updates to the current klines/candlestick every second in `UTC+8` timezone **Kline/Candlestick chart intervals:** Supported intervals: See Kline/Candlestick chart intervals **UTC+8 timezone offset:** - Kline intervals open and close in the `UTC+8` timezone. For example the `1d` klines will open at the beginning of the `UTC+8` day, and close at the end of the `UTC+8` day. - Note that `E` (event time), `t` (start time) and `T` (close time) in the payload are Unix timestamps, which are always interpreted in UTC. Update Speed: 1000ms for `1s`, 2000ms for the other intervals ### Example ```java @@ -645,9 +645,9 @@ No authorization required # **partialBookDepth** > PartialBookDepthResponse partialBookDepth(partialBookDepthRequest) -WebSocket Partial Book Depth Streams +Partial Book Depth Streams -Top **\\<levels\\>** bids and asks, pushed every second. Update Speed: 1000ms or 100ms +Top **\\<levels\\>** bids and asks, pushed every second. Valid **\\<levels\\>** are 5, 10, or 20. Update Speed: 1000ms or 100ms ### Example ```java @@ -771,7 +771,7 @@ No authorization required Individual Symbol Rolling Window Statistics Streams -Rolling window ticker statistics for a single symbol, computed over multiple windows. **Note:** This stream is different from the `<symbol>@ticker` stream. The open time `\"O\"` always starts on a minute, while the closing time `\"C\"` is the current time of the update. As such, the effective window might be up to 59999ms wider than `<window_size>`. Update Speed: 1000ms +Rolling window ticker statistics for a single symbol, computed over multiple windows. **Note:** This stream is different from the `<symbol>@ticker` stream. The open time `\"O\"` always starts on a minute, while the closing time `\"C\"` is the current time of the update. As such, the effective window might be up to 59999ms wider than `<windowSize>`. Update Speed: 1000ms ### Example ```java diff --git a/clients/spot/docs/DepthResponse.md b/clients/spot/docs/DepthResponse.md index f68a1beaa..3bf65f4e8 100644 --- a/clients/spot/docs/DepthResponse.md +++ b/clients/spot/docs/DepthResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**DepthResponseResult**](DepthResponseResult.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<AvgPriceResponseRateLimitsInner>**](AvgPriceResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/ExchangeInfoResponse.md b/clients/spot/docs/ExchangeInfoResponse.md index bde556570..847987eda 100644 --- a/clients/spot/docs/ExchangeInfoResponse.md +++ b/clients/spot/docs/ExchangeInfoResponse.md @@ -9,10 +9,10 @@ |------------ | ------------- | ------------- | -------------| |**timezone** | **String** | | [optional] | |**serverTime** | **Long** | | [optional] | -|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | | [optional] | -|**exchangeFilters** | [**List<ExchangeFilters>**](ExchangeFilters.md) | | [optional] | +|**rateLimits** | [**List<RateLimits>**](RateLimits.md) | Global rate limits. See \"Rate limits\" section. | [optional] | +|**exchangeFilters** | [**List<ExchangeFilters>**](ExchangeFilters.md) | Exchange filters are explained on the \"Filters\" page: All exchange filters are optional. | [optional] | |**symbols** | [**List<ExchangeInfoResponseSymbolsInner>**](ExchangeInfoResponseSymbolsInner.md) | | [optional] | -|**sors** | [**List<ExchangeInfoResponseSorsInner>**](ExchangeInfoResponseSorsInner.md) | | [optional] | +|**sors** | [**List<ExchangeInfoResponseSorsInner>**](ExchangeInfoResponseSorsInner.md) | Optional field. Present only when SOR is available. | [optional] | diff --git a/clients/spot/docs/ExchangeInfoResponseSymbolsInner.md b/clients/spot/docs/ExchangeInfoResponseSymbolsInner.md index e1a14c0d0..6b1d56c4e 100644 --- a/clients/spot/docs/ExchangeInfoResponseSymbolsInner.md +++ b/clients/spot/docs/ExchangeInfoResponseSymbolsInner.md @@ -28,7 +28,7 @@ |**pegInstructionsAllowed** | **Boolean** | | [optional] | |**isSpotTradingAllowed** | **Boolean** | | [optional] | |**isMarginTradingAllowed** | **Boolean** | | [optional] | -|**filters** | [**List<SymbolFilters>**](SymbolFilters.md) | | [optional] | +|**filters** | [**List<SymbolFilters>**](SymbolFilters.md) | Symbol filters are explained on the \"Filters\" page: All symbol filters are optional. | [optional] | |**permissions** | **List<String>** | | [optional] | |**permissionSets** | **List<List<String>>** | | [optional] | |**defaultSelfTradePreventionMode** | **String** | | [optional] | diff --git a/clients/spot/docs/KlinesResponse.md b/clients/spot/docs/KlinesResponse.md index 7c995343d..09cafb096 100644 --- a/clients/spot/docs/KlinesResponse.md +++ b/clients/spot/docs/KlinesResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | **List<List<KlinesResponseResultInnerInner>>** | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<AvgPriceResponseRateLimitsInner>**](AvgPriceResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/MarketApi.md b/clients/spot/docs/MarketApi.md index 1bb3358cb..f16ef918a 100644 --- a/clients/spot/docs/MarketApi.md +++ b/clients/spot/docs/MarketApi.md @@ -89,7 +89,7 @@ No authorization required Historical Block Trades -Get block trades. Weight(IP): 25 Security Type: NONE Notes: - Data Source: Database +Get block trades. Weight(IP): 25 Security Type: NONE Notes: **Data Source:** Database ### Example ```java @@ -151,7 +151,7 @@ No authorization required Order book -Get current order book. Note that this request returns limited market depth. If you need to continuously monitor order book updates, please consider using WebSocket Streams: * `<symbol>@depth<levels>` * `<symbol>@depth` You can use `depth` request together with `<symbol>@depth` streams to [maintain a local order book](/products/spot/web-socket-streams#how-to-manage-a-local-order-book-correctly). Weight: Adjusted based on the limit: |Limit|Request Weight ------|------- 1-100| 5 101-500| 25 501-1000| 50 1001-5000| 250 Security Type: NONE Notes: **Data Source:** Memory +Get current order book. Note that this request returns limited market depth. If you need to continuously monitor order book updates, please consider using WebSocket Streams: * `<symbol>@depth<levels>` * `<symbol>@depth` You can use `depth` request together with `<symbol>@depth` streams to maintain a local order book. Weight: Adjusted based on the limit: |Limit|Request Weight ------|------- 1-100| 5 101-500| 25 501-1000| 50 1001-5000| 250 Security Type: NONE Notes: **Data Source:** Memory ### Example ```java @@ -213,7 +213,7 @@ No authorization required Klines -Get klines (candlestick bars). Klines are uniquely identified by their open & close time. If you need access to real-time kline updates, please consider using WebSocket Streams: * `<symbol>@kline_<interval>` If you need historical kline data, please consider using [data.binance.vision](https://github.com/binance/binance-public-data/#klines). Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Database Supported kline intervals (case-sensitive): Interval | `interval` value --------- | ---------------- seconds | `1s` minutes | `1m`, `3m`, `5m`, `15m`, `30m` hours | `1h`, `2h`, `4h`, `6h`, `8h`, `12h` days | `1d`, `3d` weeks | `1w` months | `1M` **Notes:** * If `startTime` and `endTime` are not sent, the most recent klines are returned. * Supported values for `timeZone`: * Hours and minutes (e.g. `-1:00`, `05:45`) * Only hours (e.g. `0`, `8`, `4`) * Accepted range is strictly [-12:00 to +14:00] inclusive * If `timeZone` provided, kline intervals are interpreted in that timezone instead of UTC. * Note that `startTime` and `endTime` are always interpreted in UTC, regardless of `timeZone`. +Get klines (candlestick bars). Klines are uniquely identified by their open & close time. If you need access to real-time kline updates, please consider using WebSocket Streams: * `<symbol>@kline_<interval>` If you need historical kline data, please consider using data.binance.vision. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Database Supported kline intervals (case-sensitive): Interval | `interval` value --------- | ---------------- seconds | `1s` minutes | `1m`, `3m`, `5m`, `15m`, `30m` hours | `1h`, `2h`, `4h`, `6h`, `8h`, `12h` days | `1d`, `3d` weeks | `1w` months | `1M` **Notes:** * If `startTime` and `endTime` are not sent, the most recent klines are returned. * Supported values for `timeZone`: * Hours and minutes (e.g. `-1:00`, `05:45`) * Only hours (e.g. `0`, `8`, `4`) * Accepted range is strictly [-12:00 to +14:00] inclusive * If `timeZone` provided, kline intervals are interpreted in that timezone instead of UTC. * Note that `startTime` and `endTime` are always interpreted in UTC, regardless of `timeZone`. ### Example ```java @@ -275,7 +275,7 @@ No authorization required Query Reference Price -Query Reference Price Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory +Query Reference Price Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory If the symbol has never had a reference price set, the request is rejected with: ```json { \"code\": -2043, \"msg\": \"This symbol doesn't have a reference price.\" } ``` ### Example ```java @@ -709,7 +709,7 @@ No authorization required Aggregate trades -Get aggregate trades. An *aggregate trade* (aggtrade) represents one or more individual trades. Trades that fill at the same time, from the same taker order, with the same price – those trades are collected into an aggregate trade with total quantity of the individual trades. If you need access to real-time trading activity, please consider using WebSocket Streams: * `<symbol>@aggTrade` If you need historical aggregate trade data, please consider using [data.binance.vision](https://github.com/binance/binance-public-data/#aggtrades). Weight(IP): 4 Security Type: NONE Notes: **Data Source:** Database - If `fromId` is specified, return aggtrades with aggregate trade ID >= `fromId`. Use `fromId` and `limit` to page through all aggtrades. - If `startTime` and/or `endTime` are specified, aggtrades are filtered by execution time (`T`). `fromId` cannot be used together with `startTime` and `endTime`. - If no condition is specified, the most recent aggregate trades are returned. +Get aggregate trades. An *aggregate trade* (aggtrade) represents one or more individual trades. Trades that fill at the same time, from the same taker order, with the same price – those trades are collected into an aggregate trade with total quantity of the individual trades. If you need access to real-time trading activity, please consider using WebSocket Streams: * `<symbol>@aggTrade` If you need historical aggregate trade data, please consider using data.binance.vision. Weight(IP): 4 Security Type: NONE Notes: **Data Source:** Database - If `fromId` is specified, return aggtrades with aggregate trade ID >= `fromId`. Use `fromId` and `limit` to page through all aggtrades. - If `startTime` and/or `endTime` are specified, aggtrades are filtered by execution time (`T`). `fromId` cannot be used together with `startTime` and `endTime`. - If no condition is specified, the most recent aggregate trades are returned. ### Example ```java diff --git a/clients/spot/docs/OpenOrderListsStatusResponse.md b/clients/spot/docs/OpenOrderListsStatusResponse.md index 7e11c895d..d86061b26 100644 --- a/clients/spot/docs/OpenOrderListsStatusResponse.md +++ b/clients/spot/docs/OpenOrderListsStatusResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<OpenOrderListsStatusResponseResultInner>**](OpenOrderListsStatusResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<OpenOrderListsStatusResponseRateLimitsInner>**](OpenOrderListsStatusResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OpenOrderListsStatusResponseRateLimitsInner.md b/clients/spot/docs/OpenOrderListsStatusResponseRateLimitsInner.md new file mode 100644 index 000000000..717c98be1 --- /dev/null +++ b/clients/spot/docs/OpenOrderListsStatusResponseRateLimitsInner.md @@ -0,0 +1,17 @@ + + +# OpenOrderListsStatusResponseRateLimitsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rateLimitType** | **String** | | [optional] | +|**interval** | **String** | | [optional] | +|**intervalNum** | **Long** | | [optional] | +|**limit** | **Long** | | [optional] | +|**count** | **Long** | | [optional] | + + + diff --git a/clients/spot/docs/OpenOrdersCancelAllResponse.md b/clients/spot/docs/OpenOrdersCancelAllResponse.md index 92995c596..ee102d12e 100644 --- a/clients/spot/docs/OpenOrdersCancelAllResponse.md +++ b/clients/spot/docs/OpenOrdersCancelAllResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<OpenOrdersCancelAllResponseResultInner>**](OpenOrdersCancelAllResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<PingResponseRateLimitsInner>**](PingResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OpenOrdersStatusResponse.md b/clients/spot/docs/OpenOrdersStatusResponse.md index f1961d3f9..85b00604f 100644 --- a/clients/spot/docs/OpenOrdersStatusResponse.md +++ b/clients/spot/docs/OpenOrdersStatusResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<OpenOrdersStatusResponseResultInner>**](OpenOrdersStatusResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<OpenOrderListsStatusResponseRateLimitsInner>**](OpenOrderListsStatusResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderAmendKeepPriorityResponse.md b/clients/spot/docs/OrderAmendKeepPriorityResponse.md index 1e8f06bb4..6bb8cd887 100644 --- a/clients/spot/docs/OrderAmendKeepPriorityResponse.md +++ b/clients/spot/docs/OrderAmendKeepPriorityResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderAmendKeepPriorityResponseResult**](OrderAmendKeepPriorityResponseResult.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<PingResponseRateLimitsInner>**](PingResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderAmendmentsResponse.md b/clients/spot/docs/OrderAmendmentsResponse.md index 195637f95..7c75b0405 100644 --- a/clients/spot/docs/OrderAmendmentsResponse.md +++ b/clients/spot/docs/OrderAmendmentsResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<OrderAmendmentsResponseResultInner>**](OrderAmendmentsResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<OrderAmendmentsResponseRateLimitsInner>**](OrderAmendmentsResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderAmendmentsResponseRateLimitsInner.md b/clients/spot/docs/OrderAmendmentsResponseRateLimitsInner.md new file mode 100644 index 000000000..49345cf23 --- /dev/null +++ b/clients/spot/docs/OrderAmendmentsResponseRateLimitsInner.md @@ -0,0 +1,17 @@ + + +# OrderAmendmentsResponseRateLimitsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rateLimitType** | **String** | | [optional] | +|**interval** | **String** | | [optional] | +|**intervalNum** | **Long** | | [optional] | +|**limit** | **Long** | | [optional] | +|**count** | **Long** | | [optional] | + + + diff --git a/clients/spot/docs/OrderCancelReplaceRequest.md b/clients/spot/docs/OrderCancelReplaceRequest.md index a45385977..c50e6be8b 100644 --- a/clients/spot/docs/OrderCancelReplaceRequest.md +++ b/clients/spot/docs/OrderCancelReplaceRequest.md @@ -22,7 +22,7 @@ |**newClientOrderId** | **String** | Used to identify the new order. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**stopPrice** | **Double** | Used with `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, and `TAKE_PROFIT_LIMIT` orders. | [optional] | -|**trailingDelta** | **Double** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**trailingDelta** | **Double** | See Trailing Stop order FAQ | [optional] | |**icebergQty** | **Double** | Used with `LIMIT`, `STOP_LOSS_LIMIT`, and `TAKE_PROFIT_LIMIT` to create an iceberg order. | [optional] | |**strategyId** | **Long** | | [optional] | |**strategyType** | **Integer** | The value cannot be less than `1000000`. | [optional] | diff --git a/clients/spot/docs/OrderCancelReplaceResponse.md b/clients/spot/docs/OrderCancelReplaceResponse.md index 23f9825af..e27995921 100644 --- a/clients/spot/docs/OrderCancelReplaceResponse.md +++ b/clients/spot/docs/OrderCancelReplaceResponse.md @@ -2,6 +2,7 @@ # OrderCancelReplaceResponse +If both cancel and placement succeed, you get the following response with `\"status\": 200`: ## Properties @@ -10,7 +11,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderCancelReplaceResponseResult**](OrderCancelReplaceResponseResult.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<PingResponseRateLimitsInner>**](PingResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderCancelReplaceResponseCancelResponse.md b/clients/spot/docs/OrderCancelReplaceResponseCancelResponse.md index 5da8905a8..6b98d601f 100644 --- a/clients/spot/docs/OrderCancelReplaceResponseCancelResponse.md +++ b/clients/spot/docs/OrderCancelReplaceResponseCancelResponse.md @@ -8,10 +8,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | +|**origClientOrderId** | **String** | cancelOrigClientOrderId from request | [optional] | |**orderId** | **Long** | | [optional] | |**orderListId** | **Long** | Unless it's part of an order list, value will be -1 | [optional] | -|**clientOrderId** | **String** | | [optional] | +|**clientOrderId** | **String** | cancelNewClientOrderId from request | [optional] | |**transactTime** | **Long** | | [optional] | |**price** | **String** | | [optional] | |**origQty** | **String** | | [optional] | diff --git a/clients/spot/docs/OrderCancelReplaceResponseResultCancelResponse.md b/clients/spot/docs/OrderCancelReplaceResponseResultCancelResponse.md index 0fe4f73ad..cc6e40c8e 100644 --- a/clients/spot/docs/OrderCancelReplaceResponseResultCancelResponse.md +++ b/clients/spot/docs/OrderCancelReplaceResponseResultCancelResponse.md @@ -2,16 +2,17 @@ # OrderCancelReplaceResponseResultCancelResponse +Format is identical to \"order.cancel\" format. Some fields are optional and are included only for orders that set them. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | +|**origClientOrderId** | **String** | cancelOrigClientOrderId from request | [optional] | |**orderId** | **Long** | | [optional] | |**orderListId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | +|**clientOrderId** | **String** | cancelNewClientOrderId from request | [optional] | |**transactTime** | **Long** | | [optional] | |**price** | **String** | | [optional] | |**origQty** | **String** | | [optional] | diff --git a/clients/spot/docs/OrderCancelReplaceResponseResultNewOrderResponse.md b/clients/spot/docs/OrderCancelReplaceResponseResultNewOrderResponse.md index 4075546f9..601ddbd06 100644 --- a/clients/spot/docs/OrderCancelReplaceResponseResultNewOrderResponse.md +++ b/clients/spot/docs/OrderCancelReplaceResponseResultNewOrderResponse.md @@ -2,6 +2,7 @@ # OrderCancelReplaceResponseResultNewOrderResponse +Format is identical to \"order.place\" format, affected by \"newOrderRespType\". Some fields are optional and are included only for orders that set them. ## Properties diff --git a/clients/spot/docs/OrderCancelResponse.md b/clients/spot/docs/OrderCancelResponse.md index 9ed0cef24..8d1069083 100644 --- a/clients/spot/docs/OrderCancelResponse.md +++ b/clients/spot/docs/OrderCancelResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderCancelResponseResult**](OrderCancelResponseResult.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<PingResponseRateLimitsInner>**](PingResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderCancelResponseResult.md b/clients/spot/docs/OrderCancelResponseResult.md index 0e2b0e3fb..dd076b844 100644 --- a/clients/spot/docs/OrderCancelResponseResult.md +++ b/clients/spot/docs/OrderCancelResponseResult.md @@ -8,10 +8,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | -|**origClientOrderId** | **String** | | [optional] | +|**origClientOrderId** | **String** | clientOrderId that was canceled | [optional] | |**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | -|**clientOrderId** | **String** | | [optional] | +|**orderListId** | **Long** | set only for legs of an order list | [optional] | +|**clientOrderId** | **String** | newClientOrderId from request | [optional] | |**transactTime** | **Long** | | [optional] | |**price** | **String** | | [optional] | |**origQty** | **String** | | [optional] | @@ -22,11 +22,11 @@ |**timeInForce** | **String** | | [optional] | |**type** | **String** | | [optional] | |**side** | **String** | | [optional] | -|**stopPrice** | **String** | Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. | [optional] | -|**trailingDelta** | **Long** | Delta price change required before order activation. | [optional] | -|**icebergQty** | **String** | Appears only if the parameter icebergQty was sent in the request. | [optional] | -|**strategyId** | **Long** | Appears only if the strategyId parameter was provided upon order placement. | [optional] | -|**strategyType** | **Long** | Appears only if the strategyType parameter was provided upon order placement. | [optional] | +|**stopPrice** | **String** | present only if stopPrice set for the order | [optional] | +|**trailingDelta** | **Long** | present only if trailingDelta set for the order | [optional] | +|**icebergQty** | **String** | present only if icebergQty set for the order | [optional] | +|**strategyId** | **Long** | present only if strategyId set for the order | [optional] | +|**strategyType** | **Long** | present only if strategyType set for the order | [optional] | |**selfTradePreventionMode** | **String** | | [optional] | |**preventedMatchId** | **Long** | Appears only if the order expired due to STP. | [optional] | |**preventedQuantity** | **String** | Order quantity that expired due to STP. | [optional] | @@ -44,7 +44,7 @@ |**listClientOrderId** | **String** | | [optional] | |**transactionTime** | **Long** | | [optional] | |**orders** | [**List<OpenOrdersCancelAllResponseResultInnerOrdersInner>**](OpenOrdersCancelAllResponseResultInnerOrdersInner.md) | | [optional] | -|**orderReports** | [**List<OpenOrdersCancelAllResponseResultInnerOrderReportsInner>**](OpenOrdersCancelAllResponseResultInnerOrderReportsInner.md) | | [optional] | +|**orderReports** | [**List<OpenOrdersCancelAllResponseResultInnerOrderReportsInner>**](OpenOrdersCancelAllResponseResultInnerOrderReportsInner.md) | order list order's status format is the same as for individual orders. | [optional] | diff --git a/clients/spot/docs/OrderListCancelResponse.md b/clients/spot/docs/OrderListCancelResponse.md index 52f98a2f7..b549483a5 100644 --- a/clients/spot/docs/OrderListCancelResponse.md +++ b/clients/spot/docs/OrderListCancelResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderListCancelResponseResult**](OrderListCancelResponseResult.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<PingResponseRateLimitsInner>**](PingResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderListOcoRequest.md b/clients/spot/docs/OrderListOcoRequest.md index 0644f164c..3aecafd32 100644 --- a/clients/spot/docs/OrderListOcoRequest.md +++ b/clients/spot/docs/OrderListOcoRequest.md @@ -16,7 +16,7 @@ |**aboveIcebergQty** | **Long** | Note that this can only be used if `aboveTimeInForce` is `GTC`. | [optional] | |**abovePrice** | **Double** | Can be used if `aboveType` is `STOP_LOSS_LIMIT`, `LIMIT_MAKER`, or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | |**aboveStopPrice** | **Double** | Can be used if `aboveType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either `aboveStopPrice` or `aboveTrailingDelta` or both, must be specified. | [optional] | -|**aboveTrailingDelta** | **Long** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**aboveTrailingDelta** | **Long** | See Trailing Stop order FAQ | [optional] | |**aboveTimeInForce** | **AboveTimeInForce** | | [optional] | |**aboveStrategyId** | **Long** | Arbitrary numeric value identifying the above order within an order strategy. | [optional] | |**aboveStrategyType** | **Integer** | Arbitrary numeric value identifying the above order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | @@ -28,7 +28,7 @@ |**belowIcebergQty** | **Long** | Note that this can only be used if `belowTimeInForce` is `GTC`. | [optional] | |**belowPrice** | **Double** | Can be used if `belowType` is `STOP_LOSS_LIMIT`, `LIMIT_MAKER`, or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | |**belowStopPrice** | **Double** | Can be used if `belowType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either `belowStopPrice` or `belowTrailingDelta` or both, must be specified. | [optional] | -|**belowTrailingDelta** | **Long** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**belowTrailingDelta** | **Long** | See Trailing Stop order FAQ | [optional] | |**belowTimeInForce** | **BelowTimeInForce** | | [optional] | |**belowStrategyId** | **Long** | Arbitrary numeric value identifying the below order within an order strategy. | [optional] | |**belowStrategyType** | **Integer** | Arbitrary numeric value identifying the below order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | diff --git a/clients/spot/docs/OrderListOpocoRequest.md b/clients/spot/docs/OrderListOpocoRequest.md index 75e1c2a30..9ef9ce9df 100644 --- a/clients/spot/docs/OrderListOpocoRequest.md +++ b/clients/spot/docs/OrderListOpocoRequest.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | | -|**listClientOrderId** | **String** | Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId` and the `pendingClientOrderId`. | [optional] | +|**listClientOrderId** | **String** | Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId`, `pendingAboveClientOrderId`, and the `pendingBelowClientOrderId`. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | |**workingType** | **WorkingType** | | | @@ -22,25 +22,25 @@ |**workingStrategyType** | **Integer** | Arbitrary numeric value identifying the working order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**workingPegPriceType** | **WorkingPegPriceType** | | [optional] | |**workingPegOffsetType** | **WorkingPegOffsetType** | | [optional] | -|**workingPegOffsetValue** | **Integer** | Price level for pegging (max: 100). See [Pegged Orders](/products/spot/faqs/pegged_orders) | [optional] | +|**workingPegOffsetValue** | **Integer** | Price level for pegging (max: 100). See Pegged Orders | [optional] | |**pendingSide** | **PendingSide** | | | |**pendingAboveType** | **PendingAboveType** | | | |**pendingAboveClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending above order. Automatically generated if not sent. | [optional] | |**pendingAbovePrice** | **Double** | Can be used if `pendingAboveType` is `STOP_LOSS_LIMIT`, `LIMIT_MAKER`, or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | |**pendingAboveStopPrice** | **Double** | Can be used if `pendingAboveType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. | [optional] | -|**pendingAboveTrailingDelta** | **Double** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**pendingAboveTrailingDelta** | **Double** | See Trailing Stop order FAQ | [optional] | |**pendingAboveIcebergQty** | **Double** | This can only be used if `pendingAboveTimeInForce` is `GTC` or `pendingAboveType` is `LIMIT_MAKER`. | [optional] | |**pendingAboveTimeInForce** | **PendingAboveTimeInForce** | | [optional] | |**pendingAboveStrategyId** | **Long** | Arbitrary numeric value identifying the pending above order within an order strategy. | [optional] | |**pendingAboveStrategyType** | **Integer** | Arbitrary numeric value identifying the pending above order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**pendingAbovePegPriceType** | **PendingAbovePegPriceType** | | [optional] | |**pendingAbovePegOffsetType** | **PendingAbovePegOffsetType** | | [optional] | -|**pendingAbovePegOffsetValue** | **Integer** | Price level for pegging (max: 100). See [Pegged Orders](/products/spot/faqs/pegged_orders) | [optional] | +|**pendingAbovePegOffsetValue** | **Integer** | Price level for pegging (max: 100). See Pegged Orders | [optional] | |**pendingBelowType** | **PendingBelowType** | | [optional] | |**pendingBelowClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending below order. Automatically generated if not sent. | [optional] | |**pendingBelowPrice** | **Double** | Can be used if `pendingBelowType` is `STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | |**pendingBelowStopPrice** | **Double** | Can be used if `pendingBelowType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either `pendingBelowStopPrice` or `pendingBelowTrailingDelta` or both, must be specified. | [optional] | -|**pendingBelowTrailingDelta** | **Double** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**pendingBelowTrailingDelta** | **Double** | See Trailing Stop order FAQ | [optional] | |**pendingBelowIcebergQty** | **Double** | This can only be used if `pendingBelowTimeInForce` is `GTC` or `pendingBelowType` is `LIMIT_MAKER`. | [optional] | |**pendingBelowTimeInForce** | **PendingBelowTimeInForce** | | [optional] | |**pendingBelowStrategyId** | **Long** | Arbitrary numeric value identifying the pending below order within an order strategy. | [optional] | diff --git a/clients/spot/docs/OrderListOtocoRequest.md b/clients/spot/docs/OrderListOtocoRequest.md index 863f97337..dd70a8b1a 100644 --- a/clients/spot/docs/OrderListOtocoRequest.md +++ b/clients/spot/docs/OrderListOtocoRequest.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | | -|**listClientOrderId** | **String** | Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId` and the `pendingClientOrderId`. | [optional] | +|**listClientOrderId** | **String** | Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId`, `pendingAboveClientOrderId`, and the `pendingBelowClientOrderId`. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | |**workingType** | **WorkingType** | | | @@ -29,7 +29,7 @@ |**pendingAboveClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending above order. Automatically generated if not sent. | [optional] | |**pendingAbovePrice** | **Double** | Can be used if `pendingAboveType` is `STOP_LOSS_LIMIT`, `LIMIT_MAKER`, or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | |**pendingAboveStopPrice** | **Double** | Can be used if `pendingAboveType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. | [optional] | -|**pendingAboveTrailingDelta** | **Double** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**pendingAboveTrailingDelta** | **Double** | See Trailing Stop order FAQ | [optional] | |**pendingAboveIcebergQty** | **Double** | This can only be used if `pendingAboveTimeInForce` is `GTC` or if `pendingAboveType` is `LIMIT_MAKER`. | [optional] | |**pendingAboveTimeInForce** | **PendingAboveTimeInForce** | | [optional] | |**pendingAboveStrategyId** | **Long** | Arbitrary numeric value identifying the pending above order within an order strategy. | [optional] | @@ -41,7 +41,7 @@ |**pendingBelowClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending below order. Automatically generated if not sent. | [optional] | |**pendingBelowPrice** | **Double** | Can be used if `pendingBelowType` is `STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | |**pendingBelowStopPrice** | **Double** | Can be used if `pendingBelowType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either `pendingBelowStopPrice` or `pendingBelowTrailingDelta` or both, must be specified. | [optional] | -|**pendingBelowTrailingDelta** | **Double** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**pendingBelowTrailingDelta** | **Double** | See Trailing Stop order FAQ | [optional] | |**pendingBelowIcebergQty** | **Double** | This can only be used if `pendingBelowTimeInForce` is `GTC`, or if `pendingBelowType` is `LIMIT_MAKER`. | [optional] | |**pendingBelowTimeInForce** | **PendingBelowTimeInForce** | | [optional] | |**pendingBelowStrategyId** | **Long** | Arbitrary numeric value identifying the pending below order within an order strategy. | [optional] | diff --git a/clients/spot/docs/OrderListPlaceOcoRequest.md b/clients/spot/docs/OrderListPlaceOcoRequest.md index 1d7e66bce..384198eb1 100644 --- a/clients/spot/docs/OrderListPlaceOcoRequest.md +++ b/clients/spot/docs/OrderListPlaceOcoRequest.md @@ -17,7 +17,7 @@ |**aboveIcebergQty** | **Long** | Note that this can only be used if `aboveTimeInForce` is `GTC`. | [optional] | |**abovePrice** | **Double** | Can be used if `aboveType` is `STOP_LOSS_LIMIT`, `LIMIT_MAKER`, or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | |**aboveStopPrice** | **Double** | Can be used if `aboveType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either `aboveStopPrice` or `aboveTrailingDelta` or both, must be specified. | [optional] | -|**aboveTrailingDelta** | **Long** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**aboveTrailingDelta** | **Long** | See Trailing Stop order FAQ | [optional] | |**aboveTimeInForce** | **AboveTimeInForce** | | [optional] | |**aboveStrategyId** | **Long** | Arbitrary numeric value identifying the above order within an order strategy. | [optional] | |**aboveStrategyType** | **Integer** | Arbitrary numeric value identifying the above order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | @@ -29,7 +29,7 @@ |**belowIcebergQty** | **Long** | Note that this can only be used if `belowTimeInForce` is `GTC`. | [optional] | |**belowPrice** | **Double** | Can be used if `belowType` is `STOP_LOSS_LIMIT`, `LIMIT_MAKER`, or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | |**belowStopPrice** | **Double** | Can be used if `belowType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either `belowStopPrice` or `belowTrailingDelta` or both, must be specified. | [optional] | -|**belowTrailingDelta** | **Long** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**belowTrailingDelta** | **Long** | See Trailing Stop order FAQ | [optional] | |**belowTimeInForce** | **BelowTimeInForce** | | [optional] | |**belowStrategyId** | **Long** | Arbitrary numeric value identifying the below order within an order strategy. | [optional] | |**belowStrategyType** | **Integer** | Arbitrary numeric value identifying the below order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | diff --git a/clients/spot/docs/OrderListPlaceOcoResponse.md b/clients/spot/docs/OrderListPlaceOcoResponse.md index 784d6930b..c488cdc97 100644 --- a/clients/spot/docs/OrderListPlaceOcoResponse.md +++ b/clients/spot/docs/OrderListPlaceOcoResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderListPlaceOcoResponseResult**](OrderListPlaceOcoResponseResult.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<PingResponseRateLimitsInner>**](PingResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderListPlaceOpocoRequest.md b/clients/spot/docs/OrderListPlaceOpocoRequest.md index 3df78fe59..8bb30b45c 100644 --- a/clients/spot/docs/OrderListPlaceOpocoRequest.md +++ b/clients/spot/docs/OrderListPlaceOpocoRequest.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | -|**listClientOrderId** | **String** | Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId` and the `pendingClientOrderId`. | [optional] | +|**listClientOrderId** | **String** | Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId`, `pendingAboveClientOrderId`, and the `pendingBelowClientOrderId`. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | |**workingType** | **WorkingType** | | | @@ -23,25 +23,25 @@ |**workingStrategyType** | **Integer** | Arbitrary numeric value identifying the working order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**workingPegPriceType** | **WorkingPegPriceType** | | [optional] | |**workingPegOffsetType** | **WorkingPegOffsetType** | | [optional] | -|**workingPegOffsetValue** | **Integer** | Price level for pegging (max: 100). See [Pegged Orders](/products/spot/faqs/pegged_orders) | [optional] | +|**workingPegOffsetValue** | **Integer** | Price level for pegging (max: 100). See Pegged Orders | [optional] | |**pendingSide** | **PendingSide** | | | |**pendingAboveType** | **PendingAboveType** | | | |**pendingAboveClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending above order. Automatically generated if not sent. | [optional] | |**pendingAbovePrice** | **Double** | Can be used if `pendingAboveType` is `STOP_LOSS_LIMIT`, `LIMIT_MAKER`, or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | |**pendingAboveStopPrice** | **Double** | Can be used if `pendingAboveType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. | [optional] | -|**pendingAboveTrailingDelta** | **Double** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**pendingAboveTrailingDelta** | **Double** | See Trailing Stop order FAQ | [optional] | |**pendingAboveIcebergQty** | **Double** | This can only be used if `pendingAboveTimeInForce` is `GTC` or `pendingAboveType` is `LIMIT_MAKER`. | [optional] | |**pendingAboveTimeInForce** | **PendingAboveTimeInForce** | | [optional] | |**pendingAboveStrategyId** | **Long** | Arbitrary numeric value identifying the pending above order within an order strategy. | [optional] | |**pendingAboveStrategyType** | **Integer** | Arbitrary numeric value identifying the pending above order strategy. Values smaller than `1000000` are reserved and cannot be used. | [optional] | |**pendingAbovePegPriceType** | **PendingAbovePegPriceType** | | [optional] | |**pendingAbovePegOffsetType** | **PendingAbovePegOffsetType** | | [optional] | -|**pendingAbovePegOffsetValue** | **Integer** | Price level for pegging (max: 100). See [Pegged Orders](/products/spot/faqs/pegged_orders) | [optional] | +|**pendingAbovePegOffsetValue** | **Integer** | Price level for pegging (max: 100). See Pegged Orders | [optional] | |**pendingBelowType** | **PendingBelowType** | | [optional] | |**pendingBelowClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending below order. Automatically generated if not sent. | [optional] | |**pendingBelowPrice** | **Double** | Can be used if `pendingBelowType` is `STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | |**pendingBelowStopPrice** | **Double** | Can be used if `pendingBelowType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either `pendingBelowStopPrice` or `pendingBelowTrailingDelta` or both, must be specified. | [optional] | -|**pendingBelowTrailingDelta** | **Double** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**pendingBelowTrailingDelta** | **Double** | See Trailing Stop order FAQ | [optional] | |**pendingBelowIcebergQty** | **Double** | This can only be used if `pendingBelowTimeInForce` is `GTC` or `pendingBelowType` is `LIMIT_MAKER`. | [optional] | |**pendingBelowTimeInForce** | **PendingBelowTimeInForce** | | [optional] | |**pendingBelowStrategyId** | **Long** | Arbitrary numeric value identifying the pending below order within an order strategy. | [optional] | diff --git a/clients/spot/docs/OrderListPlaceOtoResponse.md b/clients/spot/docs/OrderListPlaceOtoResponse.md index 6cb9c4f18..41ffecbd4 100644 --- a/clients/spot/docs/OrderListPlaceOtoResponse.md +++ b/clients/spot/docs/OrderListPlaceOtoResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderListPlaceOtoResponseResult**](OrderListPlaceOtoResponseResult.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<PingResponseRateLimitsInner>**](PingResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderListPlaceOtocoRequest.md b/clients/spot/docs/OrderListPlaceOtocoRequest.md index 68f1957d5..3f0ef13f1 100644 --- a/clients/spot/docs/OrderListPlaceOtocoRequest.md +++ b/clients/spot/docs/OrderListPlaceOtocoRequest.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**id** | **String** | Client-generated request identifier. | [optional] | |**symbol** | **String** | | | -|**listClientOrderId** | **String** | Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId` and the `pendingClientOrderId`. | [optional] | +|**listClientOrderId** | **String** | Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId`, `pendingAboveClientOrderId`, and the `pendingBelowClientOrderId`. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | |**workingType** | **WorkingType** | | | @@ -30,7 +30,7 @@ |**pendingAboveClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending above order. Automatically generated if not sent. | [optional] | |**pendingAbovePrice** | **Double** | Can be used if `pendingAboveType` is `STOP_LOSS_LIMIT`, `LIMIT_MAKER`, or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | |**pendingAboveStopPrice** | **Double** | Can be used if `pendingAboveType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. | [optional] | -|**pendingAboveTrailingDelta** | **Double** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**pendingAboveTrailingDelta** | **Double** | See Trailing Stop order FAQ | [optional] | |**pendingAboveIcebergQty** | **Double** | This can only be used if `pendingAboveTimeInForce` is `GTC` or if `pendingAboveType` is `LIMIT_MAKER`. | [optional] | |**pendingAboveTimeInForce** | **PendingAboveTimeInForce** | | [optional] | |**pendingAboveStrategyId** | **Long** | Arbitrary numeric value identifying the pending above order within an order strategy. | [optional] | @@ -42,7 +42,7 @@ |**pendingBelowClientOrderId** | **String** | Arbitrary unique ID among open orders for the pending below order. Automatically generated if not sent. | [optional] | |**pendingBelowPrice** | **Double** | Can be used if `pendingBelowType` is `STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT` to specify the limit price. | [optional] | |**pendingBelowStopPrice** | **Double** | Can be used if `pendingBelowType` is `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, `TAKE_PROFIT_LIMIT`. Either `pendingBelowStopPrice` or `pendingBelowTrailingDelta` or both, must be specified. | [optional] | -|**pendingBelowTrailingDelta** | **Double** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**pendingBelowTrailingDelta** | **Double** | See Trailing Stop order FAQ | [optional] | |**pendingBelowIcebergQty** | **Double** | This can only be used if `pendingBelowTimeInForce` is `GTC`, or if `pendingBelowType` is `LIMIT_MAKER`. | [optional] | |**pendingBelowTimeInForce** | **PendingBelowTimeInForce** | | [optional] | |**pendingBelowStrategyId** | **Long** | Arbitrary numeric value identifying the pending below order within an order strategy. | [optional] | diff --git a/clients/spot/docs/OrderListPlaceOtocoResponse.md b/clients/spot/docs/OrderListPlaceOtocoResponse.md index 323f59dd4..62cbd3cf7 100644 --- a/clients/spot/docs/OrderListPlaceOtocoResponse.md +++ b/clients/spot/docs/OrderListPlaceOtocoResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderListPlaceOtocoResponseResult**](OrderListPlaceOtocoResponseResult.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<PingResponseRateLimitsInner>**](PingResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderListPlaceResponse.md b/clients/spot/docs/OrderListPlaceResponse.md index 045894ad1..1e1f9c831 100644 --- a/clients/spot/docs/OrderListPlaceResponse.md +++ b/clients/spot/docs/OrderListPlaceResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderListPlaceResponseResult**](OrderListPlaceResponseResult.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<PingResponseRateLimitsInner>**](PingResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderListStatusResponse.md b/clients/spot/docs/OrderListStatusResponse.md index d04b219bc..4726b0646 100644 --- a/clients/spot/docs/OrderListStatusResponse.md +++ b/clients/spot/docs/OrderListStatusResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderListStatusResponseResult**](OrderListStatusResponseResult.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<OrderAmendmentsResponseRateLimitsInner>**](OrderAmendmentsResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderPlaceResponse.md b/clients/spot/docs/OrderPlaceResponse.md index aa260db3d..2a59b684e 100644 --- a/clients/spot/docs/OrderPlaceResponse.md +++ b/clients/spot/docs/OrderPlaceResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderPlaceResponseResult**](OrderPlaceResponseResult.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<OrderPlaceResponseRateLimitsInner>**](OrderPlaceResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderPlaceResponseRateLimitsInner.md b/clients/spot/docs/OrderPlaceResponseRateLimitsInner.md new file mode 100644 index 000000000..9534118c7 --- /dev/null +++ b/clients/spot/docs/OrderPlaceResponseRateLimitsInner.md @@ -0,0 +1,17 @@ + + +# OrderPlaceResponseRateLimitsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rateLimitType** | **String** | | [optional] | +|**interval** | **String** | | [optional] | +|**intervalNum** | **Long** | | [optional] | +|**limit** | **Long** | | [optional] | +|**count** | **Long** | | [optional] | + + + diff --git a/clients/spot/docs/OrderPlaceResponseResult.md b/clients/spot/docs/OrderPlaceResponseResult.md index 482aa6d10..34e8a497a 100644 --- a/clients/spot/docs/OrderPlaceResponseResult.md +++ b/clients/spot/docs/OrderPlaceResponseResult.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | |**orderId** | **Long** | | [optional] | -|**orderListId** | **Long** | | [optional] | +|**orderListId** | **Long** | always -1 for singular orders | [optional] | |**clientOrderId** | **String** | | [optional] | |**transactTime** | **Long** | | [optional] | |**price** | **String** | | [optional] | @@ -38,7 +38,7 @@ |**pegOffsetValue** | **Long** | Price peg offset value. Only for pegged orders, if requested. | [optional] | |**peggedPrice** | **String** | Current price order is pegged at. Only for pegged orders, once determined. | [optional] | |**expiryReason** | **String** | Cause of the order's expiration. Appears when an order has expired. | [optional] | -|**fills** | [**List<OrderPlaceResponseResultFillsInner>**](OrderPlaceResponseResultFillsInner.md) | | [optional] | +|**fills** | [**List<OrderPlaceResponseResultFillsInner>**](OrderPlaceResponseResultFillsInner.md) | FULL response is identical to RESULT response, with the same optional fields based on the order type and parameters. FULL response additionally includes the list of trades which immediately filled the order. | [optional] | diff --git a/clients/spot/docs/OrderStatusResponse.md b/clients/spot/docs/OrderStatusResponse.md index 230a21e3c..39846abd7 100644 --- a/clients/spot/docs/OrderStatusResponse.md +++ b/clients/spot/docs/OrderStatusResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderStatusResponseResult**](OrderStatusResponseResult.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<OrderAmendmentsResponseRateLimitsInner>**](OrderAmendmentsResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderTestRequest.md b/clients/spot/docs/OrderTestRequest.md index cc0f95f1a..b38b32c6b 100644 --- a/clients/spot/docs/OrderTestRequest.md +++ b/clients/spot/docs/OrderTestRequest.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**id** | **String** | Client-generated request identifier. | [optional] | -|**computeCommissionRates** | **Boolean** | Default: `false` <br> See [Commissions FAQ](/products/spot/faqs/commission_faq#test-order-diferences) to learn more. | [optional] | +|**computeCommissionRates** | **Boolean** | Default: `false` <br> See Commissions FAQ to learn more. | [optional] | |**symbol** | **String** | | | |**side** | **Side** | | | |**type** | **OrderType** | | | @@ -19,13 +19,13 @@ |**newClientOrderId** | **String** | A unique id among open orders. Automatically generated if not sent. Orders with the same `newClientOrderID` can be accepted only when the previous one is filled, otherwise the order will be rejected. | [optional] | |**newOrderRespType** | **NewOrderRespType** | | [optional] | |**stopPrice** | **Double** | Used with `STOP_LOSS`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT`, and `TAKE_PROFIT_LIMIT` orders. | [optional] | -|**trailingDelta** | **Integer** | See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) | [optional] | +|**trailingDelta** | **Integer** | See Trailing Stop order FAQ | [optional] | |**icebergQty** | **Double** | Used with `LIMIT`, `STOP_LOSS_LIMIT`, and `TAKE_PROFIT_LIMIT` to create an iceberg order. | [optional] | |**strategyId** | **Long** | | [optional] | |**strategyType** | **Integer** | The value cannot be less than `1000000`. | [optional] | |**selfTradePreventionMode** | **SelfTradePreventionMode** | | [optional] | |**pegPriceType** | **PegPriceType** | | [optional] | -|**pegOffsetValue** | **Integer** | Price level for pegging (max: 100). See [Pegged Orders](/products/spot/faqs/pegged_orders) | [optional] | +|**pegOffsetValue** | **Integer** | Price level for pegging (max: 100). See Pegged Orders | [optional] | |**pegOffsetType** | **PegOffsetType** | | [optional] | |**recvWindow** | **Double** | Supports up to three decimal places of precision (e.g., 6000.346) so that microseconds may be specified. | [optional] | diff --git a/clients/spot/docs/OrderTestResponse.md b/clients/spot/docs/OrderTestResponse.md index 2e09b0c34..ec13da910 100644 --- a/clients/spot/docs/OrderTestResponse.md +++ b/clients/spot/docs/OrderTestResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**OrderTestResponseResult**](OrderTestResponseResult.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<PingResponseRateLimitsInner>**](PingResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/OrderTestResponseResult.md b/clients/spot/docs/OrderTestResponseResult.md index db5943128..6044ae411 100644 --- a/clients/spot/docs/OrderTestResponseResult.md +++ b/clients/spot/docs/OrderTestResponseResult.md @@ -8,8 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**standardCommissionForOrder** | [**OrderTestResponseResultStandardCommissionForOrder**](OrderTestResponseResultStandardCommissionForOrder.md) | | [optional] | -|**specialCommissionForOrder** | [**OrderTestResponseResultStandardCommissionForOrder**](OrderTestResponseResultStandardCommissionForOrder.md) | | [optional] | -|**taxCommissionForOrder** | [**OrderTestResponseResultStandardCommissionForOrder**](OrderTestResponseResultStandardCommissionForOrder.md) | | [optional] | +|**specialCommissionForOrder** | [**OrderTestResponseResultSpecialCommissionForOrder**](OrderTestResponseResultSpecialCommissionForOrder.md) | | [optional] | +|**taxCommissionForOrder** | [**OrderTestResponseResultTaxCommissionForOrder**](OrderTestResponseResultTaxCommissionForOrder.md) | | [optional] | |**discount** | [**OrderTestResponseResultDiscount**](OrderTestResponseResultDiscount.md) | | [optional] | diff --git a/clients/spot/docs/OrderTestResponseResultDiscount.md b/clients/spot/docs/OrderTestResponseResultDiscount.md index 835b5cff4..649fb3e83 100644 --- a/clients/spot/docs/OrderTestResponseResultDiscount.md +++ b/clients/spot/docs/OrderTestResponseResultDiscount.md @@ -2,6 +2,7 @@ # OrderTestResponseResultDiscount +Discount on standard commissions when paying in BNB. ## Properties @@ -10,7 +11,7 @@ |**enabledForAccount** | **Boolean** | | [optional] | |**enabledForSymbol** | **Boolean** | | [optional] | |**discountAsset** | **String** | | [optional] | -|**discount** | **String** | | [optional] | +|**discount** | **String** | Standard commission is reduced by this rate when paying commission in BNB. | [optional] | diff --git a/clients/spot/docs/OrderTestResponseResultSpecialCommissionForOrder.md b/clients/spot/docs/OrderTestResponseResultSpecialCommissionForOrder.md new file mode 100644 index 000000000..0c7aa1f92 --- /dev/null +++ b/clients/spot/docs/OrderTestResponseResultSpecialCommissionForOrder.md @@ -0,0 +1,15 @@ + + +# OrderTestResponseResultSpecialCommissionForOrder + +Special commission rates on trades from the order. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**maker** | **String** | | [optional] | +|**taker** | **String** | | [optional] | + + + diff --git a/clients/spot/docs/OrderTestResponseResultStandardCommissionForOrder.md b/clients/spot/docs/OrderTestResponseResultStandardCommissionForOrder.md index 29bf82b2c..25288f653 100644 --- a/clients/spot/docs/OrderTestResponseResultStandardCommissionForOrder.md +++ b/clients/spot/docs/OrderTestResponseResultStandardCommissionForOrder.md @@ -2,6 +2,7 @@ # OrderTestResponseResultStandardCommissionForOrder +Standard commission rates on trades from the order. ## Properties diff --git a/clients/spot/docs/OrderTestResponseResultTaxCommissionForOrder.md b/clients/spot/docs/OrderTestResponseResultTaxCommissionForOrder.md new file mode 100644 index 000000000..0ad297096 --- /dev/null +++ b/clients/spot/docs/OrderTestResponseResultTaxCommissionForOrder.md @@ -0,0 +1,15 @@ + + +# OrderTestResponseResultTaxCommissionForOrder + +Tax commission rates for trades from the order. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**maker** | **String** | | [optional] | +|**taker** | **String** | | [optional] | + + + diff --git a/clients/spot/docs/PingResponse.md b/clients/spot/docs/PingResponse.md index 2ec69fa2c..eb1bfda88 100644 --- a/clients/spot/docs/PingResponse.md +++ b/clients/spot/docs/PingResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | **Object** | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<PingResponseRateLimitsInner>**](PingResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/PingResponseRateLimitsInner.md b/clients/spot/docs/PingResponseRateLimitsInner.md new file mode 100644 index 000000000..e46bef23f --- /dev/null +++ b/clients/spot/docs/PingResponseRateLimitsInner.md @@ -0,0 +1,17 @@ + + +# PingResponseRateLimitsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rateLimitType** | **String** | | [optional] | +|**interval** | **String** | | [optional] | +|**intervalNum** | **Long** | | [optional] | +|**limit** | **Long** | | [optional] | +|**count** | **Long** | | [optional] | + + + diff --git a/clients/spot/docs/ReferencePriceCalculationResponse.md b/clients/spot/docs/ReferencePriceCalculationResponse.md index b2f450d3e..f618d40bf 100644 --- a/clients/spot/docs/ReferencePriceCalculationResponse.md +++ b/clients/spot/docs/ReferencePriceCalculationResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**ReferencePriceCalculationResponseResult**](ReferencePriceCalculationResponseResult.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<AvgPriceResponseRateLimitsInner>**](AvgPriceResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/ReferencePriceResponse1.md b/clients/spot/docs/ReferencePriceResponse1.md new file mode 100644 index 000000000..4417b1df8 --- /dev/null +++ b/clients/spot/docs/ReferencePriceResponse1.md @@ -0,0 +1,16 @@ + + +# ReferencePriceResponse1 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | [optional] | +|**status** | **Long** | | [optional] | +|**result** | [**ReferencePriceResponse1Result**](ReferencePriceResponse1Result.md) | | [optional] | +|**rateLimits** | [**List<AvgPriceResponseRateLimitsInner>**](AvgPriceResponseRateLimitsInner.md) | | [optional] | + + + diff --git a/clients/spot/docs/ReferencePriceResponseResult.md b/clients/spot/docs/ReferencePriceResponse1Result.md similarity index 70% rename from clients/spot/docs/ReferencePriceResponseResult.md rename to clients/spot/docs/ReferencePriceResponse1Result.md index f7a53919e..780895907 100644 --- a/clients/spot/docs/ReferencePriceResponseResult.md +++ b/clients/spot/docs/ReferencePriceResponse1Result.md @@ -1,6 +1,6 @@ -# ReferencePriceResponseResult +# ReferencePriceResponse1Result ## Properties @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**symbol** | **String** | | [optional] | |**referencePrice** | **String** | | [optional] | -|**timestamp** | **Long** | Timestamp when the reference price was valid | [optional] | +|**timestamp** | **String** | Timestamp when the reference price was valid | [optional] | |**code** | **Long** | | [optional] | |**msg** | **String** | | [optional] | diff --git a/clients/spot/docs/ReferencePriceResponse2.md b/clients/spot/docs/ReferencePriceResponse2.md new file mode 100644 index 000000000..8414db0f5 --- /dev/null +++ b/clients/spot/docs/ReferencePriceResponse2.md @@ -0,0 +1,17 @@ + + +# ReferencePriceResponse2 + +If no reference price is set: + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | [optional] | +|**status** | **Long** | | [optional] | +|**result** | [**ReferencePriceResponse2Result**](ReferencePriceResponse2Result.md) | | [optional] | +|**rateLimits** | [**List<AvgPriceResponseRateLimitsInner>**](AvgPriceResponseRateLimitsInner.md) | | [optional] | + + + diff --git a/clients/spot/docs/ReferencePriceResponse2Result.md b/clients/spot/docs/ReferencePriceResponse2Result.md new file mode 100644 index 000000000..5fae29efb --- /dev/null +++ b/clients/spot/docs/ReferencePriceResponse2Result.md @@ -0,0 +1,15 @@ + + +# ReferencePriceResponse2Result + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**symbol** | **String** | | [optional] | +|**referencePrice** | **Object** | | [optional] | +|**timestamp** | **String** | Timestamp when the reference price was valid | [optional] | + + + diff --git a/clients/spot/docs/SessionStatusResponseResult.md b/clients/spot/docs/SessionStatusResponseResult.md index ca25b6777..8e0df93a5 100644 --- a/clients/spot/docs/SessionStatusResponseResult.md +++ b/clients/spot/docs/SessionStatusResponseResult.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**apiKey** | **String** | | [optional] | -|**authorizedSince** | **Long** | | [optional] | +|**apiKey** | **String** | `null` if the connection is not authenticated. | [optional] | +|**authorizedSince** | **Long** | `null` if the connection is not authenticated. | [optional] | |**connectedSince** | **Long** | | [optional] | |**returnRateLimits** | **Boolean** | | [optional] | |**serverTime** | **Long** | | [optional] | diff --git a/clients/spot/docs/SorOrderPlaceResponse.md b/clients/spot/docs/SorOrderPlaceResponse.md index 69a10665e..5d3870d66 100644 --- a/clients/spot/docs/SorOrderPlaceResponse.md +++ b/clients/spot/docs/SorOrderPlaceResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<SorOrderPlaceResponseResultInner>**](SorOrderPlaceResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<PingResponseRateLimitsInner>**](PingResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/SorOrderTestResponse.md b/clients/spot/docs/SorOrderTestResponse.md index f7a7c6d43..4764b0187 100644 --- a/clients/spot/docs/SorOrderTestResponse.md +++ b/clients/spot/docs/SorOrderTestResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**SorOrderTestResponseResult**](SorOrderTestResponseResult.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<PingResponseRateLimitsInner>**](PingResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/SorOrderTestResponseResult.md b/clients/spot/docs/SorOrderTestResponseResult.md index 61cee159f..efe7e8435 100644 --- a/clients/spot/docs/SorOrderTestResponseResult.md +++ b/clients/spot/docs/SorOrderTestResponseResult.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**standardCommissionForOrder** | [**OrderTestResponseResultStandardCommissionForOrder**](OrderTestResponseResultStandardCommissionForOrder.md) | | [optional] | -|**taxCommissionForOrder** | [**OrderTestResponseResultStandardCommissionForOrder**](OrderTestResponseResultStandardCommissionForOrder.md) | | [optional] | +|**taxCommissionForOrder** | [**OrderTestResponseResultTaxCommissionForOrder**](OrderTestResponseResultTaxCommissionForOrder.md) | | [optional] | |**discount** | [**OrderTestResponseResultDiscount**](OrderTestResponseResultDiscount.md) | | [optional] | diff --git a/clients/spot/docs/Ticker24hrResponse.md b/clients/spot/docs/Ticker24hrResponse.md index 23069a833..01ef09d0d 100644 --- a/clients/spot/docs/Ticker24hrResponse.md +++ b/clients/spot/docs/Ticker24hrResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<Ticker24hrResponse2ResultInner>**](Ticker24hrResponse2ResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<AvgPriceResponseRateLimitsInner>**](AvgPriceResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/Ticker24hrResponse1.md b/clients/spot/docs/Ticker24hrResponse1.md index afffd05b9..b4aefab5b 100644 --- a/clients/spot/docs/Ticker24hrResponse1.md +++ b/clients/spot/docs/Ticker24hrResponse1.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**Ticker24hrResponse1Result**](Ticker24hrResponse1Result.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<Ticker24hrResponse1RateLimitsInner>**](Ticker24hrResponse1RateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/Ticker24hrResponse1RateLimitsInner.md b/clients/spot/docs/Ticker24hrResponse1RateLimitsInner.md new file mode 100644 index 000000000..1a626ffbf --- /dev/null +++ b/clients/spot/docs/Ticker24hrResponse1RateLimitsInner.md @@ -0,0 +1,17 @@ + + +# Ticker24hrResponse1RateLimitsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rateLimitType** | **String** | | [optional] | +|**interval** | **String** | | [optional] | +|**intervalNum** | **Long** | | [optional] | +|**limit** | **Long** | | [optional] | +|**count** | **Long** | Number of trades | [optional] | + + + diff --git a/clients/spot/docs/Ticker24hrResponse2.md b/clients/spot/docs/Ticker24hrResponse2.md index e04456f38..ffbe0c0af 100644 --- a/clients/spot/docs/Ticker24hrResponse2.md +++ b/clients/spot/docs/Ticker24hrResponse2.md @@ -2,6 +2,7 @@ # Ticker24hrResponse2 +If more than one symbol is requested, response returns an array: ## Properties @@ -10,7 +11,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<Ticker24hrResponse2ResultInner>**](Ticker24hrResponse2ResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<AvgPriceResponseRateLimitsInner>**](AvgPriceResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TickerBookResponse.md b/clients/spot/docs/TickerBookResponse.md index 6fdc5f20d..cc69e6f33 100644 --- a/clients/spot/docs/TickerBookResponse.md +++ b/clients/spot/docs/TickerBookResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<TickerBookResponse2ResultInner>**](TickerBookResponse2ResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<OrderAmendmentsResponseRateLimitsInner>**](OrderAmendmentsResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TickerBookResponse1.md b/clients/spot/docs/TickerBookResponse1.md index eedeed21a..71519c1ed 100644 --- a/clients/spot/docs/TickerBookResponse1.md +++ b/clients/spot/docs/TickerBookResponse1.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**TickerBookResponse1Result**](TickerBookResponse1Result.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<AvgPriceResponseRateLimitsInner>**](AvgPriceResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TickerBookResponse2.md b/clients/spot/docs/TickerBookResponse2.md index 66a2fcc66..25eaf007b 100644 --- a/clients/spot/docs/TickerBookResponse2.md +++ b/clients/spot/docs/TickerBookResponse2.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<TickerBookResponse2ResultInner>**](TickerBookResponse2ResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<OrderAmendmentsResponseRateLimitsInner>**](OrderAmendmentsResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TickerPriceResponse.md b/clients/spot/docs/TickerPriceResponse.md index 2d0daf18e..0f8615ae9 100644 --- a/clients/spot/docs/TickerPriceResponse.md +++ b/clients/spot/docs/TickerPriceResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<TickerPriceResponse2ResultInner>**](TickerPriceResponse2ResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<OrderAmendmentsResponseRateLimitsInner>**](OrderAmendmentsResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TickerPriceResponse1.md b/clients/spot/docs/TickerPriceResponse1.md index d9ad9042e..09207529b 100644 --- a/clients/spot/docs/TickerPriceResponse1.md +++ b/clients/spot/docs/TickerPriceResponse1.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**TickerPriceResponse1Result**](TickerPriceResponse1Result.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<AvgPriceResponseRateLimitsInner>**](AvgPriceResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TickerPriceResponse2.md b/clients/spot/docs/TickerPriceResponse2.md index 61494cf50..a6da0bf05 100644 --- a/clients/spot/docs/TickerPriceResponse2.md +++ b/clients/spot/docs/TickerPriceResponse2.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<TickerPriceResponse2ResultInner>**](TickerPriceResponse2ResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<OrderAmendmentsResponseRateLimitsInner>**](OrderAmendmentsResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TickerResponse1.md b/clients/spot/docs/TickerResponse1.md index 2de129c3b..1fc8793e9 100644 --- a/clients/spot/docs/TickerResponse1.md +++ b/clients/spot/docs/TickerResponse1.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**TickerResponse1Result**](TickerResponse1Result.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<TickerResponse1RateLimitsInner>**](TickerResponse1RateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TickerResponse1RateLimitsInner.md b/clients/spot/docs/TickerResponse1RateLimitsInner.md new file mode 100644 index 000000000..247075cd4 --- /dev/null +++ b/clients/spot/docs/TickerResponse1RateLimitsInner.md @@ -0,0 +1,17 @@ + + +# TickerResponse1RateLimitsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rateLimitType** | **String** | | [optional] | +|**interval** | **String** | | [optional] | +|**intervalNum** | **Long** | | [optional] | +|**limit** | **Long** | | [optional] | +|**count** | **Long** | Number of trades | [optional] | + + + diff --git a/clients/spot/docs/TickerResponse1Result.md b/clients/spot/docs/TickerResponse1Result.md index 53253c3dc..1dcab85e8 100644 --- a/clients/spot/docs/TickerResponse1Result.md +++ b/clients/spot/docs/TickerResponse1Result.md @@ -20,7 +20,7 @@ |**openTime** | **Long** | Open time for ticker window | [optional] | |**closeTime** | **Long** | Close time for ticker window | [optional] | |**firstId** | **Long** | Trade IDs | [optional] | -|**lastId** | **Long** | | [optional] | +|**lastId** | **Long** | Last trade ID | [optional] | |**count** | **Long** | Number of trades in the interval | [optional] | diff --git a/clients/spot/docs/TickerResponse2.md b/clients/spot/docs/TickerResponse2.md index 56f6e680f..e1b3fb784 100644 --- a/clients/spot/docs/TickerResponse2.md +++ b/clients/spot/docs/TickerResponse2.md @@ -2,6 +2,7 @@ # TickerResponse2 +If more than one symbol is requested, response returns an array: ## Properties @@ -10,7 +11,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<TickerResponse2ResultInner>**](TickerResponse2ResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<TickerResponse2RateLimitsInner>**](TickerResponse2RateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TickerResponse2RateLimitsInner.md b/clients/spot/docs/TickerResponse2RateLimitsInner.md new file mode 100644 index 000000000..a1361c221 --- /dev/null +++ b/clients/spot/docs/TickerResponse2RateLimitsInner.md @@ -0,0 +1,17 @@ + + +# TickerResponse2RateLimitsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rateLimitType** | **String** | | [optional] | +|**interval** | **String** | | [optional] | +|**intervalNum** | **Long** | | [optional] | +|**limit** | **Long** | | [optional] | +|**count** | **Long** | | [optional] | + + + diff --git a/clients/spot/docs/TickerTradingDayResponse.md b/clients/spot/docs/TickerTradingDayResponse.md index bc5450cd8..51f8f0565 100644 --- a/clients/spot/docs/TickerTradingDayResponse.md +++ b/clients/spot/docs/TickerTradingDayResponse.md @@ -9,8 +9,8 @@ |------------ | ------------- | ------------- | -------------| |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | -|**result** | [**List<TickerTradingDayResponseResultInner>**](TickerTradingDayResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**result** | [**List<TickerTradingDayResponse2ResultInner>**](TickerTradingDayResponse2ResultInner.md) | | [optional] | +|**rateLimits** | [**List<TickerResponse2RateLimitsInner>**](TickerResponse2RateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TickerTradingDayResponse1.md b/clients/spot/docs/TickerTradingDayResponse1.md index 330c24fcc..ee82cdec7 100644 --- a/clients/spot/docs/TickerTradingDayResponse1.md +++ b/clients/spot/docs/TickerTradingDayResponse1.md @@ -7,21 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**symbol** | **String** | | [optional] | -|**priceChange** | **String** | Absolute price change | [optional] | -|**priceChangePercent** | **String** | Relative price change in percent | [optional] | -|**weightedAvgPrice** | **String** | quoteVolume / volume | [optional] | -|**openPrice** | **String** | | [optional] | -|**highPrice** | **String** | | [optional] | -|**lowPrice** | **String** | | [optional] | -|**lastPrice** | **String** | | [optional] | -|**volume** | **String** | Volume in base asset | [optional] | -|**quoteVolume** | **String** | Volume in quote asset | [optional] | -|**openTime** | **Long** | | [optional] | -|**closeTime** | **Long** | | [optional] | -|**firstId** | **Long** | Trade ID of the first trade in the interval | [optional] | -|**lastId** | **Long** | Trade ID of the last trade in the interval | [optional] | -|**count** | **Long** | Number of trades in the interval | [optional] | +|**id** | **String** | | [optional] | +|**status** | **Long** | | [optional] | +|**result** | [**TickerTradingDayResponse1Result**](TickerTradingDayResponse1Result.md) | | [optional] | +|**rateLimits** | [**List<OrderAmendmentsResponseRateLimitsInner>**](OrderAmendmentsResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TickerTradingDayResponseResultInner.md b/clients/spot/docs/TickerTradingDayResponse1Result.md similarity index 96% rename from clients/spot/docs/TickerTradingDayResponseResultInner.md rename to clients/spot/docs/TickerTradingDayResponse1Result.md index 8c5db69df..beaa3f398 100644 --- a/clients/spot/docs/TickerTradingDayResponseResultInner.md +++ b/clients/spot/docs/TickerTradingDayResponse1Result.md @@ -1,6 +1,6 @@ -# TickerTradingDayResponseResultInner +# TickerTradingDayResponse1Result ## Properties diff --git a/clients/spot/docs/TickerTradingDayResponse2.md b/clients/spot/docs/TickerTradingDayResponse2.md index e6d9f5495..a6eeb0122 100644 --- a/clients/spot/docs/TickerTradingDayResponse2.md +++ b/clients/spot/docs/TickerTradingDayResponse2.md @@ -7,6 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | | [optional] | +|**status** | **Long** | | [optional] | +|**result** | [**List<TickerTradingDayResponse2ResultInner>**](TickerTradingDayResponse2ResultInner.md) | | [optional] | +|**rateLimits** | [**List<TickerResponse2RateLimitsInner>**](TickerResponse2RateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TickerTradingDayResponse2ResultInner.md b/clients/spot/docs/TickerTradingDayResponse2ResultInner.md new file mode 100644 index 000000000..6b91585bf --- /dev/null +++ b/clients/spot/docs/TickerTradingDayResponse2ResultInner.md @@ -0,0 +1,27 @@ + + +# TickerTradingDayResponse2ResultInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**symbol** | **String** | | [optional] | +|**priceChange** | **String** | Absolute price change | [optional] | +|**priceChangePercent** | **String** | Relative price change in percent | [optional] | +|**weightedAvgPrice** | **String** | quoteVolume / volume | [optional] | +|**openPrice** | **String** | | [optional] | +|**highPrice** | **String** | | [optional] | +|**lowPrice** | **String** | | [optional] | +|**lastPrice** | **String** | | [optional] | +|**volume** | **String** | Volume in base asset | [optional] | +|**quoteVolume** | **String** | Volume in quote asset | [optional] | +|**openTime** | **Long** | | [optional] | +|**closeTime** | **Long** | | [optional] | +|**firstId** | **Long** | Trade ID of the first trade in the interval | [optional] | +|**lastId** | **Long** | Trade ID of the last trade in the interval | [optional] | +|**count** | **Long** | Number of trades in the interval | [optional] | + + + diff --git a/clients/spot/docs/TimeResponse.md b/clients/spot/docs/TimeResponse.md index 907d9dc5d..ebd8963ec 100644 --- a/clients/spot/docs/TimeResponse.md +++ b/clients/spot/docs/TimeResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**TimeResponseResult**](TimeResponseResult.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<PingResponseRateLimitsInner>**](PingResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TradeApi.md b/clients/spot/docs/TradeApi.md index 2074bbc10..a72f1fb2d 100644 --- a/clients/spot/docs/TradeApi.md +++ b/clients/spot/docs/TradeApi.md @@ -27,7 +27,7 @@ All URIs are relative to *http://localhost* Cancel open orders (TRADE) -Cancel all open orders on a symbol. This includes orders that are part of an order list. Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** Matching Engine +Cancel all open orders on a symbol. This includes orders that are part of an order list. Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** Matching Engine Response Notes: **Note:** The payload above does not show all fields that can appear. Please refer to Conditional fields in Order Responses. ### Example ```java @@ -89,7 +89,7 @@ No authorization required Order Amend Keep Priority (TRADE) -Reduce the quantity of an existing open order. This adds 0 orders to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read [Order Amend Keep Priority FAQ](/products/spot/faqs/order_amend_keep_priority) to learn more. Weight(IP): 4 Unfilled Order Count: 0 Security Type: TRADE Notes: **Data Source:** Matching Engine +Reduce the quantity of an existing open order. This adds 0 orders to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read Order Amend Keep Priority FAQ to learn more. Weight(IP): 4 Unfilled Order Count: 0 Security Type: TRADE Notes: **Data Source:** Matching Engine Response Notes: **Note:** The payload above does not show all fields that can appear. Please refer to Conditional fields in Order Responses. ### Example ```java @@ -151,7 +151,7 @@ No authorization required Cancel order (TRADE) -Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** Matching Engine Notes: * If both `orderId` and `origClientOrderId` parameters are provided, the `orderId` is searched first, then the `origClientOrderId` from that result is checked against that order. If both conditions are not met the request will be rejected. * `newClientOrderId` will replace `clientOrderId` of the canceled order, freeing it up for new orders. * If you cancel an order that is a part of an order list, the entire order list is canceled. * The performance for canceling an order (single cancel or as part of a cancel-replace) is always better when only `orderId` is sent. Sending `origClientOrderId` or both `orderId` + `origClientOrderId` will be slower. +Cancel an active order. Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** Matching Engine Notes: * If both `orderId` and `origClientOrderId` parameters are provided, the `orderId` is searched first, then the `origClientOrderId` from that result is checked against that order. If both conditions are not met the request will be rejected. * `newClientOrderId` will replace `clientOrderId` of the canceled order, freeing it up for new orders. * If you cancel an order that is a part of an order list, the entire order list is canceled. * The performance for canceling an order (single cancel or as part of a cancel-replace) is always better when only `orderId` is sent. Sending `origClientOrderId` or both `orderId` + `origClientOrderId` will be slower. Response Notes: **Note:** The payload above does not show all fields that can appear. Please refer to Conditional fields in Order Responses. **Regarding `cancelRestrictions`** * If the `cancelRestrictions` value is not any of the supported values, the error will be: ```json { \"code\": -1145, \"msg\": \"Invalid cancelRestrictions\" } ``` * If the order did not pass the conditions for `cancelRestrictions`, the error will be: ```json { \"code\": -2011, \"msg\": \"Order was not canceled due to cancel restrictions.\" } ``` ### Example ```java @@ -213,7 +213,7 @@ No authorization required Cancel and replace order (TRADE) -* Cancel an existing order and immediately place a new order instead of the canceled one. * A new order that was not attempted (i.e. when `newOrderResult: NOT_ATTEMPTED`), will still increase the unfilled order count by 1. * You can only cancel an individual order from an orderList using this method, but the result is the same as canceling the entire orderList.not attempted (i.e. when `newOrderResult: NOT_ATTEMPTED`), will still increase the unfilled order count by 1. Weight(IP): 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** Matching Engine Similar to the [`order.place`](#order-place) request, additional mandatory parameters (*) are determined by the new order `type`. Available `cancelReplaceMode` options: * `STOP_ON_FAILURE` – if cancellation request fails, new order placement will not be attempted. * `ALLOW_FAILURE` – new order placement will be attempted even if the cancel request fails. <table> <thead> <tr> <th colspan=3 align=left>Request</th> <th colspan=3 align=left>Response</th> </tr> <tr> <th><code>cancelReplaceMode</code></th> <th><code>orderRateLimitExceededMode</code></th> <th>Unfilled Order Count</th> <th><code>cancelResult</code></th> <th><code>newOrderResult</code></th> <th><code>status</code></th> </tr> </thead> <tbody> <tr> <td rowspan=\"11\"><code>STOP_ON_FAILURE</code></td> <td rowspan=\"6\"><code>DO_NOTHING</code></td> <td rowspan=\"3\">Within Limits</td> <td>✅ <code>SUCCESS</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right><code>200</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>➖ <code>NOT_ATTEMPTED</code></td> <td align=right><code>400</code></td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>409</code></td> </tr> <tr> <td rowspan=\"3\">Exceeds Limits</td> <td>✅ <code>SUCCESS</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right>N/A</td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>➖ <code>NOT_ATTEMPTED</code></td> <td align=right>N/A</td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right>N/A</td> </tr> <tr> <td rowspan=\"5\"><code>CANCEL_ONLY</code></td> <td rowspan=\"3\">Within Limits</td> <td>✅ <code>SUCCESS</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right><code>200</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>➖ <code>NOT_ATTEMPTED</code></td> <td align=right><code>400</code></td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>409</code></td> </tr> <tr> <td rowspan=\"2\">Exceeds Limits</td> <td>❌ <code>FAILURE</code></td> <td>➖ <code>NOT_ATTEMPTED</code></td> <td align=right><code>429</code></td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>429</code></td> </tr> <tr> <td rowspan=\"16\"><code>ALLOW_FAILURE</code></td> <td rowspan=\"8\"><code>DO_NOTHING</code></td> <td rowspan=\"4\">Within Limits</td> <td>✅ <code>SUCCESS</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right><code>200</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>400</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right><code>409</code></td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>409</code></td> </tr> <tr> <td rowspan=\"4\">Exceeds Limits</td> <td>✅ <code>SUCCESS</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right>N/A</td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>❌ <code>FAILURE</code></td> <td align=right>N/A</td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right>N/A</td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right>N/A</td> </tr> <tr> <td rowspan=\"8\"><CODE>CANCEL_ONLY</CODE></td> <td rowspan=\"4\">Within Limits</td> <td>✅ <code>SUCCESS</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right><code>200</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>400</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right><code>409</code></td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>409</code></td> </tr> <tr> <td rowspan=\"4\">Exceeds Limits</td> <td>✅ <code>SUCCESS</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right><code>200</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>400</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right>N/A</td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>409</code></td> </tr> </tbody> </table> Notes: * If both `cancelOrderId` and `cancelOrigClientOrderId` parameters are provided, the `cancelOrderId` is searched first, then the `cancelOrigClientOrderId` from that result is checked against that order. If both conditions are not met the request will be rejected. * `cancelNewClientOrderId` will replace `clientOrderId` of the canceled order, freeing it up for new orders. * `newClientOrderId` specifies `clientOrderId` value for the placed order. A new order with the same `clientOrderId` is accepted only when the previous one is filled or expired. The new order can reuse old `clientOrderId` of the canceled order. * This cancel-replace operation is **not transactional**. If one operation succeeds but the other one fails, the successful operation is still executed. For example, in `STOP_ON_FAILURE` mode, if the new order placement fails, the old order is still canceled. * Filters and order count limits are evaluated before cancellation and order placement occurs. * If new order placement is not attempted, your order count is still incremented. * Like [`order.cancel`](#order-cancel), if you cancel an individual order from an order list, the entire order list is canceled. * The performance for canceling an order (single cancel or as part of a cancel-replace) is always better when only `orderId` is sent. Sending `origClientOrderId` or both `orderId` + `origClientOrderId` will be slower. +* Cancel an existing order and immediately place a new order instead of the canceled one. * A new order that was not attempted (i.e. when `newOrderResult: NOT_ATTEMPTED`), will still increase the unfilled order count by 1. * You can only cancel an individual order from an orderList using this method, but the result is the same as canceling the entire orderList. Weight(IP): 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** Matching Engine Similar to the `order.place` request, additional mandatory parameters (*) are determined by the new order `type`. Available `cancelReplaceMode` options: * `STOP_ON_FAILURE` – if cancellation request fails, new order placement will not be attempted. * `ALLOW_FAILURE` – new order placement will be attempted even if the cancel request fails. <table> <thead> <tr> <th colspan=3 align=left>Request</th> <th colspan=3 align=left>Response</th> </tr> <tr> <th><code>cancelReplaceMode</code></th> <th><code>orderRateLimitExceededMode</code></th> <th>Unfilled Order Count</th> <th><code>cancelResult</code></th> <th><code>newOrderResult</code></th> <th><code>status</code></th> </tr> </thead> <tbody> <tr> <td rowspan=\"11\"><code>STOP_ON_FAILURE</code></td> <td rowspan=\"6\"><code>DO_NOTHING</code></td> <td rowspan=\"3\">Within Limits</td> <td>✅ <code>SUCCESS</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right><code>200</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>➖ <code>NOT_ATTEMPTED</code></td> <td align=right><code>400</code></td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>409</code></td> </tr> <tr> <td rowspan=\"3\">Exceeds Limits</td> <td>✅ <code>SUCCESS</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right>N/A</td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>➖ <code>NOT_ATTEMPTED</code></td> <td align=right>N/A</td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right>N/A</td> </tr> <tr> <td rowspan=\"5\"><code>CANCEL_ONLY</code></td> <td rowspan=\"3\">Within Limits</td> <td>✅ <code>SUCCESS</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right><code>200</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>➖ <code>NOT_ATTEMPTED</code></td> <td align=right><code>400</code></td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>409</code></td> </tr> <tr> <td rowspan=\"2\">Exceeds Limits</td> <td>❌ <code>FAILURE</code></td> <td>➖ <code>NOT_ATTEMPTED</code></td> <td align=right><code>429</code></td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>429</code></td> </tr> <tr> <td rowspan=\"16\"><code>ALLOW_FAILURE</code></td> <td rowspan=\"8\"><code>DO_NOTHING</code></td> <td rowspan=\"4\">Within Limits</td> <td>✅ <code>SUCCESS</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right><code>200</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>400</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right><code>409</code></td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>409</code></td> </tr> <tr> <td rowspan=\"4\">Exceeds Limits</td> <td>✅ <code>SUCCESS</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right>N/A</td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>❌ <code>FAILURE</code></td> <td align=right>N/A</td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right>N/A</td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right>N/A</td> </tr> <tr> <td rowspan=\"8\"><CODE>CANCEL_ONLY</CODE></td> <td rowspan=\"4\">Within Limits</td> <td>✅ <code>SUCCESS</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right><code>200</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>400</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right><code>409</code></td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>409</code></td> </tr> <tr> <td rowspan=\"4\">Exceeds Limits</td> <td>✅ <code>SUCCESS</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right><code>200</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>400</code></td> </tr> <tr> <td>❌ <code>FAILURE</code></td> <td>✅ <code>SUCCESS</code></td> <td align=right>N/A</td> </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ <code>FAILURE</code></td> <td align=right><code>409</code></td> </tr> </tbody> </table> Notes: * If both `cancelOrderId` and `cancelOrigClientOrderId` parameters are provided, the `cancelOrderId` is searched first, then the `cancelOrigClientOrderId` from that result is checked against that order. If both conditions are not met the request will be rejected. * `cancelNewClientOrderId` will replace `clientOrderId` of the canceled order, freeing it up for new orders. * `newClientOrderId` specifies `clientOrderId` value for the placed order. A new order with the same `clientOrderId` is accepted only when the previous one is filled or expired. The new order can reuse old `clientOrderId` of the canceled order. * This cancel-replace operation is **not transactional**. If one operation succeeds but the other one fails, the successful operation is still executed. For example, in `STOP_ON_FAILURE` mode, if the new order placement fails, the old order is still canceled. * Filters and order count limits are evaluated before cancellation and order placement occurs. * If new order placement is not attempted, your order count is still incremented. * Like `order.cancel`, if you cancel an individual order from an order list, the entire order list is canceled. * The performance for canceling an order (single cancel or as part of a cancel-replace) is always better when only `orderId` is sent. Sending `origClientOrderId` or both `orderId` + `origClientOrderId` will be slower. Response Notes: **Note:** The payload above does not show all fields that can appear. Please refer to Conditional fields in Order Responses. ### Example ```java @@ -275,7 +275,7 @@ No authorization required Cancel Order list (TRADE) -Cancel an active order list. Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** Matching Engine Notes: * If both `orderListId` and `listClientOrderId` parameters are provided, the `orderListId` is searched first, then the `listClientOrderId` from that result is checked against that order. If both conditions are not met the request will be rejected. * Canceling an individual order with [`order.cancel`](#order-cancel) will cancel the entire order list as well. +Cancel an active order list. Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** Matching Engine Notes: * If both `orderListId` and `listClientOrderId` parameters are provided, the `orderListId` is searched first, then the `listClientOrderId` from that result is checked against that order. If both conditions are not met the request will be rejected. * Canceling an individual order with `order.cancel` will cancel the entire order list as well. ### Example ```java @@ -461,7 +461,7 @@ No authorization required OPO (TRADE) -Place an [OPO](/products/spot/faqs/opo). * OPOs add 2 orders to the EXCHANGE_MAX_NUM_ORDERS filter and MAX_NUM_ORDERS filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** Matching Engine +Place an OPO. * OPOs add 2 orders to the EXCHANGE_MAX_NUM_ORDERS filter and MAX_NUM_ORDERS filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** Matching Engine Response Notes: **Note:** The payload above does not show all fields that can appear. Please refer to Conditional fields in Order Responses. ### Example ```java @@ -523,7 +523,7 @@ No authorization required OPOCO (TRADE) -Place an [OPOCO](/products/spot/faqs/opo). Weight(IP): 1 Unfilled Order Count: 3 Security Type: TRADE Notes: **Data Source:** Matching Engine +Place an OPOCO. Weight(IP): 1 Unfilled Order Count: 3 Security Type: TRADE Notes: **Data Source:** Matching Engine Response Notes: **Note:** The payload above does not show all fields that can appear. Please refer to Conditional fields in Order Responses. ### Example ```java @@ -585,7 +585,7 @@ No authorization required Place new Order list - OTO (TRADE) -Places an OTO. * An OTO (One-Triggers-the-Other) is an order list comprised of 2 orders. * The first order is called the **working order** and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. * The second order is called the **pending order**. It can be any order type except for `MARKET` orders using parameter `quoteOrderQty`. The pending order is only placed on the order book when the working order gets **fully filled**. * If either the working order or the pending order is cancelled individually, the other order in the order list will also be canceled or expired. * When the order list is placed, if the working order gets **immediately fully filled**, the placement response will show the working order as `FILLED` but the pending order will still appear as `PENDING_NEW`. You need to query the status of the pending order again to see its updated status. * OTOs add **2 orders** to the `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** Matching Engine **Mandatory parameters based on `pendingType` or `workingType`** Depending on the `pendingType` or `workingType`, some optional parameters will become mandatory. |Type |Additional mandatory parameters|Additional information| |---- |---- |------ |`workingType` = `LIMIT` |`workingTimeInForce` | |`pendingType` = `LIMIT` |`pendingPrice`, `pendingTimeInForce` | |`pendingType` = `STOP_LOSS` or `TAKE_PROFIT` |`pendingStopPrice` and/or `pendingTrailingDelta`| |`pendingType` =`STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT`|`pendingPrice`, `pendingStopPrice` and/or `pendingTrailingDelta`, `pendingTimeInForce`| +Places an OTO. * An OTO (One-Triggers-the-Other) is an order list comprised of 2 orders. * The first order is called the **working order** and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. * The second order is called the **pending order**. It can be any order type except for `MARKET` orders using parameter `quoteOrderQty`. The pending order is only placed on the order book when the working order gets **fully filled**. * If either the working order or the pending order is cancelled individually, the other order in the order list will also be canceled or expired. * When the order list is placed, if the working order gets **immediately fully filled**, the placement response will show the working order as `FILLED` but the pending order will still appear as `PENDING_NEW`. You need to query the status of the pending order again to see its updated status. * OTOs add **2 orders** to the `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** Matching Engine **Mandatory parameters based on `pendingType` or `workingType`** Depending on the `pendingType` or `workingType`, some optional parameters will become mandatory. |Type |Additional mandatory parameters|Additional information| |---- |---- |------ |`workingType` = `LIMIT` |`workingTimeInForce` | |`pendingType` = `LIMIT` |`pendingPrice`, `pendingTimeInForce` | |`pendingType` = `STOP_LOSS` or `TAKE_PROFIT` |`pendingStopPrice` and/or `pendingTrailingDelta`| |`pendingType` =`STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT`|`pendingPrice`, `pendingStopPrice` and/or `pendingTrailingDelta`, `pendingTimeInForce`| Response Notes: **Note:** The payload above does not show all fields that can appear. Please refer to Conditional fields in Order Responses. ### Example ```java @@ -647,7 +647,7 @@ No authorization required Place new Order list - OTOCO (TRADE) -Place an OTOCO. * An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list comprised of 3 orders. * The first order is called the **working order** and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. * The behavior of the working order is the same as the [OTO](#order-list-place-oto). * OTOCO has 2 pending orders (pending above and pending below), forming an OCO pair. The pending orders are only placed on the order book when the working order gets **fully filled**. * The rules of the pending above and pending below follow the same rules as the [Order list OCO](#order-list-place-oco). * OTOCOs add **3 orders** to the `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 3 Security Type: TRADE Notes: **Data Source:** Matching Engine **Mandatory parameters based on `pendingAboveType`, `pendingBelowType` or `workingType`** Depending on the `pendingAboveType`/`pendingBelowType` or `workingType`, some optional parameters will become mandatory. |Type |Additional mandatory parameters|Additional information| |---- |---- |------ |`workingType` = `LIMIT` |`workingTimeInForce` | |`pendingAboveType`= `LIMIT_MAKER` |`pendingAbovePrice` | |`pendingAboveType` = `STOP_LOSS/TAKE_PROFIT` |`pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`| |`pendingAboveType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT`|`pendingAbovePrice`, `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`, `pendingAboveTimeInForce`| |`pendingBelowType`= `LIMIT_MAKER` |`pendingBelowPrice` | `pendingBelowType= STOP_LOSS/TAKE_PROFIT` |`pendingBelowStopPrice` and/or `pendingBelowTrailingDelta`| |`pendingBelowType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT`|`pendingBelowPrice`, `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta`, `pendingBelowTimeInForce`| +Place an OTOCO. * An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list comprised of 3 orders. * The first order is called the **working order** and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. * The behavior of the working order is the same as the OTO. * OTOCO has 2 pending orders (pending above and pending below), forming an OCO pair. The pending orders are only placed on the order book when the working order gets **fully filled**. * The rules of the pending above and pending below follow the same rules as the Order list OCO. * OTOCOs add **3 orders** to the `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 3 Security Type: TRADE Notes: **Data Source:** Matching Engine **Mandatory parameters based on `pendingAboveType`, `pendingBelowType` or `workingType`** Depending on the `pendingAboveType`/`pendingBelowType` or `workingType`, some optional parameters will become mandatory. |Type |Additional mandatory parameters|Additional information| |---- |---- |------ |`workingType` = `LIMIT` |`workingTimeInForce` | |`pendingAboveType`= `LIMIT_MAKER` |`pendingAbovePrice` | |`pendingAboveType` = `STOP_LOSS/TAKE_PROFIT` |`pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`| |`pendingAboveType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT`|`pendingAbovePrice`, `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`, `pendingAboveTimeInForce`| |`pendingBelowType`= `LIMIT_MAKER` |`pendingBelowPrice` | `pendingBelowType= STOP_LOSS/TAKE_PROFIT` |`pendingBelowStopPrice` and/or `pendingBelowTrailingDelta`| |`pendingBelowType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT`|`pendingBelowPrice`, `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta`, `pendingBelowTimeInForce`| Response Notes: **Note:** The payload above does not show all fields that can appear. Please refer to Conditional fields in Order Responses. ### Example ```java @@ -709,7 +709,7 @@ No authorization required Place new order (TRADE) -Send in a new order. This adds 1 order to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** Matching Engine <a id=\"order-type\">Certain parameters (*)</a> become mandatory based on the order `type`: <table> <thead> <tr> <th>Order <code>type</code></th> <th>Mandatory parameters</th> </tr> </thead> <tbody> <tr> <td><code>LIMIT</code></td> <td> <ul> <li><code>timeInForce</code></li> <li><code>price</code></li> <li><code>quantity</code></li> </ul> </td> </tr> <tr> <td><code>LIMIT_MAKER</code></td> <td> <ul> <li><code>price</code></li> <li><code>quantity</code></li> </ul> </td> </tr> <tr> <td><code>MARKET</code></td> <td> <ul> <li><code>quantity</code> or <code>quoteOrderQty</code></li> </ul> </td> </tr> <tr> <td><code>STOP_LOSS</code></td> <td> <ul> <li><code>quantity</code></li> <li><code>stopPrice</code> or <code>trailingDelta</code></li> </ul> </td> </tr> <tr> <td><code>STOP_LOSS_LIMIT</code></td> <td> <ul> <li><code>timeInForce</code></li> <li><code>price</code></li> <li><code>quantity</code></li> <li><code>stopPrice</code> or <code>trailingDelta</code></li> </ul> </td> </tr> <tr> <td><code>TAKE_PROFIT</code></td> <td> <ul> <li><code>quantity</code></li> <li><code>stopPrice</code> or <code>trailingDelta</code></li> </ul> </td> </tr> <tr> <td><code>TAKE_PROFIT_LIMIT</code></td> <td> <ul> <li><code>timeInForce</code></li> <li><code>price</code></li> <li><code>quantity</code></li> <li><code>stopPrice</code> or <code>trailingDelta</code></li> </ul> </td> </tr> </tbody> </table> Supported order types: <table> <thead> <tr> <th>Order <code>type</code></th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>LIMIT</code></td> <td> <p> Buy or sell <code>quantity</code> at the specified <code>price</code> or better. </p> </td> </tr> <tr> <td><code>LIMIT_MAKER</code></td> <td> <p> <code>LIMIT</code> order that will be rejected if it immediately matches and trades as a taker. </p> <p> This order type is also known as a POST-ONLY order. </p> </td> </tr> <tr> <td><code>MARKET</code></td> <td> <p> Buy or sell at the best available market price. </p> <ul> <li> <p> <code>MARKET</code> order with <code>quantity</code> parameter specifies the amount of the <em>base asset</em> you want to buy or sell. Actually executed quantity of the quote asset will be determined by available market liquidity. </p> <p> E.g., a MARKET BUY order on BTCUSDT for <code>\"quantity\": \"0.1000\"</code> specifies that you want to buy 0.1 BTC at the best available price. If there is not enough BTC at the best price, keep buying at the next best price, until either your order is filled, or you run out of USDT, or market runs out of BTC. </p> </li> <li> <p> <code>MARKET</code> order with <code>quoteOrderQty</code> parameter specifies the amount of the <em>quote asset</em> you want to spend (when buying) or receive (when selling). Actually executed quantity of the base asset will be determined by available market liquidity. </p> <p> E.g., a MARKET BUY on BTCUSDT for <code>\"quoteOrderQty\": \"100.00\"</code> specifies that you want to buy as much BTC as you can for 100 USDT at the best available price. Similarly, a SELL order will sell as much available BTC as needed for you to receive 100 USDT (before commission). </p> </li> </ul> </td> </tr> <tr> <td><code>STOP_LOSS</code></td> <td> <p> Execute a <code>MARKET</code> order for given <code>quantity</code> when specified conditions are met. </p> <p> I.e., when <code>stopPrice</code> is reached, or when <code>trailingDelta</code> is activated. </p> </td> </tr> <tr> <td><code>STOP_LOSS_LIMIT</code></td> <td> <p> Place a <code>LIMIT</code> order with given parameters when specified conditions are met. </p> </td> </tr> <tr> <td><code>TAKE_PROFIT</code></td> <td> <p> Like <code>STOP_LOSS</code> but activates when market price moves in the favorable direction. </p> </td> </tr> <tr> <td><code>TAKE_PROFIT_LIMIT</code></td> <td> <p> Like <code>STOP_LOSS_LIMIT</code> but activates when market price moves in the favorable direction. </p> </td> </tr> </tbody> </table> <a id=\"pegged-orders-info\"></a> Notes on using parameters for Pegged Orders: * These parameters are allowed for `LIMIT`, `LIMIT_MAKER`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT_LIMIT` orders. * If `pegPriceType` is specified, `price` becomes optional. Otherwise, it is still mandatory. * `pegPriceType=PRIMARY_PEG` means the primary peg, that is the best price on the same side of the order book as your order. * `pegPriceType=MARKET_PEG` means the market peg, that is the best price on the opposite side of the order book from your order. * Use `pegOffsetType` and `pegOffsetValue` to request a price level other than the best one. These parameters must be specified together. <a id=\"timeInForce\"></a> Available `timeInForce` options, setting how long the order should be active before expiration: TIF | Description ----- | -------------- `GTC` | **Good 'til Canceled** – the order will remain on the book until you cancel it, or the order is completely filled. `IOC` | **Immediate or Cancel** – the order will be filled for as much as possible, the unfilled quantity immediately expires. `FOK` | **Fill or Kill** – the order will expire unless it cannot be immediately filled for the entire quantity. Notes: * `newClientOrderId` specifies `clientOrderId` value for the order. A new order with the same `clientOrderId` is accepted only when the previous one is filled or expired. * Any `LIMIT` or `LIMIT_MAKER` order can be made into an iceberg order by specifying the `icebergQty`. An order with an `icebergQty` must have `timeInForce` set to `GTC`. * Trigger order price rules for `STOP_LOSS`/`TAKE_PROFIT` orders: * `stopPrice` must be above market price: `STOP_LOSS BUY`, `TAKE_PROFIT SELL` * `stopPrice` must be below market price: `STOP_LOSS SELL`, `TAKE_PROFIT BUY` * `MARKET` orders using `quoteOrderQty` follow [`LOT_SIZE`](/products/spot/filters#lot_size) filter rules. The order will execute a quantity that has notional value as close as possible to requested `quoteOrderQty`. +Send in a new order. This adds 1 order to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** Matching Engine Certain parameters (*) become mandatory based on the order `type`: <table> <thead> <tr> <th>Order <code>type</code></th> <th>Mandatory parameters</th> </tr> </thead> <tbody> <tr> <td><code>LIMIT</code></td> <td> <ul> <li><code>timeInForce</code></li> <li><code>price</code></li> <li><code>quantity</code></li> </ul> </td> </tr> <tr> <td><code>LIMIT_MAKER</code></td> <td> <ul> <li><code>price</code></li> <li><code>quantity</code></li> </ul> </td> </tr> <tr> <td><code>MARKET</code></td> <td> <ul> <li><code>quantity</code> or <code>quoteOrderQty</code></li> </ul> </td> </tr> <tr> <td><code>STOP_LOSS</code></td> <td> <ul> <li><code>quantity</code></li> <li><code>stopPrice</code> or <code>trailingDelta</code></li> </ul> </td> </tr> <tr> <td><code>STOP_LOSS_LIMIT</code></td> <td> <ul> <li><code>timeInForce</code></li> <li><code>price</code></li> <li><code>quantity</code></li> <li><code>stopPrice</code> or <code>trailingDelta</code></li> </ul> </td> </tr> <tr> <td><code>TAKE_PROFIT</code></td> <td> <ul> <li><code>quantity</code></li> <li><code>stopPrice</code> or <code>trailingDelta</code></li> </ul> </td> </tr> <tr> <td><code>TAKE_PROFIT_LIMIT</code></td> <td> <ul> <li><code>timeInForce</code></li> <li><code>price</code></li> <li><code>quantity</code></li> <li><code>stopPrice</code> or <code>trailingDelta</code></li> </ul> </td> </tr> </tbody> </table> Supported order types: <table> <thead> <tr> <th>Order <code>type</code></th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>LIMIT</code></td> <td> <p> Buy or sell <code>quantity</code> at the specified <code>price</code> or better. </p> </td> </tr> <tr> <td><code>LIMIT_MAKER</code></td> <td> <p> <code>LIMIT</code> order that will be rejected if it immediately matches and trades as a taker. </p> <p> This order type is also known as a POST-ONLY order. </p> </td> </tr> <tr> <td><code>MARKET</code></td> <td> <p> Buy or sell at the best available market price. </p> <ul> <li> <p> <code>MARKET</code> order with <code>quantity</code> parameter specifies the amount of the <em>base asset</em> you want to buy or sell. Actually executed quantity of the quote asset will be determined by available market liquidity. </p> <p> E.g., a MARKET BUY order on BTCUSDT for <code>\"quantity\": \"0.1000\"</code> specifies that you want to buy 0.1 BTC at the best available price. If there is not enough BTC at the best price, keep buying at the next best price, until either your order is filled, or you run out of USDT, or market runs out of BTC. </p> </li> <li> <p> <code>MARKET</code> order with <code>quoteOrderQty</code> parameter specifies the amount of the <em>quote asset</em> you want to spend (when buying) or receive (when selling). Actually executed quantity of the base asset will be determined by available market liquidity. </p> <p> E.g., a MARKET BUY on BTCUSDT for <code>\"quoteOrderQty\": \"100.00\"</code> specifies that you want to buy as much BTC as you can for 100 USDT at the best available price. Similarly, a SELL order will sell as much available BTC as needed for you to receive 100 USDT (before commission). </p> </li> </ul> </td> </tr> <tr> <td><code>STOP_LOSS</code></td> <td> <p> Execute a <code>MARKET</code> order for given <code>quantity</code> when specified conditions are met. </p> <p> I.e., when <code>stopPrice</code> is reached, or when <code>trailingDelta</code> is activated. </p> </td> </tr> <tr> <td><code>STOP_LOSS_LIMIT</code></td> <td> <p> Place a <code>LIMIT</code> order with given parameters when specified conditions are met. </p> </td> </tr> <tr> <td><code>TAKE_PROFIT</code></td> <td> <p> Like <code>STOP_LOSS</code> but activates when market price moves in the favorable direction. </p> </td> </tr> <tr> <td><code>TAKE_PROFIT_LIMIT</code></td> <td> <p> Like <code>STOP_LOSS_LIMIT</code> but activates when market price moves in the favorable direction. </p> </td> </tr> </tbody> </table> Notes on using parameters for Pegged Orders: * These parameters are allowed for `LIMIT`, `LIMIT_MAKER`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT_LIMIT` orders. * If `pegPriceType` is specified, `price` becomes optional. Otherwise, it is still mandatory. * `pegPriceType=PRIMARY_PEG` means the primary peg, that is the best price on the same side of the order book as your order. * `pegPriceType=MARKET_PEG` means the market peg, that is the best price on the opposite side of the order book from your order. * Use `pegOffsetType` and `pegOffsetValue` to request a price level other than the best one. These parameters must be specified together. Available `timeInForce` options, setting how long the order should be active before expiration: TIF | Description ----- | -------------- `GTC` | **Good 'til Canceled** – the order will remain on the book until you cancel it, or the order is completely filled. `IOC` | **Immediate or Cancel** – the order will be filled for as much as possible, the unfilled quantity immediately expires. `FOK` | **Fill or Kill** – the order will expire unless it cannot be immediately filled for the entire quantity. Notes: * `newClientOrderId` specifies `clientOrderId` value for the order. A new order with the same `clientOrderId` is accepted only when the previous one is filled or expired. * Any `LIMIT` or `LIMIT_MAKER` order can be made into an iceberg order by specifying the `icebergQty`. An order with an `icebergQty` must have `timeInForce` set to `GTC`. * Trigger order price rules for `STOP_LOSS`/`TAKE_PROFIT` orders: * `stopPrice` must be above market price: `STOP_LOSS BUY`, `TAKE_PROFIT SELL` * `stopPrice` must be below market price: `STOP_LOSS SELL`, `TAKE_PROFIT BUY` * `MARKET` orders using `quoteOrderQty` follow `LOT_SIZE` filter rules. The order will execute a quantity that has notional value as close as possible to requested `quoteOrderQty`. ### Example ```java @@ -833,7 +833,7 @@ No authorization required Place new order using SOR (TRADE) -Places an order using smart order routing (SOR). This adds 1 order to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read [SOR FAQ](/products/spot/faqs/sor_faq) to learn more. Weight(IP): 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** Matching Engine **Note:** `sor.order.place` only supports `LIMIT` and `MARKET` orders. `quoteOrderQty` is not supported. +Places an order using smart order routing (SOR). This adds 1 order to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read SOR FAQ to learn more. Weight(IP): 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** Matching Engine **Note:** `sor.order.place` only supports `LIMIT` and `MARKET` orders. `quoteOrderQty` is not supported. ### Example ```java diff --git a/clients/spot/docs/TradesAggregateResponse.md b/clients/spot/docs/TradesAggregateResponse.md index bd09124e6..faea6683a 100644 --- a/clients/spot/docs/TradesAggregateResponse.md +++ b/clients/spot/docs/TradesAggregateResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<TradesAggregateResponseResultInner>**](TradesAggregateResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<OrderAmendmentsResponseRateLimitsInner>**](OrderAmendmentsResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TradesHistoricalResponse.md b/clients/spot/docs/TradesHistoricalResponse.md index 0f8c83052..d7d389004 100644 --- a/clients/spot/docs/TradesHistoricalResponse.md +++ b/clients/spot/docs/TradesHistoricalResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<TradesHistoricalResponseResultInner>**](TradesHistoricalResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<TradesHistoricalResponseRateLimitsInner>**](TradesHistoricalResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/TradesHistoricalResponseRateLimitsInner.md b/clients/spot/docs/TradesHistoricalResponseRateLimitsInner.md new file mode 100644 index 000000000..61c9dfcec --- /dev/null +++ b/clients/spot/docs/TradesHistoricalResponseRateLimitsInner.md @@ -0,0 +1,17 @@ + + +# TradesHistoricalResponseRateLimitsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rateLimitType** | **String** | | [optional] | +|**interval** | **String** | | [optional] | +|**intervalNum** | **Long** | | [optional] | +|**limit** | **Long** | | [optional] | +|**count** | **Long** | | [optional] | + + + diff --git a/clients/spot/docs/TradesRecentResponse.md b/clients/spot/docs/TradesRecentResponse.md index b771a2c41..5d145129b 100644 --- a/clients/spot/docs/TradesRecentResponse.md +++ b/clients/spot/docs/TradesRecentResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | [**List<TradesRecentResponseResultInner>**](TradesRecentResponseResultInner.md) | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<TradesHistoricalResponseRateLimitsInner>**](TradesHistoricalResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/UiKlinesResponse.md b/clients/spot/docs/UiKlinesResponse.md index 12212d05d..f908bc950 100644 --- a/clients/spot/docs/UiKlinesResponse.md +++ b/clients/spot/docs/UiKlinesResponse.md @@ -10,7 +10,7 @@ |**id** | **String** | | [optional] | |**status** | **Long** | | [optional] | |**result** | **List<List<KlinesResponseResultInnerInner>>** | | [optional] | -|**rateLimits** | [**List<AccountCommissionResponseRateLimitsInner>**](AccountCommissionResponseRateLimitsInner.md) | | [optional] | +|**rateLimits** | [**List<AvgPriceResponseRateLimitsInner>**](AvgPriceResponseRateLimitsInner.md) | | [optional] | diff --git a/clients/spot/docs/UserDataStreamApi.md b/clients/spot/docs/UserDataStreamApi.md index edc7f5eb6..0a94c01fb 100644 --- a/clients/spot/docs/UserDataStreamApi.md +++ b/clients/spot/docs/UserDataStreamApi.md @@ -5,9 +5,9 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**sessionSubscriptions**](UserDataStreamApi.md#sessionSubscriptions) | **POST** /session.subscriptions | Listing all subscriptions | -| [**userDataStreamSubscribe**](UserDataStreamApi.md#userDataStreamSubscribe) | **POST** /userDataStream.subscribe | Subscribe to User Data Stream | +| [**userDataStreamSubscribe**](UserDataStreamApi.md#userDataStreamSubscribe) | **POST** /userDataStream.subscribe | Subscribe to User Data Stream (USER_STREAM) | | [**userDataStreamSubscribeSignature**](UserDataStreamApi.md#userDataStreamSubscribeSignature) | **POST** /userDataStream.subscribe.signature | Subscribe to User Data Stream through signature subscription (USER_STREAM) | -| [**userDataStreamUnsubscribe**](UserDataStreamApi.md#userDataStreamUnsubscribe) | **POST** /userDataStream.unsubscribe | WebSocket Unsubscribe from User Data Stream | +| [**userDataStreamUnsubscribe**](UserDataStreamApi.md#userDataStreamUnsubscribe) | **POST** /userDataStream.unsubscribe | Unsubscribe from User Data Stream | @@ -72,9 +72,9 @@ No authorization required # **userDataStreamSubscribe** > UserDataStreamSubscribeResponse userDataStreamSubscribe() -Subscribe to User Data Stream +Subscribe to User Data Stream (USER_STREAM) -Subscribe to the User Data Stream in the current WebSocket connection. **Notes:** - This method requires an authenticated WebSocket connection using Ed25519 keys. Please refer to [`session.logon`](/catalog/core-trading-spot-trading/api/ws-api/auth#session-logon). - To check the subscription status, use [`session.status`](/catalog/core-trading-spot-trading/api/ws-api/auth#session-status), see the `userDataStream` flag indicating you have have an active subscription. - User Data Stream events are available in both JSON and [SBE](/products/spot/faqs/sbe_faq) sessions. - Please refer to [User Data Streams](/products/spot/user-data-stream) for the event format details. - For SBE, only SBE schema 2:1 or later is supported. Weight(IP): 2 Security Type: NONE +Subscribe to the User Data Stream in the current WebSocket connection. **Notes:** - This method requires an authenticated WebSocket connection using Ed25519 keys. Please refer to `session.logon`. - To check the subscription status, use `session.status`, see the `userDataStream` flag indicating you have an active subscription. - User Data Stream events are available in both JSON and SBE sessions. - Please refer to User Data Streams for the event format details. - For SBE, only SBE schema 2:1 or later is supported. Weight(IP): 2 Security Type: USER_STREAM ### Example ```java @@ -188,7 +188,7 @@ No authorization required # **userDataStreamUnsubscribe** > UserDataStreamUnsubscribeResponse userDataStreamUnsubscribe(userDataStreamUnsubscribeRequest) -WebSocket Unsubscribe from User Data Stream +Unsubscribe from User Data Stream Stop listening to the User Data Stream in the current WebSocket connection. Note that `session.logout` will only close the subscription created with `userDataStream.subscribe` but not subscriptions opened with `userDataStream.subscribe.signature`. Weight(IP): 2 diff --git a/clients/spot/docs/rest-api/migration-guide.md b/clients/spot/docs/rest-api/migration-guide.md index 60dbfd6f8..2a0cce738 100644 --- a/clients/spot/docs/rest-api/migration-guide.md +++ b/clients/spot/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-spot - 11.0.1 + 11.0.2 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-spot - 11.0.1 + 11.0.2 ``` diff --git a/clients/spot/example_rest.md b/clients/spot/example_rest.md index 0a59a8960..b215d4bcd 100644 --- a/clients/spot/example_rest.md +++ b/clients/spot/example_rest.md @@ -4,13 +4,13 @@ [GET /api/v3/allOrderList](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#all-order-list) - allOrderList - [AllOrderListExample.java:37](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AllOrderListExample.java#L37) -[GET /api/v3/allOrders](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#all-orders) - allOrders - [AllOrdersExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AllOrdersExample.java#L41) +[GET /api/v3/allOrders](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#all-orders) - allOrders - [AllOrdersExample.java:43](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AllOrdersExample.java#L43) [GET /api/v3/account](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-account) - getAccount - [GetAccountExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetAccountExample.java#L36) -[GET /api/v3/openOrders](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-open-orders) - getOpenOrders - [GetOpenOrdersExample.java:38](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOpenOrdersExample.java#L38) +[GET /api/v3/openOrders](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-open-orders) - getOpenOrders - [GetOpenOrdersExample.java:39](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOpenOrdersExample.java#L39) -[GET /api/v3/order](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-order) - getOrder - [GetOrderExample.java:42](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOrderExample.java#L42) +[GET /api/v3/order](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-order) - getOrder - [GetOrderExample.java:43](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOrderExample.java#L43) [GET /api/v3/orderList](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/account#get-order-list) - getOrderList - [GetOrderListExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOrderListExample.java#L36) @@ -34,7 +34,7 @@ [GET /api/v3/executionRules](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/general#execution-rules) - executionRules - [ExecutionRulesExample.java:40](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/ExecutionRulesExample.java#L40) -[GET /api/v3/ping](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/general#ping) - ping - [PingExample.java:33](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/PingExample.java#L33) +[GET /api/v3/ping](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/general#ping) - ping - [PingExample.java:34](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/PingExample.java#L34) [GET /api/v3/time](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/general#time) - time - [TimeExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/TimeExample.java#L36) @@ -48,13 +48,13 @@ [GET /api/v3/trades](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#get-trades) - getTrades - [GetTradesExample.java:35](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/GetTradesExample.java#L35) -[GET /api/v3/historicalBlockTrades](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#historical-block-trades) - historicalBlockTrades - [HistoricalBlockTradesExample.java:35](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/HistoricalBlockTradesExample.java#L35) +[GET /api/v3/historicalBlockTrades](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#historical-block-trades) - historicalBlockTrades - [HistoricalBlockTradesExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/HistoricalBlockTradesExample.java#L36) [GET /api/v3/historicalTrades](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#historical-trades) - historicalTrades - [HistoricalTradesExample.java:35](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/HistoricalTradesExample.java#L35) [GET /api/v3/klines](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#klines) - klines - [KlinesExample.java:48](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/KlinesExample.java#L48) -[GET /api/v3/referencePrice](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#reference-price) - referencePrice - [ReferencePriceExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/ReferencePriceExample.java#L36) +[GET /api/v3/referencePrice](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#reference-price) - referencePrice - [ReferencePriceExample.java:38](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/ReferencePriceExample.java#L38) [GET /api/v3/referencePrice/calculation](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/market#reference-price-calculation) - referencePriceCalculation - [ReferencePriceCalculationExample.java:37](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/ReferencePriceCalculationExample.java#L37) @@ -74,31 +74,31 @@ [DELETE /api/v3/openOrders](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#delete-open-orders) - deleteOpenOrders - [DeleteOpenOrdersExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOpenOrdersExample.java#L36) -[DELETE /api/v3/order](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#delete-order) - deleteOrder - [DeleteOrderExample.java:44](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOrderExample.java#L44) +[DELETE /api/v3/order](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#delete-order) - deleteOrder - [DeleteOrderExample.java:51](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOrderExample.java#L51) [DELETE /api/v3/orderList](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#delete-order-list) - deleteOrderList - [DeleteOrderListExample.java:39](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOrderListExample.java#L39) [POST /api/v3/order](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#new-order) - newOrder - [NewOrderExample.java:85](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/NewOrderExample.java#L85) -[PUT /api/v3/order/amend/keepPriority](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-amend-keep-priority) - orderAmendKeepPriority - [OrderAmendKeepPriorityExample.java:39](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderAmendKeepPriorityExample.java#L39) +[PUT /api/v3/order/amend/keepPriority](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-amend-keep-priority) - orderAmendKeepPriority - [OrderAmendKeepPriorityExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderAmendKeepPriorityExample.java#L41) -[POST /api/v3/order/cancelReplace](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-cancel-replace) - orderCancelReplace - [OrderCancelReplaceExample.java:148](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderCancelReplaceExample.java#L148) +[POST /api/v3/order/cancelReplace](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-cancel-replace) - orderCancelReplace - [OrderCancelReplaceExample.java:149](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderCancelReplaceExample.java#L149) [POST /api/v3/orderList/oco](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-oco) - orderListOco - [OrderListOcoExample.java:53](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOcoExample.java#L53) -[POST /api/v3/orderList/opo](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-opo) - orderListOpo - [OrderListOpoExample.java:43](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpoExample.java#L43) +[POST /api/v3/orderList/opo](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-opo) - orderListOpo - [OrderListOpoExample.java:44](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpoExample.java#L44) -[POST /api/v3/orderList/opoco](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-opoco) - orderListOpoco - [OrderListOpocoExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpocoExample.java#L41) +[POST /api/v3/orderList/opoco](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-opoco) - orderListOpoco - [OrderListOpocoExample.java:42](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpocoExample.java#L42) -[POST /api/v3/orderList/oto](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-oto) - orderListOto - [OrderListOtoExample.java:63](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtoExample.java#L63) +[POST /api/v3/orderList/oto](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-oto) - orderListOto - [OrderListOtoExample.java:65](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtoExample.java#L65) -[POST /api/v3/orderList/otoco](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-otoco) - orderListOtoco - [OrderListOtocoExample.java:66](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtocoExample.java#L66) +[POST /api/v3/orderList/otoco](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-list-otoco) - orderListOtoco - [OrderListOtocoExample.java:68](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtocoExample.java#L68) [POST /api/v3/order/oco](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-oco) - orderOco - [OrderOcoExample.java:42](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderOcoExample.java#L42) [POST /api/v3/order/test](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#order-test) - orderTest - [OrderTestExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderTestExample.java#L41) -[POST /api/v3/sor/order](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#sor-order) - sorOrder - [SorOrderExample.java:43](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/SorOrderExample.java#L43) +[POST /api/v3/sor/order](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#sor-order) - sorOrder - [SorOrderExample.java:42](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/SorOrderExample.java#L42) [POST /api/v3/sor/order/test](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/rest-api/trade#sor-order-test) - sorOrderTest - [SorOrderTestExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/SorOrderTestExample.java#L41) diff --git a/clients/spot/example_websocket_api.md b/clients/spot/example_websocket_api.md index c410a0108..942257371 100644 --- a/clients/spot/example_websocket_api.md +++ b/clients/spot/example_websocket_api.md @@ -12,7 +12,7 @@ [myAllocations](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#my-allocations) - myAllocations - [MyAllocationsExample.java:47](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyAllocationsExample.java#L47) -[myFilters](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#my-filters) - myFilters - [MyFiltersExample.java:39](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyFiltersExample.java#L39) +[myFilters](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#my-filters) - myFilters - [MyFiltersExample.java:38](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyFiltersExample.java#L38) [myPreventedMatches](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#my-prevented-matches) - myPreventedMatches - [MyPreventedMatchesExample.java:43](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyPreventedMatchesExample.java#L43) @@ -20,13 +20,13 @@ [openOrderLists.status](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#open-order-lists-status) - openOrderListsStatus - [OpenOrderListsStatusExample.java:40](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OpenOrderListsStatusExample.java#L40) -[openOrders.status](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#open-orders-status) - openOrdersStatus - [OpenOrdersStatusExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OpenOrdersStatusExample.java#L41) +[openOrders.status](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#open-orders-status) - openOrdersStatus - [OpenOrdersStatusExample.java:43](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OpenOrdersStatusExample.java#L43) [order.amendments](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#order-amendments) - orderAmendments - [OrderAmendmentsExample.java:37](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderAmendmentsExample.java#L37) [orderList.status](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#order-list-status) - orderListStatus - [OrderListStatusExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderListStatusExample.java#L41) -[order.status](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#order-status) - orderStatus - [OrderStatusExample.java:42](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderStatusExample.java#L42) +[order.status](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/account#order-status) - orderStatus - [OrderStatusExample.java:43](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderStatusExample.java#L43) ## Auth @@ -52,11 +52,11 @@ [blockTrades.historical](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#block-trades-historical) - blockTradesHistorical - [BlockTradesHistoricalExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/BlockTradesHistoricalExample.java#L36) -[depth](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#depth) - depth - [DepthExample.java:43](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/DepthExample.java#L43) +[depth](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#depth) - depth - [DepthExample.java:42](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/DepthExample.java#L42) [klines](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#klines) - klines - [KlinesExample.java:52](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/KlinesExample.java#L52) -[referencePrice](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#reference-price) - referencePrice - [ReferencePriceExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/ReferencePriceExample.java#L36) +[referencePrice](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#reference-price) - referencePrice - [ReferencePriceExample.java:39](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/ReferencePriceExample.java#L39) [referencePrice.calculation](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#reference-price-calculation) - referencePriceCalculation - [ReferencePriceCalculationExample.java:37](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/ReferencePriceCalculationExample.java#L37) @@ -70,7 +70,7 @@ [ticker.tradingDay](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#ticker-trading-day) - tickerTradingDay - [TickerTradingDayExample.java:40](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TickerTradingDayExample.java#L40) -[trades.aggregate](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#trades-aggregate) - tradesAggregate - [TradesAggregateExample.java:49](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesAggregateExample.java#L49) +[trades.aggregate](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#trades-aggregate) - tradesAggregate - [TradesAggregateExample.java:47](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesAggregateExample.java#L47) [trades.historical](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/market#trades-historical) - tradesHistorical - [TradesHistoricalExample.java:37](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesHistoricalExample.java#L37) @@ -80,11 +80,11 @@ ## Trade -[openOrders.cancelAll](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#open-orders-cancel-all) - openOrdersCancelAll - [OpenOrdersCancelAllExample.java:37](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OpenOrdersCancelAllExample.java#L37) +[openOrders.cancelAll](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#open-orders-cancel-all) - openOrdersCancelAll - [OpenOrdersCancelAllExample.java:39](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OpenOrdersCancelAllExample.java#L39) -[order.amend.keepPriority](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-amend-keep-priority) - orderAmendKeepPriority - [OrderAmendKeepPriorityExample.java:40](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderAmendKeepPriorityExample.java#L40) +[order.amend.keepPriority](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-amend-keep-priority) - orderAmendKeepPriority - [OrderAmendKeepPriorityExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderAmendKeepPriorityExample.java#L41) -[order.cancel](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-cancel) - orderCancel - [OrderCancelExample.java:45](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelExample.java#L45) +[order.cancel](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-cancel) - orderCancel - [OrderCancelExample.java:53](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelExample.java#L53) [order.cancelReplace](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-cancel-replace) - orderCancelReplace - [OrderCancelReplaceExample.java:166](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelReplaceExample.java#L166) @@ -94,19 +94,19 @@ [orderList.place.oco](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-place-oco) - orderListPlaceOco - [OrderListPlaceOcoExample.java:52](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOcoExample.java#L52) -[orderList.place.opo](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-place-opo) - orderListPlaceOpo - [OrderListPlaceOpoExample.java:42](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpoExample.java#L42) +[orderList.place.opo](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-place-opo) - orderListPlaceOpo - [OrderListPlaceOpoExample.java:43](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpoExample.java#L43) -[orderList.place.opoco](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-place-opoco) - orderListPlaceOpoco - [OrderListPlaceOpocoExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpocoExample.java#L41) +[orderList.place.opoco](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-place-opoco) - orderListPlaceOpoco - [OrderListPlaceOpocoExample.java:42](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpocoExample.java#L42) -[orderList.place.oto](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-place-oto) - orderListPlaceOto - [OrderListPlaceOtoExample.java:63](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtoExample.java#L63) +[orderList.place.oto](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-place-oto) - orderListPlaceOto - [OrderListPlaceOtoExample.java:65](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtoExample.java#L65) [orderList.place.otoco](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-list-place-otoco) - orderListPlaceOtoco - [OrderListPlaceOtocoExample.java:67](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtocoExample.java#L67) -[order.place](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-place) - orderPlace - [OrderPlaceExample.java:144](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderPlaceExample.java#L144) +[order.place](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-place) - orderPlace - [OrderPlaceExample.java:141](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderPlaceExample.java#L141) [order.test](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#order-test) - orderTest - [OrderTestExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderTestExample.java#L41) -[sor.order.place](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#sor-order-place) - sorOrderPlace - [SorOrderPlaceExample.java:43](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/SorOrderPlaceExample.java#L43) +[sor.order.place](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#sor-order-place) - sorOrderPlace - [SorOrderPlaceExample.java:42](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/SorOrderPlaceExample.java#L42) [sor.order.test](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/trade#sor-order-test) - sorOrderTest - [SorOrderTestExample.java:41](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/SorOrderTestExample.java#L41) @@ -114,7 +114,7 @@ [session.subscriptions](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/user-data-stream#session-subscriptions) - sessionSubscriptions - [SessionSubscriptionsExample.java:36](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/SessionSubscriptionsExample.java#L36) -[userDataStream.subscribe](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/user-data-stream#user-data-stream-subscribe) - userDataStreamSubscribe - [UserDataStreamSubscribeExample.java:46](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamSubscribeExample.java#L46) +[userDataStream.subscribe](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/user-data-stream#user-data-stream-subscribe) - userDataStreamSubscribe - [UserDataStreamSubscribeExample.java:43](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamSubscribeExample.java#L43) [userDataStream.subscribe.signature](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/user-data-stream#user-data-stream-subscribe-signature) - userDataStreamSubscribeSignature - [UserDataStreamSubscribeSignatureExample.java:37](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamSubscribeSignatureExample.java#L37) diff --git a/clients/spot/example_websocket_stream.md b/clients/spot/example_websocket_stream.md index 28e93e54f..4a3c089a7 100644 --- a/clients/spot/example_websocket_stream.md +++ b/clients/spot/example_websocket_stream.md @@ -16,7 +16,7 @@ [@kline_](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#kline) - kline - [KlineExample.java:33](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/KlineExample.java#L33) -[@kline_@+08:00](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#kline-offset) - klineOffset - [KlineOffsetExample.java:37](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/KlineOffsetExample.java#L37) +[@kline_@+08:00](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#kline-offset) - klineOffset - [KlineOffsetExample.java:38](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/KlineOffsetExample.java#L38) [@miniTicker](https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#mini-ticker) - miniTicker - [MiniTickerExample.java:32](/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/MiniTickerExample.java#L32) diff --git a/clients/spot/pom.xml b/clients/spot/pom.xml index 16bd81a77..661d72636 100644 --- a/clients/spot/pom.xml +++ b/clients/spot/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-spot spot - 11.0.1 + 11.0.2 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/JSON.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/JSON.java index b57f83b82..bf90f44cf 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/JSON.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/JSON.java @@ -776,6 +776,12 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.rest.model.ReferencePriceResponse .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.rest.model.ReferencePriceResponse1 + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.rest.model.ReferencePriceResponse2 + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.rest.model.SorOrderRequest .CustomTypeAdapterFactory()); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/AccountApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/AccountApi.java index 3bf0132ee..3f1132fe8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/AccountApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/AccountApi.java @@ -56,7 +56,7 @@ public class AccountApi { private static final String USER_AGENT = String.format( - "binance-spot/11.0.1 (Java/%s; %s; %s)", + "binance-spot/11.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = true; @@ -572,7 +572,9 @@ private okhttp3.Call allOrdersValidateBeforeCall( * returned. - For some historical orders `cummulativeQuoteQty` will be < 0, * meaning the data is not available at this time. - If `startTime` and/or * `endTime` provided, `orderId` is not required. - The time between - * `startTime` and `endTime` can't be longer than 24 hours. + * `startTime` and `endTime` can't be longer than 24 hours. Response + * Notes: **Note:** The payload above does not show all fields that can appear. Please refer to + * Conditional fields in Order Responses. * * @param symbol (required) * @param orderId (optional) @@ -877,7 +879,9 @@ private okhttp3.Call getOpenOrdersValidateBeforeCall(String symbol, Double recvW * Current open orders (USER_DATA) Get all open orders on a symbol. **Careful** when accessing * this with no symbol. Weight: 6 for a single symbol; 80 when the symbol parameter is omitted * Security Type: USER_DATA Notes: **Data Source:** Memory => Database - If the symbol - * is not sent, orders for all symbols will be returned in an array. + * is not sent, orders for all symbols will be returned in an array. Response Notes: **Note:** + * The payload above does not show all fields that can appear. Please refer to Conditional + * fields in Order Responses. * * @param symbol (optional) * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that @@ -1048,7 +1052,8 @@ private okhttp3.Call getOrderValidateBeforeCall( * the `origClientOrderId` from that result is checked against that order. If both * conditions are not met the request will be rejected. - For some historical orders * `cummulativeQuoteQty` will be < 0, meaning the data is not available at this - * time. + * time. Response Notes: **Note:** The payload above does not show all fields that can appear. + * Please refer to Conditional fields in Order Responses. * * @param symbol (required) * @param orderId (optional) diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/GeneralApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/GeneralApi.java index f95a82cba..d2ada4563 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/GeneralApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/GeneralApi.java @@ -48,7 +48,7 @@ public class GeneralApi { private static final String USER_AGENT = String.format( - "binance-spot/11.0.1 (Java/%s; %s; %s)", + "binance-spot/11.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = true; @@ -576,7 +576,8 @@ private okhttp3.Call pingValidateBeforeCall() throws ApiException { } /** - * Test connectivity Test connectivity to the Rest API. Weight(IP): 1 Security Type: NONE + * Test connectivity Test connectivity to the Rest API. Weight(IP): 1 Security Type: NONE Notes: + * **Data Source:** Memory * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -699,7 +700,7 @@ private okhttp3.Call timeValidateBeforeCall() throws ApiException { /** * Check server time Test connectivity to the Rest API and get the current server time. - * Weight(IP): 1 Security Type: NONE + * Weight(IP): 1 Security Type: NONE Notes: **Data Source:** Memory * * @return ApiResponse<TimeResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/MarketApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/MarketApi.java index 2963ae397..d88a3cf02 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/MarketApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/MarketApi.java @@ -62,7 +62,7 @@ public class MarketApi { private static final String USER_AGENT = String.format( - "binance-spot/11.0.1 (Java/%s; %s; %s)", + "binance-spot/11.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = true; @@ -817,7 +817,7 @@ private okhttp3.Call historicalBlockTradesValidateBeforeCall( /** * Historical Block Trades (MARKET_DATA) Get block trades. Weight(IP): 25 Security Type: - * MARKET_DATA Notes: - Data Source: Database + * MARKET_DATA Notes: **Data Source:** Database * * @param symbol (required) * @param fromId Block trade ID to fetch from (required) @@ -1303,7 +1303,10 @@ private okhttp3.Call referencePriceValidateBeforeCall(String symbol) throws ApiE /** * Query Reference Price Query the reference price for a symbol. Weight(IP): 2 Security Type: - * NONE Notes: **Data Source:** Memory + * NONE Notes: **Data Source:** Memory If the symbol has never had a reference price set, the + * request is rejected with: ```json { \"code\": -2043, + * \"msg\": \"This symbol doesn't have a reference price.\" } + * ``` * * @param symbol (required) * @return ApiResponse<ReferencePriceResponse> diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/SpotRestApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/SpotRestApi.java index 5ae4e6418..4a4d35ede 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/SpotRestApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/SpotRestApi.java @@ -153,7 +153,9 @@ public ApiResponse allOrderList( * returned. - For some historical orders `cummulativeQuoteQty` will be < 0, * meaning the data is not available at this time. - If `startTime` and/or * `endTime` provided, `orderId` is not required. - The time between - * `startTime` and `endTime` can't be longer than 24 hours. + * `startTime` and `endTime` can't be longer than 24 hours. Response + * Notes: **Note:** The payload above does not show all fields that can appear. Please refer to + * Conditional fields in Order Responses. * * @param symbol (required) * @param orderId (optional) @@ -219,7 +221,9 @@ public ApiResponse getAccount(Boolean omitZeroBalances, Doub * Current open orders (USER_DATA) Get all open orders on a symbol. **Careful** when accessing * this with no symbol. Weight: 6 for a single symbol; 80 when the symbol parameter is omitted * Security Type: USER_DATA Notes: **Data Source:** Memory => Database - If the symbol - * is not sent, orders for all symbols will be returned in an array. + * is not sent, orders for all symbols will be returned in an array. Response Notes: **Note:** + * The payload above does not show all fields that can appear. Please refer to Conditional + * fields in Order Responses. * * @param symbol (optional) * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that @@ -251,7 +255,8 @@ public ApiResponse getOpenOrders(String symbol, Double re * the `origClientOrderId` from that result is checked against that order. If both * conditions are not met the request will be rejected. - For some historical orders * `cummulativeQuoteQty` will be < 0, meaning the data is not available at this - * time. + * time. Response Notes: **Note:** The payload above does not show all fields that can appear. + * Please refer to Conditional fields in Order Responses. * * @param symbol (required) * @param orderId (optional) @@ -645,7 +650,8 @@ public ApiResponse executionRules( } /** - * Test connectivity Test connectivity to the Rest API. Weight(IP): 1 Security Type: NONE + * Test connectivity Test connectivity to the Rest API. Weight(IP): 1 Security Type: NONE Notes: + * **Data Source:** Memory * * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -667,7 +673,7 @@ public void ping() throws ApiException { /** * Check server time Test connectivity to the Rest API and get the current server time. - * Weight(IP): 1 Security Type: NONE + * Weight(IP): 1 Security Type: NONE Notes: **Data Source:** Memory * * @return ApiResponse<TimeResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -796,7 +802,7 @@ public ApiResponse getTrades(String symbol, Integer limit) /** * Historical Block Trades (MARKET_DATA) Get block trades. Weight(IP): 25 Security Type: - * MARKET_DATA Notes: - Data Source: Database + * MARKET_DATA Notes: **Data Source:** Database * * @param symbol (required) * @param fromId Block trade ID to fetch from (required) @@ -895,7 +901,10 @@ public ApiResponse klines( /** * Query Reference Price Query the reference price for a symbol. Weight(IP): 2 Security Type: - * NONE Notes: **Data Source:** Memory + * NONE Notes: **Data Source:** Memory If the symbol has never had a reference price set, the + * request is rejected with: ```json { \"code\": -2043, + * \"msg\": \"This symbol doesn't have a reference price.\" } + * ``` * * @param symbol (required) * @return ApiResponse<ReferencePriceResponse> @@ -1217,10 +1226,17 @@ public ApiResponse deleteOpenOrders(String symbol, Dou * be sent. - If both `orderId` and `origClientOrderId` are provided, the * `orderId` is searched first, then the `origClientOrderId` from that * result is checked against that order. If both conditions are not met the request will be - * rejected. - The performance for canceling an order (single cancel or as part of a - * cancel-replace) is always better when only `orderId` is sent. Sending - * `origClientOrderId` or both `orderId` + `origClientOrderId` - * will be slower. + * rejected. Response Notes: **Notes:** - The payload above does not show all fields that can + * appear in the order response. Please refer to Conditional fields in Order Responses. - The + * performance for canceling an order (single cancel or as part of a cancel-replace) is always + * better when only `orderId` is sent. Sending `origClientOrderId` or both + * `orderId` + `origClientOrderId` will be slower. **Regarding + * `cancelRestrictions`** * If the `cancelRestrictions` value is not any of + * the supported values, the error will be: ```json { \"code\": -1145, + * \"msg\": \"Invalid cancelRestrictions\" } ``` * If the + * order did not pass the conditions for `cancelRestrictions`, the error will be: + * ```json { \"code\": -2011, \"msg\": \"Order was not + * canceled due to cancel restrictions.\" } ``` * * @param symbol (required) * @param orderId (optional) @@ -1230,7 +1246,8 @@ public ApiResponse deleteOpenOrders(String symbol, Dou * @param cancelRestrictions Supported values: <br>`ONLY_NEW` - Cancel will * succeed if the order status is `NEW`.<br> * `ONLY_PARTIALLY_FILLED` - Cancel will succeed if order status is - * `PARTIALLY_FILLED`. (optional) + * `PARTIALLY_FILLED`. For more information please refer to Regarding + * `cancelRestrictions`. (optional) * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that * microseconds may be specified. (optional) * @return ApiResponse<DeleteOrderResponse> @@ -1380,7 +1397,9 @@ public ApiResponse newOrder(NewOrderRequest newOrderRequest) * Order Amend Keep Priority (TRADE) Reduce the quantity of an existing open order. This adds 0 * orders to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` * filter. Read Order Amend Keep Priority FAQ to learn more. Weight(IP): 4 Unfilled Order Count: - * 0 Security Type: TRADE Notes: **Data Source:** Matching Engine + * 0 Security Type: TRADE Notes: **Data Source:** Matching Engine Response Notes: **Note:** The + * payload above does not show all fields that can appear. Please refer to Conditional fields in + * Order Responses. * * @param orderAmendKeepPriorityRequest (required) * @return ApiResponse<OrderAmendKeepPriorityResponse> @@ -1510,10 +1529,11 @@ public ApiResponse orderAmendKeepPriority( * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ * <code>FAILURE</code></td> <td * align=right><code>409</code></td> </tr> </tbody> - * </table> **Notes:** - The performance for canceling an order (single cancel or as part - * of a cancel-replace) is always better when only `orderId` is sent. Sending - * `origClientOrderId` or both `orderId` + `origClientOrderId` - * will be slower. + * </table> Response Notes: **Notes:** - The payload above does not show all fields that + * can appear. Please refer to Conditional fields in Order Responses. - The performance for + * canceling an order (single cancel or as part of a cancel-replace) is always better when only + * `orderId` is sent. Sending `origClientOrderId` or both + * `orderId` + `origClientOrderId` will be slower. * * @param orderCancelReplaceRequest (required) * @return ApiResponse<OrderCancelReplaceResponse> @@ -1523,7 +1543,7 @@ public ApiResponse orderAmendKeepPriority( * * * - * + * *
Response Details
Status Code Description Response Headers
200 Both cancel and new order succeed -
200 Cancel an existing order and send a new order -
* * @see orderListOco(OrderListOcoRequest orderL } /** - * New Order List - OPO (TRADE) Place an [OPO](/products/spot/faqs/opo). - OPOs add 2 orders to - * the `EXCHANGE_MAX_NUM_ORDERS`` filter and `MAX_NUM_ORDERS`` - * filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** - * Matching Engine + * New Order List - OPO (TRADE) Place an OPO. - OPOs add 2 orders to the + * `EXCHANGE_MAX_NUM_ORDERS`` filter and `MAX_NUM_ORDERS`` filter. + * Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** Matching + * Engine Response Notes: **Note:** The payload above does not show all fields that can appear. + * Please refer to Conditional fields in Order Responses. * * @param orderListOpoRequest (required) * @return ApiResponse<OrderListOpoResponse> @@ -1600,8 +1621,10 @@ public ApiResponse orderListOpo(OrderListOpoRequest orderL } /** - * New Order List - OPOCO (TRADE) Place an [OPOCO](/products/spot/faqs/opo). Weight(IP): 1 - * Unfilled Order Count: 3 Security Type: TRADE Notes: **Data Source:** Matching Engine + * New Order List - OPOCO (TRADE) Place an OPOCO. Weight(IP): 1 Unfilled Order Count: 3 Security + * Type: TRADE Notes: **Data Source:** Matching Engine Response Notes: **Note:** The payload + * above does not show all fields that can appear. Please refer to Conditional fields in Order + * Responses. * * @param orderListOpocoRequest (required) * @return ApiResponse<OrderListOpocoResponse> @@ -1647,7 +1670,9 @@ public ApiResponse orderListOpoco( * |`pendingStopPrice` and/or `pendingTrailingDelta`| * |`pendingType` = `STOP_LOSS_LIMIT` or * `TAKE_PROFIT_LIMIT`|`pendingPrice`, `pendingStopPrice` and/or - * `pendingTrailingDelta`, `pendingTimeInForce`| + * `pendingTrailingDelta`, `pendingTimeInForce`| Response Notes: **Note:** + * The payload above does not show all fields that can appear. Please refer to Conditional + * fields in Order Responses. * * @param orderListOtoRequest (required) * @return ApiResponse<OrderListOtoResponse> @@ -1674,21 +1699,21 @@ public ApiResponse orderListOto(OrderListOtoRequest orderL * (One-Triggers-One-Cancels-the-Other) is an order list comprised of 3 orders. - The first * order is called the **working order** and must be `LIMIT` or * `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The - * behavior of the working order is the same as the [OTO](#order-list-oto). - OTOCO has 2 - * pending orders (pending above and pending below), forming an OCO pair. The pending orders are - * only placed on the order book when the working order gets **fully filled**. - The rules of - * the pending above and pending below follow the same rules as the [Order list - * OCO](#order-list-oco). - OTOCOs add **3 orders** to the `EXCHANGE_MAX_NUM_ORDERS` - * filter and `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 3 Security - * Type: TRADE Notes: **Data Source:** Matching Engine **Mandatory parameters based on - * `pendingAboveType`, `pendingBelowType` or `workingType`** - * Depending on the `pendingAboveType`/`pendingBelowType` or - * `workingType`, some optional parameters will become mandatory. |Type |Additional - * mandatory parameters|Additional information| |---- |---- |------ |`workingType` - * = `LIMIT` |`workingTimeInForce` | - * |`pendingAboveType`= `LIMIT_MAKER` |`pendingAbovePrice` | - * |`pendingAboveType` = `STOP_LOSS/TAKE_PROFIT` - * |`pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`| + * behavior of the working order is the same as the OTO. - OTOCO has 2 pending orders (pending + * above and pending below), forming an OCO pair. The pending orders are only placed on the + * order book when the working order gets **fully filled**. - The rules of the pending above and + * pending below follow the same rules as the Order list OCO. - OTOCOs add **3 orders** to the + * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight(IP): + * 1 Unfilled Order Count: 3 Security Type: TRADE Notes: **Data Source:** Matching Engine + * **Mandatory parameters based on `pendingAboveType`, `pendingBelowType` or + * `workingType`** Depending on the + * `pendingAboveType`/`pendingBelowType` or `workingType`, some + * optional parameters will become mandatory. |Type |Additional mandatory parameters|Additional + * information| |---- |---- |------ |`workingType` = `LIMIT` + * |`workingTimeInForce` | |`pendingAboveType`= `LIMIT_MAKER` + * |`pendingAbovePrice` | |`pendingAboveType` = + * `STOP_LOSS/TAKE_PROFIT` |`pendingAboveStopPrice` and/or + * `pendingAboveTrailingDelta`| * |`pendingAboveType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT` * |`pendingAbovePrice`, `pendingAboveStopPrice` and/or * `pendingAboveTrailingDelta`, `pendingAboveTimeInForce`| @@ -1697,7 +1722,9 @@ public ApiResponse orderListOto(OrderListOtoRequest orderL * and/or `pendingBelowTrailingDelta`| * |`pendingBelowType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT` * |`pendingBelowPrice`, `pendingBelowStopPrice` and/or - * `pendingBelowTrailingDelta`, `pendingBelowTimeInForce`| + * `pendingBelowTrailingDelta`, `pendingBelowTimeInForce`| Response Notes: + * **Note:** The payload above does not show all fields that can appear. Please refer to + * Conditional fields in Order Responses. * * @param orderListOtocoRequest (required) * @return ApiResponse<OrderListOtocoResponse> @@ -1778,10 +1805,10 @@ public ApiResponse orderTest(OrderTestRequest orderTestReques /** * New order using SOR (TRADE) Places an order using smart order routing (SOR). This adds 1 * order to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` - * filter. Read [SOR FAQ](/products/spot/faqs/sor_faq) to learn more. Weight(IP): 1 Unfilled - * Order Count: 1 Security Type: TRADE Notes: **Data Source:** Matching Engine **Note:** - * `POST /api/v3/sor/order` only supports `LIMIT` and `MARKET` - * orders. `quoteOrderQty` is not supported. + * filter. Read SOR FAQ to learn more. Weight(IP): 1 Unfilled Order Count: 1 Security Type: + * TRADE Notes: **Data Source:** Matching Engine **Note:** `POST /api/v3/sor/order` + * only supports `LIMIT` and `MARKET` orders. `quoteOrderQty` is + * not supported. * * @param sorOrderRequest (required) * @return ApiResponse<SorOrderResponse> diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/TradeApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/TradeApi.java index 1784f5b2b..2516b7500 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/TradeApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/api/TradeApi.java @@ -71,7 +71,7 @@ public class TradeApi { private static final String USER_AGENT = String.format( - "binance-spot/11.0.1 (Java/%s; %s; %s)", + "binance-spot/11.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = true; @@ -266,7 +266,8 @@ public ApiResponse deleteOpenOrders( * @param cancelRestrictions Supported values: <br>`ONLY_NEW` - Cancel will * succeed if the order status is `NEW`.<br> * `ONLY_PARTIALLY_FILLED` - Cancel will succeed if order status is - * `PARTIALLY_FILLED`. (optional) + * `PARTIALLY_FILLED`. For more information please refer to Regarding + * `cancelRestrictions`. (optional) * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that * microseconds may be specified. (optional) * @return Call to execute @@ -433,10 +434,17 @@ private okhttp3.Call deleteOrderValidateBeforeCall( * be sent. - If both `orderId` and `origClientOrderId` are provided, the * `orderId` is searched first, then the `origClientOrderId` from that * result is checked against that order. If both conditions are not met the request will be - * rejected. - The performance for canceling an order (single cancel or as part of a - * cancel-replace) is always better when only `orderId` is sent. Sending - * `origClientOrderId` or both `orderId` + `origClientOrderId` - * will be slower. + * rejected. Response Notes: **Notes:** - The payload above does not show all fields that can + * appear in the order response. Please refer to Conditional fields in Order Responses. - The + * performance for canceling an order (single cancel or as part of a cancel-replace) is always + * better when only `orderId` is sent. Sending `origClientOrderId` or both + * `orderId` + `origClientOrderId` will be slower. **Regarding + * `cancelRestrictions`** * If the `cancelRestrictions` value is not any of + * the supported values, the error will be: ```json { \"code\": -1145, + * \"msg\": \"Invalid cancelRestrictions\" } ``` * If the + * order did not pass the conditions for `cancelRestrictions`, the error will be: + * ```json { \"code\": -2011, \"msg\": \"Order was not + * canceled due to cancel restrictions.\" } ``` * * @param symbol (required) * @param orderId (optional) @@ -446,7 +454,8 @@ private okhttp3.Call deleteOrderValidateBeforeCall( * @param cancelRestrictions Supported values: <br>`ONLY_NEW` - Cancel will * succeed if the order status is `NEW`.<br> * `ONLY_PARTIALLY_FILLED` - Cancel will succeed if order status is - * `PARTIALLY_FILLED`. (optional) + * `PARTIALLY_FILLED`. For more information please refer to Regarding + * `cancelRestrictions`. (optional) * @param recvWindow Supports up to three decimal places of precision (e.g., 6000.346) so that * microseconds may be specified. (optional) * @return ApiResponse<DeleteOrderResponse> @@ -1094,7 +1103,9 @@ private okhttp3.Call orderAmendKeepPriorityValidateBeforeCall( * Order Amend Keep Priority (TRADE) Reduce the quantity of an existing open order. This adds 0 * orders to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` * filter. Read Order Amend Keep Priority FAQ to learn more. Weight(IP): 4 Unfilled Order Count: - * 0 Security Type: TRADE Notes: **Data Source:** Matching Engine + * 0 Security Type: TRADE Notes: **Data Source:** Matching Engine Response Notes: **Note:** The + * payload above does not show all fields that can appear. Please refer to Conditional fields in + * Order Responses. * * @param orderAmendKeepPriorityRequest (required) * @return ApiResponse<OrderAmendKeepPriorityResponse> @@ -1131,7 +1142,7 @@ public ApiResponse orderAmendKeepPriority( * * * - * + * *
Response Details
Status Code Description Response Headers
200 Both cancel and new order succeed -
200 Cancel an existing order and send a new order -
* * @see
* Response Details * Status Code Description Response Headers - * 200 Both cancel and new order succeed - + * 200 Cancel an existing order and send a new order - * * * @see TypeAdapter create(Gson gson, TypeToken type) { + if (!ReferencePriceResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReferencePriceResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterReferencePriceResponse1 = + gson.getDelegateAdapter(this, TypeToken.get(ReferencePriceResponse1.class)); + final TypeAdapter adapterReferencePriceResponse2 = + gson.getDelegateAdapter(this, TypeToken.get(ReferencePriceResponse2.class)); - public ReferencePriceResponse() {} + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ReferencePriceResponse value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `ReferencePriceResponse1` + if (value.getActualInstance() instanceof ReferencePriceResponse1) { + JsonElement element = + adapterReferencePriceResponse1.toJsonTree( + (ReferencePriceResponse1) + value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `ReferencePriceResponse2` + if (value.getActualInstance() instanceof ReferencePriceResponse2) { + JsonElement element = + adapterReferencePriceResponse2.toJsonTree( + (ReferencePriceResponse2) + value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas:" + + " ReferencePriceResponse1, ReferencePriceResponse2"); + } - public ReferencePriceResponse symbol(@jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - return this; - } + @Override + public ReferencePriceResponse read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); - /** - * Get symbol - * - * @return symbol - */ - @jakarta.annotation.Nullable - public String getSymbol() { - return symbol; + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize ReferencePriceResponse1 + try { + // validate the JSON object to see if any exception is thrown + ReferencePriceResponse1.validateJsonElement(jsonElement); + actualAdapter = adapterReferencePriceResponse1; + match++; + log.log( + Level.FINER, + "Input data matches schema 'ReferencePriceResponse1'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for ReferencePriceResponse1 failed" + + " with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema" + + " 'ReferencePriceResponse1'", + e); + } + // deserialize ReferencePriceResponse2 + try { + // validate the JSON object to see if any exception is thrown + ReferencePriceResponse2.validateJsonElement(jsonElement); + actualAdapter = adapterReferencePriceResponse2; + match++; + log.log( + Level.FINER, + "Input data matches schema 'ReferencePriceResponse2'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for ReferencePriceResponse2 failed" + + " with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema" + + " 'ReferencePriceResponse2'", + e); + } + + if (match == 1) { + ReferencePriceResponse ret = new ReferencePriceResponse(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + "Failed deserialization for ReferencePriceResponse: %d" + + " classes match result, expected 1. Detailed" + + " failure message for oneOf schemas: %s. JSON:" + + " %s", + match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } } - public void setSymbol(@jakarta.annotation.Nullable String symbol) { - this.symbol = symbol; - } + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); - public ReferencePriceResponse referencePrice( - @jakarta.annotation.Nullable String referencePrice) { - this.referencePrice = referencePrice; - return this; + public ReferencePriceResponse() { + super("oneOf", Boolean.FALSE); } - /** - * Reference price. Can be `null` if no reference price is set. - * - * @return referencePrice - */ - @jakarta.annotation.Nullable - public String getReferencePrice() { - return referencePrice; + public ReferencePriceResponse(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - public void setReferencePrice(@jakarta.annotation.Nullable String referencePrice) { - this.referencePrice = referencePrice; + static { + schemas.put("ReferencePriceResponse1", ReferencePriceResponse1.class); + schemas.put("ReferencePriceResponse2", ReferencePriceResponse2.class); } - public ReferencePriceResponse timestamp(@jakarta.annotation.Nullable Long timestamp) { - this.timestamp = timestamp; - return this; + @Override + public Map> getSchemas() { + return ReferencePriceResponse.schemas; } /** - * Timestamp when reference price was valid. + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: ReferencePriceResponse1, ReferencePriceResponse2 * - * @return timestamp + *

It could be an instance of the 'oneOf' schemas. */ - @jakarta.annotation.Nullable - public Long getTimestamp() { - return timestamp; - } - - public void setTimestamp(@jakarta.annotation.Nullable Long timestamp) { - this.timestamp = timestamp; - } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + public void setActualInstance(Object instance) { + if (instance instanceof ReferencePriceResponse1) { + super.setActualInstance(instance); + return; } - if (o == null || getClass() != o.getClass()) { - return false; + + if (instance instanceof ReferencePriceResponse2) { + super.setActualInstance(instance); + return; } - ReferencePriceResponse referencePriceResponse = (ReferencePriceResponse) o; - return Objects.equals(this.symbol, referencePriceResponse.symbol) - && Objects.equals(this.referencePrice, referencePriceResponse.referencePrice) - && Objects.equals(this.timestamp, referencePriceResponse.timestamp); - } - @Override - public int hashCode() { - return Objects.hash(symbol, referencePrice, timestamp); + throw new RuntimeException( + "Invalid instance type. Must be ReferencePriceResponse1, ReferencePriceResponse2"); } + /** + * Get the actual instance, which can be the following: ReferencePriceResponse1, + * ReferencePriceResponse2 + * + * @return The actual instance (ReferencePriceResponse1, ReferencePriceResponse2) + */ + @SuppressWarnings("unchecked") @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReferencePriceResponse {\n"); - sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); - sb.append(" referencePrice: ").append(toIndentedString(referencePrice)).append("\n"); - sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - - Object symbolValue = getSymbol(); - String symbolValueAsString = ""; - symbolValueAsString = symbolValue.toString(); - sb.append("symbol=").append(urlEncode(symbolValueAsString)).append(""); - Object referencePriceValue = getReferencePrice(); - String referencePriceValueAsString = ""; - referencePriceValueAsString = referencePriceValue.toString(); - sb.append("referencePrice=").append(urlEncode(referencePriceValueAsString)).append(""); - Object timestampValue = getTimestamp(); - String timestampValueAsString = ""; - timestampValueAsString = timestampValue.toString(); - sb.append("timestamp=").append(urlEncode(timestampValueAsString)).append(""); - return sb.toString(); - } - - public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); - } + public Object getActualInstance() { + return super.getActualInstance(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). + * Get the actual instance of `ReferencePriceResponse1`. If the actual instance is not + * `ReferencePriceResponse1`, the ClassCastException will be thrown. + * + * @return The actual instance of `ReferencePriceResponse1` + * @throws ClassCastException if the instance is not `ReferencePriceResponse1` */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + public ReferencePriceResponse1 getReferencePriceResponse1() throws ClassCastException { + return (ReferencePriceResponse1) super.getActualInstance(); } - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("symbol"); - openapiFields.add("referencePrice"); - openapiFields.add("timestamp"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + /** + * Get the actual instance of `ReferencePriceResponse2`. If the actual instance is not + * `ReferencePriceResponse2`, the ClassCastException will be thrown. + * + * @return The actual instance of `ReferencePriceResponse2` + * @throws ClassCastException if the instance is not `ReferencePriceResponse2` + */ + public ReferencePriceResponse2 getReferencePriceResponse2() throws ClassCastException { + return (ReferencePriceResponse2) super.getActualInstance(); } /** @@ -202,62 +239,39 @@ private String toIndentedString(Object o) { * @throws IOException if the JSON Element is invalid with respect to ReferencePriceResponse */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReferencePriceResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReferencePriceResponse is not found in" - + " the empty JSON string", - ReferencePriceResponse.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) - && !jsonObj.get("symbol").isJsonPrimitive()) { - throw new IllegalArgumentException( + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with ReferencePriceResponse1 + try { + ReferencePriceResponse1.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( String.format( - "Expected the field `symbol` to be a primitive type in the JSON string" - + " but got `%s`", - jsonObj.get("symbol").toString())); + "Deserialization for ReferencePriceResponse1 failed with `%s`.", + e.getMessage())); + // continue to the next one } - if ((jsonObj.get("referencePrice") != null && !jsonObj.get("referencePrice").isJsonNull()) - && !jsonObj.get("referencePrice").isJsonPrimitive()) { - throw new IllegalArgumentException( + // validate the json string with ReferencePriceResponse2 + try { + ReferencePriceResponse2.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( String.format( - "Expected the field `referencePrice` to be a primitive type in the JSON" - + " string but got `%s`", - jsonObj.get("referencePrice").toString())); + "Deserialization for ReferencePriceResponse2 failed with `%s`.", + e.getMessage())); + // continue to the next one } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReferencePriceResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReferencePriceResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReferencePriceResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReferencePriceResponse value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReferencePriceResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); + if (validCount != 1) { + throw new IOException( + String.format( + "The JSON string is invalid for ReferencePriceResponse with oneOf" + + " schemas: ReferencePriceResponse1, ReferencePriceResponse2. %d" + + " class(es) match the result, expected 1. Detailed failure" + + " message for oneOf schemas: %s. JSON: %s", + validCount, errorMessages, jsonElement.toString())); } } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ReferencePriceResponse1.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ReferencePriceResponse1.java new file mode 100644 index 000000000..447133865 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ReferencePriceResponse1.java @@ -0,0 +1,284 @@ +/* + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.binance.connector.client.spot.rest.model; + +import com.binance.connector.client.spot.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** If a reference price is set: */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ReferencePriceResponse1 { + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public static final String SERIALIZED_NAME_REFERENCE_PRICE = "referencePrice"; + + @SerializedName(SERIALIZED_NAME_REFERENCE_PRICE) + @jakarta.annotation.Nullable + private String referencePrice; + + public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp"; + + @SerializedName(SERIALIZED_NAME_TIMESTAMP) + @jakarta.annotation.Nullable + private Long timestamp; + + public ReferencePriceResponse1() {} + + public ReferencePriceResponse1 symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Get symbol + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + public ReferencePriceResponse1 referencePrice( + @jakarta.annotation.Nullable String referencePrice) { + this.referencePrice = referencePrice; + return this; + } + + /** + * Reference price. Can be `null` if no reference price is set. + * + * @return referencePrice + */ + @jakarta.annotation.Nullable + public String getReferencePrice() { + return referencePrice; + } + + public void setReferencePrice(@jakarta.annotation.Nullable String referencePrice) { + this.referencePrice = referencePrice; + } + + public ReferencePriceResponse1 timestamp(@jakarta.annotation.Nullable Long timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Timestamp when reference price was valid. + * + * @return timestamp + */ + @jakarta.annotation.Nullable + public Long getTimestamp() { + return timestamp; + } + + public void setTimestamp(@jakarta.annotation.Nullable Long timestamp) { + this.timestamp = timestamp; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReferencePriceResponse1 referencePriceResponse1 = (ReferencePriceResponse1) o; + return Objects.equals(this.symbol, referencePriceResponse1.symbol) + && Objects.equals(this.referencePrice, referencePriceResponse1.referencePrice) + && Objects.equals(this.timestamp, referencePriceResponse1.timestamp); + } + + @Override + public int hashCode() { + return Objects.hash(symbol, referencePrice, timestamp); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReferencePriceResponse1 {\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" referencePrice: ").append(toIndentedString(referencePrice)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object symbolValue = getSymbol(); + String symbolValueAsString = ""; + symbolValueAsString = symbolValue.toString(); + sb.append("symbol=").append(urlEncode(symbolValueAsString)).append(""); + Object referencePriceValue = getReferencePrice(); + String referencePriceValueAsString = ""; + referencePriceValueAsString = referencePriceValue.toString(); + sb.append("referencePrice=").append(urlEncode(referencePriceValueAsString)).append(""); + Object timestampValue = getTimestamp(); + String timestampValueAsString = ""; + timestampValueAsString = timestampValue.toString(); + sb.append("timestamp=").append(urlEncode(timestampValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * 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 "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("symbol"); + openapiFields.add("referencePrice"); + openapiFields.add("timestamp"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ReferencePriceResponse1 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ReferencePriceResponse1.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ReferencePriceResponse1 is not found" + + " in the empty JSON string", + ReferencePriceResponse1.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + if ((jsonObj.get("referencePrice") != null && !jsonObj.get("referencePrice").isJsonNull()) + && !jsonObj.get("referencePrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `referencePrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("referencePrice").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ReferencePriceResponse1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReferencePriceResponse1' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ReferencePriceResponse1.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ReferencePriceResponse1 value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ReferencePriceResponse1 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ReferencePriceResponse1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReferencePriceResponse1 + * @throws IOException if the JSON string is invalid with respect to ReferencePriceResponse1 + */ + public static ReferencePriceResponse1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReferencePriceResponse1.class); + } + + /** + * Convert an instance of ReferencePriceResponse1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ReferencePriceResponse2.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ReferencePriceResponse2.java new file mode 100644 index 000000000..999aff400 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/ReferencePriceResponse2.java @@ -0,0 +1,294 @@ +/* + * Spot REST API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.binance.connector.client.spot.rest.model; + +import com.binance.connector.client.spot.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; +import org.openapitools.jackson.nullable.JsonNullable; + +/** If no reference price is set: */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ReferencePriceResponse2 { + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public static final String SERIALIZED_NAME_REFERENCE_PRICE = "referencePrice"; + + @SerializedName(SERIALIZED_NAME_REFERENCE_PRICE) + @jakarta.annotation.Nullable + private Object referencePrice; + + public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp"; + + @SerializedName(SERIALIZED_NAME_TIMESTAMP) + @jakarta.annotation.Nullable + private Long timestamp; + + public ReferencePriceResponse2() {} + + public ReferencePriceResponse2 symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Get symbol + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + public ReferencePriceResponse2 referencePrice( + @jakarta.annotation.Nullable Object referencePrice) { + this.referencePrice = referencePrice; + return this; + } + + /** + * Reference price. Can be `null` if no reference price is set. + * + * @return referencePrice + */ + @jakarta.annotation.Nullable + public Object getReferencePrice() { + return referencePrice; + } + + public void setReferencePrice(@jakarta.annotation.Nullable Object referencePrice) { + this.referencePrice = referencePrice; + } + + public ReferencePriceResponse2 timestamp(@jakarta.annotation.Nullable Long timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Timestamp when reference price was valid + * + * @return timestamp + */ + @jakarta.annotation.Nullable + public Long getTimestamp() { + return timestamp; + } + + public void setTimestamp(@jakarta.annotation.Nullable Long timestamp) { + this.timestamp = timestamp; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReferencePriceResponse2 referencePriceResponse2 = (ReferencePriceResponse2) o; + return Objects.equals(this.symbol, referencePriceResponse2.symbol) + && Objects.equals(this.referencePrice, referencePriceResponse2.referencePrice) + && Objects.equals(this.timestamp, referencePriceResponse2.timestamp); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(symbol, referencePrice, timestamp); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReferencePriceResponse2 {\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" referencePrice: ").append(toIndentedString(referencePrice)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object symbolValue = getSymbol(); + String symbolValueAsString = ""; + symbolValueAsString = symbolValue.toString(); + sb.append("symbol=").append(urlEncode(symbolValueAsString)).append(""); + Object referencePriceValue = getReferencePrice(); + String referencePriceValueAsString = ""; + referencePriceValueAsString = referencePriceValue.toString(); + sb.append("referencePrice=").append(urlEncode(referencePriceValueAsString)).append(""); + Object timestampValue = getTimestamp(); + String timestampValueAsString = ""; + timestampValueAsString = timestampValue.toString(); + sb.append("timestamp=").append(urlEncode(timestampValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * 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 "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("symbol"); + openapiFields.add("referencePrice"); + openapiFields.add("timestamp"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ReferencePriceResponse2 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ReferencePriceResponse2.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ReferencePriceResponse2 is not found" + + " in the empty JSON string", + ReferencePriceResponse2.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ReferencePriceResponse2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReferencePriceResponse2' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ReferencePriceResponse2.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ReferencePriceResponse2 value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ReferencePriceResponse2 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ReferencePriceResponse2 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReferencePriceResponse2 + * @throws IOException if the JSON string is invalid with respect to ReferencePriceResponse2 + */ + public static ReferencePriceResponse2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReferencePriceResponse2.class); + } + + /** + * Convert an instance of ReferencePriceResponse2 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Side.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Side.java index 9e745b8ab..8ed95442d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Side.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/Side.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Please see [Enums](/products/spot/enums#side) for supported values. */ +/** Please see Enums for supported values. */ @JsonAdapter(Side.Adapter.class) public enum Side { BUY("BUY"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderTestRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderTestRequest.java index f5a5ffd81..e0e850648 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderTestRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/SorOrderTestRequest.java @@ -41,7 +41,7 @@ public class SorOrderTestRequest { @SerializedName(SERIALIZED_NAME_COMPUTE_COMMISSION_RATES) @jakarta.annotation.Nullable - private Boolean computeCommissionRates = false; + private Boolean computeCommissionRates; public static final String SERIALIZED_NAME_SYMBOL = "symbol"; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TimeInForce.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TimeInForce.java index 87f23c40c..d2104c382 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TimeInForce.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/TimeInForce.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Please see [Enums](/products/spot/enums#timeinforce) for supported values. */ +/** Please see Enums for supported values. */ @JsonAdapter(TimeInForce.Adapter.class) public enum TimeInForce { GTC("GTC"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingPegOffsetType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingPegOffsetType.java index 9347c3053..4052c29f6 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingPegOffsetType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingPegOffsetType.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** See [Pegged Orders](/products/spot/faqs/pegged_orders) */ +/** See Pegged Orders */ @JsonAdapter(WorkingPegOffsetType.Adapter.class) public enum WorkingPegOffsetType { PRICE_LEVEL("PRICE_LEVEL"); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingPegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingPegPriceType.java index dfe915db3..d50a94c84 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingPegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingPegPriceType.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** See [Pegged Orders](/products/spot/faqs/pegged_orders) */ +/** See Pegged Orders */ @JsonAdapter(WorkingPegPriceType.Adapter.class) public enum WorkingPegPriceType { PRIMARY_PEG("PRIMARY_PEG"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingSide.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingSide.java index 99b20bc6d..84ddeb7ec 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingSide.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingSide.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Supported values: [Order Side](/products/spot/enums#side) */ +/** Supported values: Order Side */ @JsonAdapter(WorkingSide.Adapter.class) public enum WorkingSide { BUY("BUY"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingTimeInForce.java b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingTimeInForce.java index e4df4c1fd..98bb654e6 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingTimeInForce.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/rest/model/WorkingTimeInForce.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Supported values: [Time In Force](/products/spot/enums#timeinforce) */ +/** Supported values: Time In Force */ @JsonAdapter(WorkingTimeInForce.Adapter.class) public enum WorkingTimeInForce { GTC("GTC"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/JSON.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/JSON.java index 460ddbab4..e928248c8 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/JSON.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/JSON.java @@ -322,6 +322,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model .AccountRateLimitsOrdersResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .AccountRateLimitsOrdersResponseRateLimitsInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model .AccountRateLimitsOrdersResponseResultInner.CustomTypeAdapterFactory()); @@ -367,6 +370,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.AvgPriceResponse .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .AvgPriceResponseRateLimitsInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.AvgPriceResponseResult .CustomTypeAdapterFactory()); @@ -536,6 +542,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model .OpenOrderListsStatusResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .OpenOrderListsStatusResponseRateLimitsInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model .OpenOrderListsStatusResponseResultInner.CustomTypeAdapterFactory()); @@ -595,6 +604,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.OrderAmendmentsResponse .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .OrderAmendmentsResponseRateLimitsInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model .OrderAmendmentsResponseResultInner.CustomTypeAdapterFactory()); @@ -742,6 +754,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.OrderPlaceResponse .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .OrderPlaceResponseRateLimitsInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.OrderPlaceResponseResult .CustomTypeAdapterFactory()); @@ -769,10 +784,17 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model .OrderTestResponseResultDiscount.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .OrderTestResponseResultSpecialCommissionForOrder + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model .OrderTestResponseResultStandardCommissionForOrder .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .OrderTestResponseResultTaxCommissionForOrder.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.OutboundAccountPosition .CustomTypeAdapterFactory()); @@ -791,6 +813,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.PingResponse .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .PingResponseRateLimitsInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.PriceFilter .CustomTypeAdapterFactory()); @@ -812,9 +837,18 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.ReferencePriceResponse .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model.ReferencePriceResponse1 + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model - .ReferencePriceResponseResult.CustomTypeAdapterFactory()); + .ReferencePriceResponse1Result.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model.ReferencePriceResponse2 + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .ReferencePriceResponse2Result.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.SessionLogonRequest .CustomTypeAdapterFactory()); @@ -881,6 +915,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.Ticker24hrResponse1 .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .Ticker24hrResponse1RateLimitsInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.Ticker24hrResponse1Result .CustomTypeAdapterFactory()); @@ -935,12 +972,18 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.TickerResponse1 .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .TickerResponse1RateLimitsInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.TickerResponse1Result .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.TickerResponse2 .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .TickerResponse2RateLimitsInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.TickerResponse2ResultInner .CustomTypeAdapterFactory()); @@ -950,9 +993,18 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.TickerTradingDayResponse .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model.TickerTradingDayResponse1 + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model - .TickerTradingDayResponseResultInner.CustomTypeAdapterFactory()); + .TickerTradingDayResponse1Result.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model.TickerTradingDayResponse2 + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .TickerTradingDayResponse2ResultInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.TimeResponse .CustomTypeAdapterFactory()); @@ -974,6 +1026,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model.TradesHistoricalResponse .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.spot.websocket.api.model + .TradesHistoricalResponseRateLimitsInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.spot.websocket.api.model .TradesHistoricalResponseResultInner.CustomTypeAdapterFactory()); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/AccountApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/AccountApi.java index 88d58cfe8..892526f02 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/AccountApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/AccountApi.java @@ -466,10 +466,9 @@ private void myAllocationsValidateBeforeCall(MyAllocationsRequest myAllocationsR } /** - * Query Relevant Filters (USER_DATA) Retrieves the list of [filters](/products/spot/filters) - * relevant to an account on a given symbol. This is the only method that shows if an account - * has [`MAX_ASSET`](/products/spot/filters#max_asset) filters applied to it. - * Weight(IP): 40 Security Type: USER_DATA Notes: **Data Source:** Memory + * Query Relevant Filters (USER_DATA) Retrieves the list of filters relevant to an account on a + * given symbol. This is the only method that shows if an account has `MAX_ASSET` + * filters applied to it. Weight(IP): 40 Security Type: USER_DATA Notes: **Data Source:** Memory * * @param myFiltersRequest (required) * @return MyFiltersResponse @@ -601,9 +600,9 @@ private void myPreventedMatchesValidateBeforeCall( /** * Account trade history (USER_DATA) Query information about all your trades, filtered by time * range. Weight: Condition| Weight| ---| --- |Without orderId|20| |With orderId|5| Security - * Type: USER_DATA Notes: Data Source: Memory => Database Notes: - If `fromId` - * is specified, return trades with trade ID >= `fromId`. - If - * `startTime` and/or `endTime` are specified, trades are filtered by + * Type: USER_DATA Notes: **Data Source:** Memory => Database Notes: - If + * `fromId` is specified, return trades with trade ID >= `fromId`. - + * If `startTime` and/or `endTime` are specified, trades are filtered by * execution time (`time`). - `fromId` cannot be used together with * `startTime` and `endTime`. - If `orderId` is specified, only * trades related to that order are returned. - `startTime` and `endTime` @@ -740,7 +739,9 @@ private void openOrderListsStatusValidateBeforeCall( * `userDataStream.subscribe` if on an authenticated session * * `userDataStream.subscribe.signature` if subscribing through signature subscription * Weight: | Parameter | Weight | | --------- | ------ | | `symbol` | 6 | | none | 80 - * | Security Type: USER_DATA Notes: Data Source: Memory => Database + * | Security Type: USER_DATA Notes: **Data Source:** Memory => Database Response Notes: + * **Note:** The payload above does not show all fields that can appear. Please refer to + * Conditional fields in Order Responses. * * @param openOrdersStatusRequest (optional) * @return OpenOrdersStatusResponse @@ -936,7 +937,8 @@ private void orderListStatusValidateBeforeCall(OrderListStatusRequest orderListS * is searched first, then the `origClientOrderId` from that result is checked against * that order. If both conditions are not met the request will be rejected. * For some * historical orders the `cummulativeQuoteQty` response field may be negative, meaning - * the data is not available at this time. + * the data is not available at this time. Response Notes: **Note:** The payload above does not + * show all fields that can appear. Please refer to Conditional fields in Order Responses. * * @param orderStatusRequest (required) * @return OrderStatusResponse diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/MarketApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/MarketApi.java index 16422b4a6..d3ebde44f 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/MarketApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/MarketApi.java @@ -131,8 +131,8 @@ private void avgPriceValidateBeforeCall(AvgPriceRequest avgPriceRequest) throws } /** - * Historical Block Trades Get block trades. Weight(IP): 25 Security Type: NONE Notes: - Data - * Source: Database + * Historical Block Trades Get block trades. Weight(IP): 25 Security Type: NONE Notes: **Data + * Source:** Database * * @param blockTradesHistoricalRequest (required) * @return BlockTradesHistoricalResponse @@ -199,10 +199,9 @@ private void blockTradesHistoricalValidateBeforeCall( * you need to continuously monitor order book updates, please consider using WebSocket Streams: * * `<symbol>@depth<levels>` * `<symbol>@depth` You can * use `depth` request together with `<symbol>@depth` streams to - * [maintain a local order - * book](/products/spot/web-socket-streams#how-to-manage-a-local-order-book-correctly). Weight: - * Adjusted based on the limit: |Limit|Request Weight ------|------- 1-100| 5 101-500| 25 - * 501-1000| 50 1001-5000| 250 Security Type: NONE Notes: **Data Source:** Memory + * maintain a local order book. Weight: Adjusted based on the limit: |Limit|Request Weight + * ------|------- 1-100| 5 101-500| 25 501-1000| 50 1001-5000| 250 Security Type: NONE Notes: + * **Data Source:** Memory * * @param depthRequest (required) * @return DepthResponse @@ -264,20 +263,19 @@ private void depthValidateBeforeCall(DepthRequest depthRequest) throws ApiExcept * Klines Get klines (candlestick bars). Klines are uniquely identified by their open & * close time. If you need access to real-time kline updates, please consider using WebSocket * Streams: * `<symbol>@kline_<interval>` If you need historical kline - * data, please consider using - * [data.binance.vision](https://github.com/binance/binance-public-data/#klines). Weight(IP): 2 - * Security Type: NONE Notes: **Data Source:** Database Supported kline intervals - * (case-sensitive): Interval | `interval` value --------- | ---------------- seconds - * | `1s` minutes | `1m`, `3m`, `5m`, `15m`, - * `30m` hours | `1h`, `2h`, `4h`, `6h`, - * `8h`, `12h` days | `1d`, `3d` weeks | `1w` - * months | `1M` **Notes:** * If `startTime` and `endTime` are not - * sent, the most recent klines are returned. * Supported values for `timeZone`: * - * Hours and minutes (e.g. `-1:00`, `05:45`) * Only hours (e.g. - * `0`, `8`, `4`) * Accepted range is strictly [-12:00 to +14:00] - * inclusive * If `timeZone` provided, kline intervals are interpreted in that - * timezone instead of UTC. * Note that `startTime` and `endTime` are always - * interpreted in UTC, regardless of `timeZone`. + * data, please consider using data.binance.vision. Weight(IP): 2 Security Type: NONE Notes: + * **Data Source:** Database Supported kline intervals (case-sensitive): Interval | + * `interval` value --------- | ---------------- seconds | `1s` minutes | + * `1m`, `3m`, `5m`, `15m`, `30m` hours | + * `1h`, `2h`, `4h`, `6h`, `8h`, + * `12h` days | `1d`, `3d` weeks | `1w` months | + * `1M` **Notes:** * If `startTime` and `endTime` are not sent, + * the most recent klines are returned. * Supported values for `timeZone`: * Hours and + * minutes (e.g. `-1:00`, `05:45`) * Only hours (e.g. `0`, + * `8`, `4`) * Accepted range is strictly [-12:00 to +14:00] inclusive * If + * `timeZone` provided, kline intervals are interpreted in that timezone instead of + * UTC. * Note that `startTime` and `endTime` are always interpreted in UTC, + * regardless of `timeZone`. * * @param klinesRequest (required) * @return KlinesResponse @@ -338,7 +336,9 @@ private void klinesValidateBeforeCall(KlinesRequest klinesRequest) throws ApiExc /** * Query Reference Price Query Reference Price Weight(IP): 2 Security Type: NONE Notes: **Data - * Source:** Memory + * Source:** Memory If the symbol has never had a reference price set, the request is rejected + * with: ```json { \"code\": -2043, \"msg\": \"This + * symbol doesn't have a reference price.\" } ``` * * @param referencePriceRequest (required) * @return ReferencePriceResponse @@ -829,15 +829,14 @@ private void tickerTradingDayValidateBeforeCall(TickerTradingDayRequest tickerTr * same price – those trades are collected into an aggregate trade with total quantity of the * individual trades. If you need access to real-time trading activity, please consider using * WebSocket Streams: * `<symbol>@aggTrade` If you need historical aggregate - * trade data, please consider using - * [data.binance.vision](https://github.com/binance/binance-public-data/#aggtrades). Weight(IP): - * 4 Security Type: NONE Notes: **Data Source:** Database - If `fromId` is specified, - * return aggtrades with aggregate trade ID >= `fromId`. Use - * `fromId` and `limit` to page through all aggtrades. - If - * `startTime` and/or `endTime` are specified, aggtrades are filtered by - * execution time (`T`). `fromId` cannot be used together with - * `startTime` and `endTime`. - If no condition is specified, the most - * recent aggregate trades are returned. + * trade data, please consider using data.binance.vision. Weight(IP): 4 Security Type: NONE + * Notes: **Data Source:** Database - If `fromId` is specified, return aggtrades with + * aggregate trade ID >= `fromId`. Use `fromId` and + * `limit` to page through all aggtrades. - If `startTime` and/or + * `endTime` are specified, aggtrades are filtered by execution time (`T`). + * `fromId` cannot be used together with `startTime` and + * `endTime`. - If no condition is specified, the most recent aggregate trades are + * returned. * * @param tradesAggregateRequest (required) * @return TradesAggregateResponse diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/SpotWebSocketApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/SpotWebSocketApi.java index 8f9c54b9a..cd4d57167 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/SpotWebSocketApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/SpotWebSocketApi.java @@ -119,7 +119,7 @@ public class SpotWebSocketApi { private static final String USER_AGENT = String.format( - "binance-spot/11.0.1 (Java/%s; %s; %s)", + "binance-spot/11.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private final ConnectionInterface connection; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/TradeApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/TradeApi.java index 13aa6214c..ec6b77b11 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/TradeApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/TradeApi.java @@ -71,7 +71,8 @@ public ConnectionInterface getConnection() { /** * Cancel open orders (TRADE) Cancel all open orders on a symbol. This includes orders that are * part of an order list. Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** Matching - * Engine + * Engine Response Notes: **Note:** The payload above does not show all fields that can appear. + * Please refer to Conditional fields in Order Responses. * * @param openOrdersCancelAllRequest (required) * @return OpenOrdersCancelAllResponse @@ -135,9 +136,10 @@ private void openOrdersCancelAllValidateBeforeCall( /** * Order Amend Keep Priority (TRADE) Reduce the quantity of an existing open order. This adds 0 * orders to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` - * filter. Read [Order Amend Keep Priority FAQ](/products/spot/faqs/order_amend_keep_priority) - * to learn more. Weight(IP): 4 Unfilled Order Count: 0 Security Type: TRADE Notes: **Data - * Source:** Matching Engine + * filter. Read Order Amend Keep Priority FAQ to learn more. Weight(IP): 4 Unfilled Order Count: + * 0 Security Type: TRADE Notes: **Data Source:** Matching Engine Response Notes: **Note:** The + * payload above does not show all fields that can appear. Please refer to Conditional fields in + * Order Responses. * * @param orderAmendKeepPriorityRequest (required) * @return OrderAmendKeepPriorityResponse @@ -208,7 +210,15 @@ private void orderAmendKeepPriorityValidateBeforeCall( * If you cancel an order that is a part of an order list, the entire order list is canceled. * * The performance for canceling an order (single cancel or as part of a cancel-replace) is * always better when only `orderId` is sent. Sending `origClientOrderId` or - * both `orderId` + `origClientOrderId` will be slower. + * both `orderId` + `origClientOrderId` will be slower. Response Notes: + * **Note:** The payload above does not show all fields that can appear. Please refer to + * Conditional fields in Order Responses. **Regarding `cancelRestrictions`** * If the + * `cancelRestrictions` value is not any of the supported values, the error will be: + * ```json { \"code\": -1145, \"msg\": \"Invalid + * cancelRestrictions\" } ``` * If the order did not pass the conditions for + * `cancelRestrictions`, the error will be: ```json { + * \"code\": -2011, \"msg\": \"Order was not canceled due to cancel + * restrictions.\" } ``` * * @param orderCancelRequest (required) * @return OrderCancelResponse @@ -273,16 +283,15 @@ private void orderCancelValidateBeforeCall(OrderCancelRequest orderCancelRequest * instead of the canceled one. * A new order that was not attempted (i.e. when * `newOrderResult: NOT_ATTEMPTED`), will still increase the unfilled order count by * 1. * You can only cancel an individual order from an orderList using this method, but the - * result is the same as canceling the entire orderList.not attempted (i.e. when - * `newOrderResult: NOT_ATTEMPTED`), will still increase the unfilled order count by - * 1. Weight(IP): 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** - * Matching Engine Similar to the [`order.place`](#order-place) request, additional - * mandatory parameters (*) are determined by the new order `type`. Available - * `cancelReplaceMode` options: * `STOP_ON_FAILURE` – if cancellation - * request fails, new order placement will not be attempted. * `ALLOW_FAILURE` – new - * order placement will be attempted even if the cancel request fails. <table> - * <thead> <tr> <th colspan=3 align=left>Request</th> <th - * colspan=3 align=left>Response</th> </tr> <tr> + * result is the same as canceling the entire orderList. Weight(IP): 1 Unfilled Order Count: 1 + * Security Type: TRADE Notes: **Data Source:** Matching Engine Similar to the + * `order.place` request, additional mandatory parameters (*) are determined by the + * new order `type`. Available `cancelReplaceMode` options: * + * `STOP_ON_FAILURE` – if cancellation request fails, new order placement will not be + * attempted. * `ALLOW_FAILURE` – new order placement will be attempted even if the + * cancel request fails. <table> <thead> <tr> <th colspan=3 + * align=left>Request</th> <th colspan=3 + * align=left>Response</th> </tr> <tr> * <th><code>cancelReplaceMode</code></th> * <th><code>orderRateLimitExceededMode</code></th> <th>Unfilled * Order Count</th> <th><code>cancelResult</code></th> @@ -392,11 +401,13 @@ private void orderCancelValidateBeforeCall(OrderCancelRequest orderCancelRequest * `STOP_ON_FAILURE` mode, if the new order placement fails, the old order is still * canceled. * Filters and order count limits are evaluated before cancellation and order * placement occurs. * If new order placement is not attempted, your order count is still - * incremented. * Like [`order.cancel`](#order-cancel), if you cancel an individual - * order from an order list, the entire order list is canceled. * The performance for canceling - * an order (single cancel or as part of a cancel-replace) is always better when only - * `orderId` is sent. Sending `origClientOrderId` or both - * `orderId` + `origClientOrderId` will be slower. + * incremented. * Like `order.cancel`, if you cancel an individual order from an order + * list, the entire order list is canceled. * The performance for canceling an order (single + * cancel or as part of a cancel-replace) is always better when only `orderId` is + * sent. Sending `origClientOrderId` or both `orderId` + + * `origClientOrderId` will be slower. Response Notes: **Note:** The payload above + * does not show all fields that can appear. Please refer to Conditional fields in Order + * Responses. * * @param orderCancelReplaceRequest (required) * @return OrderCancelReplaceResponse @@ -463,8 +474,7 @@ private void orderCancelReplaceValidateBeforeCall( * `listClientOrderId` parameters are provided, the `orderListId` is * searched first, then the `listClientOrderId` from that result is checked against * that order. If both conditions are not met the request will be rejected. * Canceling an - * individual order with [`order.cancel`](#order-cancel) will cancel the entire order - * list as well. + * individual order with `order.cancel` will cancel the entire order list as well. * * @param orderListCancelRequest (required) * @return OrderListCancelResponse @@ -682,9 +692,10 @@ private void orderListPlaceOcoValidateBeforeCall( } /** - * OPO (TRADE) Place an [OPO](/products/spot/faqs/opo). * OPOs add 2 orders to the - * EXCHANGE_MAX_NUM_ORDERS filter and MAX_NUM_ORDERS filter. Weight(IP): 1 Unfilled Order Count: - * 2 Security Type: TRADE Notes: **Data Source:** Matching Engine + * OPO (TRADE) Place an OPO. * OPOs add 2 orders to the EXCHANGE_MAX_NUM_ORDERS filter and + * MAX_NUM_ORDERS filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: + * **Data Source:** Matching Engine Response Notes: **Note:** The payload above does not show + * all fields that can appear. Please refer to Conditional fields in Order Responses. * * @param orderListPlaceOpoRequest (required) * @return OrderListPlaceOpoResponse @@ -746,8 +757,9 @@ private void orderListPlaceOpoValidateBeforeCall( } /** - * OPOCO (TRADE) Place an [OPOCO](/products/spot/faqs/opo). Weight(IP): 1 Unfilled Order Count: - * 3 Security Type: TRADE Notes: **Data Source:** Matching Engine + * OPOCO (TRADE) Place an OPOCO. Weight(IP): 1 Unfilled Order Count: 3 Security Type: TRADE + * Notes: **Data Source:** Matching Engine Response Notes: **Note:** The payload above does not + * show all fields that can appear. Please refer to Conditional fields in Order Responses. * * @param orderListPlaceOpocoRequest (required) * @return OrderListPlaceOpocoResponse @@ -832,7 +844,9 @@ private void orderListPlaceOpocoValidateBeforeCall( * |`pendingStopPrice` and/or `pendingTrailingDelta`| * |`pendingType` =`STOP_LOSS_LIMIT` or * `TAKE_PROFIT_LIMIT`|`pendingPrice`, `pendingStopPrice` and/or - * `pendingTrailingDelta`, `pendingTimeInForce`| + * `pendingTrailingDelta`, `pendingTimeInForce`| Response Notes: **Note:** + * The payload above does not show all fields that can appear. Please refer to Conditional + * fields in Order Responses. * * @param orderListPlaceOtoRequest (required) * @return OrderListPlaceOtoResponse @@ -898,11 +912,10 @@ private void orderListPlaceOtoValidateBeforeCall( * (One-Triggers-One-Cancels-the-Other) is an order list comprised of 3 orders. * The first * order is called the **working order** and must be `LIMIT` or * `LIMIT_MAKER`. Initially, only the working order goes on the order book. * The - * behavior of the working order is the same as the [OTO](#order-list-place-oto). * OTOCO has 2 - * pending orders (pending above and pending below), forming an OCO pair. The pending orders are - * only placed on the order book when the working order gets **fully filled**. * The rules of - * the pending above and pending below follow the same rules as the [Order list - * OCO](#order-list-place-oco). * OTOCOs add **3 orders** to the + * behavior of the working order is the same as the OTO. * OTOCO has 2 pending orders (pending + * above and pending below), forming an OCO pair. The pending orders are only placed on the + * order book when the working order gets **fully filled**. * The rules of the pending above and + * pending below follow the same rules as the Order list OCO. * OTOCOs add **3 orders** to the * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight(IP): * 1 Unfilled Order Count: 3 Security Type: TRADE Notes: **Data Source:** Matching Engine * **Mandatory parameters based on `pendingAboveType`, `pendingBelowType` or @@ -922,7 +935,8 @@ private void orderListPlaceOtoValidateBeforeCall( * `pendingBelowTrailingDelta`| * |`pendingBelowType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT`|`pendingBelowPrice`, * `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta`, - * `pendingBelowTimeInForce`| + * `pendingBelowTimeInForce`| Response Notes: **Note:** The payload above does not + * show all fields that can appear. Please refer to Conditional fields in Order Responses. * * @param orderListPlaceOtocoRequest (required) * @return OrderListPlaceOtocoResponse @@ -986,11 +1000,10 @@ private void orderListPlaceOtocoValidateBeforeCall( /** * Place new order (TRADE) Send in a new order. This adds 1 order to the * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Weight(IP): - * 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** Matching Engine <a - * id=\"order-type\">Certain parameters (*)</a> become mandatory based - * on the order `type`: <table> <thead> <tr> <th>Order - * <code>type</code></th> <th>Mandatory parameters</th> - * </tr> </thead> <tbody> <tr> + * 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** Matching Engine + * Certain parameters (*) become mandatory based on the order `type`: <table> + * <thead> <tr> <th>Order <code>type</code></th> + * <th>Mandatory parameters</th> </tr> </thead> <tbody> <tr> * <td><code>LIMIT</code></td> <td> <ul> * <li><code>timeInForce</code></li> * <li><code>price</code></li> @@ -1062,35 +1075,33 @@ private void orderListPlaceOtocoValidateBeforeCall( * direction. </p> </td> </tr> <tr> * <td><code>TAKE_PROFIT_LIMIT</code></td> <td> <p> Like * <code>STOP_LOSS_LIMIT</code> but activates when market price moves in the - * favorable direction. </p> </td> </tr> </tbody> </table> <a - * id=\"pegged-orders-info\"></a> Notes on using parameters for Pegged - * Orders: * These parameters are allowed for `LIMIT`, `LIMIT_MAKER`, - * `STOP_LOSS_LIMIT`, `TAKE_PROFIT_LIMIT` orders. * If - * `pegPriceType` is specified, `price` becomes optional. Otherwise, it is - * still mandatory. * `pegPriceType=PRIMARY_PEG` means the primary peg, that is - * the best price on the same side of the order book as your order. * + * favorable direction. </p> </td> </tr> </tbody> </table> Notes + * on using parameters for Pegged Orders: * These parameters are allowed for `LIMIT`, + * `LIMIT_MAKER`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT_LIMIT` orders. * + * If `pegPriceType` is specified, `price` becomes optional. Otherwise, it + * is still mandatory. * `pegPriceType=PRIMARY_PEG` means the primary peg, that + * is the best price on the same side of the order book as your order. * * `pegPriceType=MARKET_PEG` means the market peg, that is the best price on the * opposite side of the order book from your order. * Use `pegOffsetType` and * `pegOffsetValue` to request a price level other than the best one. These parameters - * must be specified together. <a id=\"timeInForce\"></a> Available - * `timeInForce` options, setting how long the order should be active before - * expiration: TIF | Description ----- | -------------- `GTC` | **Good 'til - * Canceled** – the order will remain on the book until you cancel it, or the order is - * completely filled. `IOC` | **Immediate or Cancel** – the order will be filled for - * as much as possible, the unfilled quantity immediately expires. `FOK` | **Fill or - * Kill** – the order will expire unless it cannot be immediately filled for the entire - * quantity. Notes: * `newClientOrderId` specifies `clientOrderId` value for - * the order. A new order with the same `clientOrderId` is accepted only when the - * previous one is filled or expired. * Any `LIMIT` or `LIMIT_MAKER` order - * can be made into an iceberg order by specifying the `icebergQty`. An order with an - * `icebergQty` must have `timeInForce` set to `GTC`. * Trigger - * order price rules for `STOP_LOSS`/`TAKE_PROFIT` orders: * - * `stopPrice` must be above market price: `STOP_LOSS BUY`, - * `TAKE_PROFIT SELL` * `stopPrice` must be below market price: - * `STOP_LOSS SELL`, `TAKE_PROFIT BUY` * `MARKET` orders using - * `quoteOrderQty` follow [`LOT_SIZE`](/products/spot/filters#lot_size) - * filter rules. The order will execute a quantity that has notional value as close as possible - * to requested `quoteOrderQty`. + * must be specified together. Available `timeInForce` options, setting how long the + * order should be active before expiration: TIF | Description ----- | -------------- + * `GTC` | **Good 'til Canceled** – the order will remain on the book until you + * cancel it, or the order is completely filled. `IOC` | **Immediate or Cancel** – the + * order will be filled for as much as possible, the unfilled quantity immediately expires. + * `FOK` | **Fill or Kill** – the order will expire unless it cannot be immediately + * filled for the entire quantity. Notes: * `newClientOrderId` specifies + * `clientOrderId` value for the order. A new order with the same + * `clientOrderId` is accepted only when the previous one is filled or expired. * Any + * `LIMIT` or `LIMIT_MAKER` order can be made into an iceberg order by + * specifying the `icebergQty`. An order with an `icebergQty` must have + * `timeInForce` set to `GTC`. * Trigger order price rules for + * `STOP_LOSS`/`TAKE_PROFIT` orders: * `stopPrice` must be above + * market price: `STOP_LOSS BUY`, `TAKE_PROFIT SELL` * `stopPrice` + * must be below market price: `STOP_LOSS SELL`, `TAKE_PROFIT BUY` * + * `MARKET` orders using `quoteOrderQty` follow `LOT_SIZE` filter + * rules. The order will execute a quantity that has notional value as close as possible to + * requested `quoteOrderQty`. * * @param orderPlaceRequest (required) * @return OrderPlaceResponse @@ -1217,10 +1228,10 @@ private void orderTestValidateBeforeCall(OrderTestRequest orderTestRequest) /** * Place new order using SOR (TRADE) Places an order using smart order routing (SOR). This adds * 1 order to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` - * filter. Read [SOR FAQ](/products/spot/faqs/sor_faq) to learn more. Weight(IP): 1 Unfilled - * Order Count: 1 Security Type: TRADE Notes: **Data Source:** Matching Engine **Note:** - * `sor.order.place` only supports `LIMIT` and `MARKET` orders. - * `quoteOrderQty` is not supported. + * filter. Read SOR FAQ to learn more. Weight(IP): 1 Unfilled Order Count: 1 Security Type: + * TRADE Notes: **Data Source:** Matching Engine **Note:** `sor.order.place` only + * supports `LIMIT` and `MARKET` orders. `quoteOrderQty` is not + * supported. * * @param sorOrderPlaceRequest (required) * @return SorOrderPlaceResponse diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/UserDataStreamApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/UserDataStreamApi.java index 40e85da6c..9025f3707 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/UserDataStreamApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/api/UserDataStreamApi.java @@ -95,17 +95,13 @@ public CompletableFuture sessionSubscriptions() private void sessionSubscriptionsValidateBeforeCall() throws ApiException {} /** - * Subscribe to User Data Stream Subscribe to the User Data Stream in the current WebSocket - * connection. **Notes:** - This method requires an authenticated WebSocket connection using - * Ed25519 keys. Please refer to - * [`session.logon`](/catalog/core-trading-spot-trading/api/ws-api/auth#session-logon). - * - To check the subscription status, use - * [`session.status`](/catalog/core-trading-spot-trading/api/ws-api/auth#session-status), - * see the `userDataStream` flag indicating you have have an active subscription. - - * User Data Stream events are available in both JSON and [SBE](/products/spot/faqs/sbe_faq) - * sessions. - Please refer to [User Data Streams](/products/spot/user-data-stream) for the - * event format details. - For SBE, only SBE schema 2:1 or later is supported. Weight(IP): 2 - * Security Type: NONE + * Subscribe to User Data Stream (USER_STREAM) Subscribe to the User Data Stream in the current + * WebSocket connection. **Notes:** - This method requires an authenticated WebSocket connection + * using Ed25519 keys. Please refer to `session.logon`. - To check the subscription + * status, use `session.status`, see the `userDataStream` flag indicating + * you have an active subscription. - User Data Stream events are available in both JSON and SBE + * sessions. - Please refer to User Data Streams for the event format details. - For SBE, only + * SBE schema 2:1 or later is supported. Weight(IP): 2 Security Type: USER_STREAM * * @return UserDataStreamSubscribeResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -119,7 +115,7 @@ private void sessionSubscriptionsValidateBeforeCall() throws ApiException {} * * @see Subscribe - * to User Data Stream Documentation + * to User Data Stream (USER_STREAM) Documentation */ public StreamResponse userDataStreamSubscribe() throws ApiException { @@ -198,10 +194,10 @@ private void userDataStreamSubscribeValidateBeforeCall() throws ApiException {} private void userDataStreamSubscribeSignatureValidateBeforeCall() throws ApiException {} /** - * WebSocket Unsubscribe from User Data Stream Stop listening to the User Data Stream in the - * current WebSocket connection. Note that `session.logout` will only close the - * subscription created with `userDataStream.subscribe` but not subscriptions opened - * with `userDataStream.subscribe.signature`. Weight(IP): 2 + * Unsubscribe from User Data Stream Stop listening to the User Data Stream in the current + * WebSocket connection. Note that `session.logout` will only close the subscription + * created with `userDataStream.subscribe` but not subscriptions opened with + * `userDataStream.subscribe.signature`. Weight(IP): 2 * * @param userDataStreamUnsubscribeRequest (optional) * @return UserDataStreamUnsubscribeResponse @@ -215,8 +211,8 @@ private void userDataStreamSubscribeSignatureValidateBeforeCall() throws ApiExce * * * @see WebSocket - * Unsubscribe from User Data Stream Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-api/user-data-stream#user-data-stream-unsubscribe">Unsubscribe + * from User Data Stream Documentation */ public CompletableFuture userDataStreamUnsubscribe( UserDataStreamUnsubscribeRequest userDataStreamUnsubscribeRequest) throws ApiException { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AbovePegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AbovePegPriceType.java index b221f9a6d..7bdf2c80f 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AbovePegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AbovePegPriceType.java @@ -21,10 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** - * `PRIMARY_PEG` or `MARKET_PEG`. See [Pegged - * Orders](/products/spot/faqs/pegged_orders) - */ +/** `PRIMARY_PEG` or `MARKET_PEG`. See Pegged Orders */ @JsonAdapter(AbovePegPriceType.Adapter.class) public enum AbovePegPriceType { PRIMARY_PEG("PRIMARY_PEG"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountRateLimitsOrdersResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountRateLimitsOrdersResponse.java index 2af9dce49..c881524a5 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountRateLimitsOrdersResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountRateLimitsOrdersResponse.java @@ -65,7 +65,7 @@ public class AccountRateLimitsOrdersResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid AccountRateLimitsOrdersResponseRateLimitsInner> rateLimits; public AccountRateLimitsOrdersResponse() {} @@ -142,13 +142,13 @@ public void setResult( public AccountRateLimitsOrdersResponse rateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid AccountRateLimitsOrdersResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public AccountRateLimitsOrdersResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + AccountRateLimitsOrdersResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -163,13 +163,13 @@ public AccountRateLimitsOrdersResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid AccountRateLimitsOrdersResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid AccountRateLimitsOrdersResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -225,7 +225,8 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid AccountRateLimitsOrdersResponseRateLimitsInner> rateLimitsValue = + getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -365,7 +366,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( + AccountRateLimitsOrdersResponseRateLimitsInner.validateJsonElement( jsonArrayrateLimits.get(i)); } ; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountRateLimitsOrdersResponseRateLimitsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountRateLimitsOrdersResponseRateLimitsInner.java new file mode 100644 index 000000000..2b07fb941 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AccountRateLimitsOrdersResponseRateLimitsInner.java @@ -0,0 +1,423 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AccountRateLimitsOrdersResponseRateLimitsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AccountRateLimitsOrdersResponseRateLimitsInner extends BaseDTO { + public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; + + @SerializedName(SERIALIZED_NAME_RATE_LIMIT_TYPE) + @jakarta.annotation.Nullable + private String rateLimitType; + + public static final String SERIALIZED_NAME_INTERVAL = "interval"; + + @SerializedName(SERIALIZED_NAME_INTERVAL) + @jakarta.annotation.Nullable + private String interval; + + public static final String SERIALIZED_NAME_INTERVAL_NUM = "intervalNum"; + + @SerializedName(SERIALIZED_NAME_INTERVAL_NUM) + @jakarta.annotation.Nullable + private Long intervalNum; + + public static final String SERIALIZED_NAME_LIMIT = "limit"; + + @SerializedName(SERIALIZED_NAME_LIMIT) + @jakarta.annotation.Nullable + private Long limit; + + public static final String SERIALIZED_NAME_COUNT = "count"; + + @SerializedName(SERIALIZED_NAME_COUNT) + @jakarta.annotation.Nullable + private Long count; + + public AccountRateLimitsOrdersResponseRateLimitsInner() {} + + public AccountRateLimitsOrdersResponseRateLimitsInner rateLimitType( + @jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + return this; + } + + /** + * Get rateLimitType + * + * @return rateLimitType + */ + @jakarta.annotation.Nullable + public String getRateLimitType() { + return rateLimitType; + } + + public void setRateLimitType(@jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + } + + public AccountRateLimitsOrdersResponseRateLimitsInner interval( + @jakarta.annotation.Nullable String interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * + * @return interval + */ + @jakarta.annotation.Nullable + public String getInterval() { + return interval; + } + + public void setInterval(@jakarta.annotation.Nullable String interval) { + this.interval = interval; + } + + public AccountRateLimitsOrdersResponseRateLimitsInner intervalNum( + @jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + return this; + } + + /** + * Get intervalNum + * + * @return intervalNum + */ + @jakarta.annotation.Nullable + public Long getIntervalNum() { + return intervalNum; + } + + public void setIntervalNum(@jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + } + + public AccountRateLimitsOrdersResponseRateLimitsInner limit( + @jakarta.annotation.Nullable Long limit) { + this.limit = limit; + return this; + } + + /** + * Get limit + * + * @return limit + */ + @jakarta.annotation.Nullable + public Long getLimit() { + return limit; + } + + public void setLimit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + } + + public AccountRateLimitsOrdersResponseRateLimitsInner count( + @jakarta.annotation.Nullable Long count) { + this.count = count; + return this; + } + + /** + * Get count + * + * @return count + */ + @jakarta.annotation.Nullable + public Long getCount() { + return count; + } + + public void setCount(@jakarta.annotation.Nullable Long count) { + this.count = count; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountRateLimitsOrdersResponseRateLimitsInner + accountRateLimitsOrdersResponseRateLimitsInner = + (AccountRateLimitsOrdersResponseRateLimitsInner) o; + return Objects.equals( + this.rateLimitType, + accountRateLimitsOrdersResponseRateLimitsInner.rateLimitType) + && Objects.equals( + this.interval, accountRateLimitsOrdersResponseRateLimitsInner.interval) + && Objects.equals( + this.intervalNum, + accountRateLimitsOrdersResponseRateLimitsInner.intervalNum) + && Objects.equals(this.limit, accountRateLimitsOrdersResponseRateLimitsInner.limit) + && Objects.equals(this.count, accountRateLimitsOrdersResponseRateLimitsInner.count); + } + + @Override + public int hashCode() { + return Objects.hash(rateLimitType, interval, intervalNum, limit, count); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountRateLimitsOrdersResponseRateLimitsInner {\n"); + sb.append(" rateLimitType: ").append(toIndentedString(rateLimitType)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" intervalNum: ").append(toIndentedString(intervalNum)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + String rateLimitTypeValueAsString = rateLimitTypeValue.toString(); + valMap.put("rateLimitType", rateLimitTypeValueAsString); + } + String intervalValue = getInterval(); + if (intervalValue != null) { + String intervalValueAsString = intervalValue.toString(); + valMap.put("interval", intervalValueAsString); + } + Long intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + String intervalNumValueAsString = intervalNumValue.toString(); + valMap.put("intervalNum", intervalNumValueAsString); + } + Long limitValue = getLimit(); + if (limitValue != null) { + String limitValueAsString = limitValue.toString(); + valMap.put("limit", limitValueAsString); + } + Long countValue = getCount(); + if (countValue != null) { + String countValueAsString = countValue.toString(); + valMap.put("count", countValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + valMap.put("rateLimitType", rateLimitTypeValue); + } + Object intervalValue = getInterval(); + if (intervalValue != null) { + valMap.put("interval", intervalValue); + } + Object intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + valMap.put("intervalNum", intervalNumValue); + } + Object limitValue = getLimit(); + if (limitValue != null) { + valMap.put("limit", limitValue); + } + Object countValue = getCount(); + if (countValue != null) { + valMap.put("count", countValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * 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 "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("rateLimitType"); + openapiFields.add("interval"); + openapiFields.add("intervalNum"); + openapiFields.add("limit"); + openapiFields.add("count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * AccountRateLimitsOrdersResponseRateLimitsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AccountRateLimitsOrdersResponseRateLimitsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " AccountRateLimitsOrdersResponseRateLimitsInner is not found" + + " in the empty JSON string", + AccountRateLimitsOrdersResponseRateLimitsInner.openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AccountRateLimitsOrdersResponseRateLimitsInner.openapiFields.contains( + entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AccountRateLimitsOrdersResponseRateLimitsInner`" + + " properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("rateLimitType") != null && !jsonObj.get("rateLimitType").isJsonNull()) + && !jsonObj.get("rateLimitType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateLimitType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("rateLimitType").toString())); + } + if ((jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) + && !jsonObj.get("interval").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `interval` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("interval").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AccountRateLimitsOrdersResponseRateLimitsInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'AccountRateLimitsOrdersResponseRateLimitsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, + TypeToken.get(AccountRateLimitsOrdersResponseRateLimitsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, + AccountRateLimitsOrdersResponseRateLimitsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AccountRateLimitsOrdersResponseRateLimitsInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AccountRateLimitsOrdersResponseRateLimitsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of AccountRateLimitsOrdersResponseRateLimitsInner + * @throws IOException if the JSON string is invalid with respect to + * AccountRateLimitsOrdersResponseRateLimitsInner + */ + public static AccountRateLimitsOrdersResponseRateLimitsInner fromJson(String jsonString) + throws IOException { + return JSON.getGson() + .fromJson(jsonString, AccountRateLimitsOrdersResponseRateLimitsInner.class); + } + + /** + * Convert an instance of AccountRateLimitsOrdersResponseRateLimitsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AvgPriceResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AvgPriceResponse.java index f47fa59b1..855db05d5 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AvgPriceResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AvgPriceResponse.java @@ -65,7 +65,7 @@ public class AvgPriceResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid AvgPriceResponseRateLimitsInner> rateLimits; public AvgPriceResponse() {} @@ -128,14 +128,12 @@ public void setResult(@jakarta.annotation.Nullable AvgPriceResponseResult result } public AvgPriceResponse rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid AvgPriceResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public AvgPriceResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + public AvgPriceResponse addRateLimitsItem(AvgPriceResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -150,13 +148,12 @@ public AvgPriceResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid AvgPriceResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid AvgPriceResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -211,7 +208,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid AvgPriceResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -334,8 +331,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + AvgPriceResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AvgPriceResponseRateLimitsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AvgPriceResponseRateLimitsInner.java new file mode 100644 index 000000000..d18527658 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/AvgPriceResponseRateLimitsInner.java @@ -0,0 +1,404 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** AvgPriceResponseRateLimitsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class AvgPriceResponseRateLimitsInner extends BaseDTO { + public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; + + @SerializedName(SERIALIZED_NAME_RATE_LIMIT_TYPE) + @jakarta.annotation.Nullable + private String rateLimitType; + + public static final String SERIALIZED_NAME_INTERVAL = "interval"; + + @SerializedName(SERIALIZED_NAME_INTERVAL) + @jakarta.annotation.Nullable + private String interval; + + public static final String SERIALIZED_NAME_INTERVAL_NUM = "intervalNum"; + + @SerializedName(SERIALIZED_NAME_INTERVAL_NUM) + @jakarta.annotation.Nullable + private Long intervalNum; + + public static final String SERIALIZED_NAME_LIMIT = "limit"; + + @SerializedName(SERIALIZED_NAME_LIMIT) + @jakarta.annotation.Nullable + private Long limit; + + public static final String SERIALIZED_NAME_COUNT = "count"; + + @SerializedName(SERIALIZED_NAME_COUNT) + @jakarta.annotation.Nullable + private Long count; + + public AvgPriceResponseRateLimitsInner() {} + + public AvgPriceResponseRateLimitsInner rateLimitType( + @jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + return this; + } + + /** + * Get rateLimitType + * + * @return rateLimitType + */ + @jakarta.annotation.Nullable + public String getRateLimitType() { + return rateLimitType; + } + + public void setRateLimitType(@jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + } + + public AvgPriceResponseRateLimitsInner interval(@jakarta.annotation.Nullable String interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * + * @return interval + */ + @jakarta.annotation.Nullable + public String getInterval() { + return interval; + } + + public void setInterval(@jakarta.annotation.Nullable String interval) { + this.interval = interval; + } + + public AvgPriceResponseRateLimitsInner intervalNum( + @jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + return this; + } + + /** + * Get intervalNum + * + * @return intervalNum + */ + @jakarta.annotation.Nullable + public Long getIntervalNum() { + return intervalNum; + } + + public void setIntervalNum(@jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + } + + public AvgPriceResponseRateLimitsInner limit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + return this; + } + + /** + * Get limit + * + * @return limit + */ + @jakarta.annotation.Nullable + public Long getLimit() { + return limit; + } + + public void setLimit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + } + + public AvgPriceResponseRateLimitsInner count(@jakarta.annotation.Nullable Long count) { + this.count = count; + return this; + } + + /** + * Get count + * + * @return count + */ + @jakarta.annotation.Nullable + public Long getCount() { + return count; + } + + public void setCount(@jakarta.annotation.Nullable Long count) { + this.count = count; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AvgPriceResponseRateLimitsInner avgPriceResponseRateLimitsInner = + (AvgPriceResponseRateLimitsInner) o; + return Objects.equals(this.rateLimitType, avgPriceResponseRateLimitsInner.rateLimitType) + && Objects.equals(this.interval, avgPriceResponseRateLimitsInner.interval) + && Objects.equals(this.intervalNum, avgPriceResponseRateLimitsInner.intervalNum) + && Objects.equals(this.limit, avgPriceResponseRateLimitsInner.limit) + && Objects.equals(this.count, avgPriceResponseRateLimitsInner.count); + } + + @Override + public int hashCode() { + return Objects.hash(rateLimitType, interval, intervalNum, limit, count); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AvgPriceResponseRateLimitsInner {\n"); + sb.append(" rateLimitType: ").append(toIndentedString(rateLimitType)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" intervalNum: ").append(toIndentedString(intervalNum)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + String rateLimitTypeValueAsString = rateLimitTypeValue.toString(); + valMap.put("rateLimitType", rateLimitTypeValueAsString); + } + String intervalValue = getInterval(); + if (intervalValue != null) { + String intervalValueAsString = intervalValue.toString(); + valMap.put("interval", intervalValueAsString); + } + Long intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + String intervalNumValueAsString = intervalNumValue.toString(); + valMap.put("intervalNum", intervalNumValueAsString); + } + Long limitValue = getLimit(); + if (limitValue != null) { + String limitValueAsString = limitValue.toString(); + valMap.put("limit", limitValueAsString); + } + Long countValue = getCount(); + if (countValue != null) { + String countValueAsString = countValue.toString(); + valMap.put("count", countValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + valMap.put("rateLimitType", rateLimitTypeValue); + } + Object intervalValue = getInterval(); + if (intervalValue != null) { + valMap.put("interval", intervalValue); + } + Object intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + valMap.put("intervalNum", intervalNumValue); + } + Object limitValue = getLimit(); + if (limitValue != null) { + valMap.put("limit", limitValue); + } + Object countValue = getCount(); + if (countValue != null) { + valMap.put("count", countValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * 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 "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("rateLimitType"); + openapiFields.add("interval"); + openapiFields.add("intervalNum"); + openapiFields.add("limit"); + openapiFields.add("count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * AvgPriceResponseRateLimitsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AvgPriceResponseRateLimitsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in AvgPriceResponseRateLimitsInner is not" + + " found in the empty JSON string", + AvgPriceResponseRateLimitsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!AvgPriceResponseRateLimitsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `AvgPriceResponseRateLimitsInner` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("rateLimitType") != null && !jsonObj.get("rateLimitType").isJsonNull()) + && !jsonObj.get("rateLimitType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateLimitType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("rateLimitType").toString())); + } + if ((jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) + && !jsonObj.get("interval").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `interval` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("interval").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AvgPriceResponseRateLimitsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AvgPriceResponseRateLimitsInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(AvgPriceResponseRateLimitsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AvgPriceResponseRateLimitsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AvgPriceResponseRateLimitsInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of AvgPriceResponseRateLimitsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of AvgPriceResponseRateLimitsInner + * @throws IOException if the JSON string is invalid with respect to + * AvgPriceResponseRateLimitsInner + */ + public static AvgPriceResponseRateLimitsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AvgPriceResponseRateLimitsInner.class); + } + + /** + * Convert an instance of AvgPriceResponseRateLimitsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BelowPegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BelowPegPriceType.java index 4ad58fea0..07ac5b5a3 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BelowPegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/BelowPegPriceType.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** See [Pegged Orders](/products/spot/faqs/pegged_orders) */ +/** See Pegged Orders */ @JsonAdapter(BelowPegPriceType.Adapter.class) public enum BelowPegPriceType { PRIMARY_PEG("PRIMARY_PEG"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/CancelRestrictions.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/CancelRestrictions.java index ce9dd2421..dccc7bacc 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/CancelRestrictions.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/CancelRestrictions.java @@ -24,7 +24,8 @@ /** * Supported values: <br>`ONLY_NEW` - Cancel will succeed if the order status is * `NEW`.<br> `ONLY_PARTIALLY_FILLED` - Cancel will succeed if order - * status is `PARTIALLY_FILLED`. + * status is `PARTIALLY_FILLED`. For more information please refer to Regarding + * `cancelRestrictions`. */ @JsonAdapter(CancelRestrictions.Adapter.class) public enum CancelRestrictions { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/DepthResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/DepthResponse.java index a3464bba1..5a7336f17 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/DepthResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/DepthResponse.java @@ -65,7 +65,7 @@ public class DepthResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid AvgPriceResponseRateLimitsInner> rateLimits; public DepthResponse() {} @@ -128,14 +128,12 @@ public void setResult(@jakarta.annotation.Nullable DepthResponseResult result) { } public DepthResponse rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid AvgPriceResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public DepthResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + public DepthResponse addRateLimitsItem(AvgPriceResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -150,13 +148,12 @@ public DepthResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid AvgPriceResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid AvgPriceResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -211,7 +208,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid AvgPriceResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -334,8 +331,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + AvgPriceResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponse.java index 93b7979e4..99ea29c99 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponse.java @@ -134,7 +134,7 @@ public ExchangeInfoResponse addRateLimitsItem(RateLimits rateLimitsItem) { } /** - * Get rateLimits + * Global rate limits. See \"Rate limits\" section. * * @return rateLimits */ @@ -163,7 +163,8 @@ public ExchangeInfoResponse addExchangeFiltersItem(ExchangeFilters exchangeFilte } /** - * Get exchangeFilters + * Exchange filters are explained on the \"Filters\" page: All exchange filters are + * optional. * * @return exchangeFilters */ @@ -223,7 +224,7 @@ public ExchangeInfoResponse addSorsItem(ExchangeInfoResponseSorsInner sorsItem) } /** - * Get sors + * Optional field. Present only when SOR is available. * * @return sors */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponseSymbolsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponseSymbolsInner.java index e88907169..1de05c299 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponseSymbolsInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExchangeInfoResponseSymbolsInner.java @@ -652,7 +652,8 @@ public ExchangeInfoResponseSymbolsInner addFiltersItem(SymbolFilters filtersItem } /** - * Get filters + * Symbol filters are explained on the \"Filters\" page: All symbol filters are + * optional. * * @return filters */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionReport.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionReport.java index ef1acca73..73a47d755 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionReport.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ExecutionReport.java @@ -26,6 +26,7 @@ import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; +import java.util.Arrays; import java.util.HashSet; import java.util.Map; import java.util.Objects; @@ -33,6 +34,7 @@ import java.util.TreeMap; import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; +import org.openapitools.jackson.nullable.JsonNullable; /** ExecutionReport */ @jakarta.annotation.Generated( @@ -1482,6 +1484,15 @@ public boolean equals(Object o) { && Objects.equals(this.eR, executionReport.eR); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { return Objects.hash( @@ -1542,6 +1553,13 @@ public int hashCode() { eR); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/KlinesResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/KlinesResponse.java index c8600258c..f61faf71e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/KlinesResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/KlinesResponse.java @@ -65,7 +65,7 @@ public class KlinesResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid AvgPriceResponseRateLimitsInner> rateLimits; public KlinesResponse() {} @@ -138,14 +138,12 @@ public void setResult( } public KlinesResponse rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid AvgPriceResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public KlinesResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + public KlinesResponse addRateLimitsItem(AvgPriceResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -160,13 +158,12 @@ public KlinesResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid AvgPriceResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid AvgPriceResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -221,7 +218,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid AvgPriceResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -350,8 +347,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + AvgPriceResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusResponse.java index 16c0aeeea..81664d649 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusResponse.java @@ -65,7 +65,7 @@ public class OpenOrderListsStatusResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid OpenOrderListsStatusResponseRateLimitsInner> rateLimits; public OpenOrderListsStatusResponse() {} @@ -142,13 +142,13 @@ public void setResult( public OpenOrderListsStatusResponse rateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid OpenOrderListsStatusResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public OpenOrderListsStatusResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + OpenOrderListsStatusResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -163,13 +163,13 @@ public OpenOrderListsStatusResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid OpenOrderListsStatusResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid OpenOrderListsStatusResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -225,7 +225,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid OpenOrderListsStatusResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -365,7 +365,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( + OpenOrderListsStatusResponseRateLimitsInner.validateJsonElement( jsonArrayrateLimits.get(i)); } ; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusResponseRateLimitsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusResponseRateLimitsInner.java new file mode 100644 index 000000000..2206cb571 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrderListsStatusResponseRateLimitsInner.java @@ -0,0 +1,419 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** OpenOrderListsStatusResponseRateLimitsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class OpenOrderListsStatusResponseRateLimitsInner extends BaseDTO { + public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; + + @SerializedName(SERIALIZED_NAME_RATE_LIMIT_TYPE) + @jakarta.annotation.Nullable + private String rateLimitType; + + public static final String SERIALIZED_NAME_INTERVAL = "interval"; + + @SerializedName(SERIALIZED_NAME_INTERVAL) + @jakarta.annotation.Nullable + private String interval; + + public static final String SERIALIZED_NAME_INTERVAL_NUM = "intervalNum"; + + @SerializedName(SERIALIZED_NAME_INTERVAL_NUM) + @jakarta.annotation.Nullable + private Long intervalNum; + + public static final String SERIALIZED_NAME_LIMIT = "limit"; + + @SerializedName(SERIALIZED_NAME_LIMIT) + @jakarta.annotation.Nullable + private Long limit; + + public static final String SERIALIZED_NAME_COUNT = "count"; + + @SerializedName(SERIALIZED_NAME_COUNT) + @jakarta.annotation.Nullable + private Long count; + + public OpenOrderListsStatusResponseRateLimitsInner() {} + + public OpenOrderListsStatusResponseRateLimitsInner rateLimitType( + @jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + return this; + } + + /** + * Get rateLimitType + * + * @return rateLimitType + */ + @jakarta.annotation.Nullable + public String getRateLimitType() { + return rateLimitType; + } + + public void setRateLimitType(@jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + } + + public OpenOrderListsStatusResponseRateLimitsInner interval( + @jakarta.annotation.Nullable String interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * + * @return interval + */ + @jakarta.annotation.Nullable + public String getInterval() { + return interval; + } + + public void setInterval(@jakarta.annotation.Nullable String interval) { + this.interval = interval; + } + + public OpenOrderListsStatusResponseRateLimitsInner intervalNum( + @jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + return this; + } + + /** + * Get intervalNum + * + * @return intervalNum + */ + @jakarta.annotation.Nullable + public Long getIntervalNum() { + return intervalNum; + } + + public void setIntervalNum(@jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + } + + public OpenOrderListsStatusResponseRateLimitsInner limit( + @jakarta.annotation.Nullable Long limit) { + this.limit = limit; + return this; + } + + /** + * Get limit + * + * @return limit + */ + @jakarta.annotation.Nullable + public Long getLimit() { + return limit; + } + + public void setLimit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + } + + public OpenOrderListsStatusResponseRateLimitsInner count( + @jakarta.annotation.Nullable Long count) { + this.count = count; + return this; + } + + /** + * Get count + * + * @return count + */ + @jakarta.annotation.Nullable + public Long getCount() { + return count; + } + + public void setCount(@jakarta.annotation.Nullable Long count) { + this.count = count; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenOrderListsStatusResponseRateLimitsInner openOrderListsStatusResponseRateLimitsInner = + (OpenOrderListsStatusResponseRateLimitsInner) o; + return Objects.equals( + this.rateLimitType, + openOrderListsStatusResponseRateLimitsInner.rateLimitType) + && Objects.equals( + this.interval, openOrderListsStatusResponseRateLimitsInner.interval) + && Objects.equals( + this.intervalNum, openOrderListsStatusResponseRateLimitsInner.intervalNum) + && Objects.equals(this.limit, openOrderListsStatusResponseRateLimitsInner.limit) + && Objects.equals(this.count, openOrderListsStatusResponseRateLimitsInner.count); + } + + @Override + public int hashCode() { + return Objects.hash(rateLimitType, interval, intervalNum, limit, count); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenOrderListsStatusResponseRateLimitsInner {\n"); + sb.append(" rateLimitType: ").append(toIndentedString(rateLimitType)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" intervalNum: ").append(toIndentedString(intervalNum)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + String rateLimitTypeValueAsString = rateLimitTypeValue.toString(); + valMap.put("rateLimitType", rateLimitTypeValueAsString); + } + String intervalValue = getInterval(); + if (intervalValue != null) { + String intervalValueAsString = intervalValue.toString(); + valMap.put("interval", intervalValueAsString); + } + Long intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + String intervalNumValueAsString = intervalNumValue.toString(); + valMap.put("intervalNum", intervalNumValueAsString); + } + Long limitValue = getLimit(); + if (limitValue != null) { + String limitValueAsString = limitValue.toString(); + valMap.put("limit", limitValueAsString); + } + Long countValue = getCount(); + if (countValue != null) { + String countValueAsString = countValue.toString(); + valMap.put("count", countValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + valMap.put("rateLimitType", rateLimitTypeValue); + } + Object intervalValue = getInterval(); + if (intervalValue != null) { + valMap.put("interval", intervalValue); + } + Object intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + valMap.put("intervalNum", intervalNumValue); + } + Object limitValue = getLimit(); + if (limitValue != null) { + valMap.put("limit", limitValue); + } + Object countValue = getCount(); + if (countValue != null) { + valMap.put("count", countValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * 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 "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("rateLimitType"); + openapiFields.add("interval"); + openapiFields.add("intervalNum"); + openapiFields.add("limit"); + openapiFields.add("count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * OpenOrderListsStatusResponseRateLimitsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OpenOrderListsStatusResponseRateLimitsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " OpenOrderListsStatusResponseRateLimitsInner is not found in" + + " the empty JSON string", + OpenOrderListsStatusResponseRateLimitsInner.openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OpenOrderListsStatusResponseRateLimitsInner.openapiFields.contains( + entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `OpenOrderListsStatusResponseRateLimitsInner` properties." + + " JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("rateLimitType") != null && !jsonObj.get("rateLimitType").isJsonNull()) + && !jsonObj.get("rateLimitType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateLimitType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("rateLimitType").toString())); + } + if ((jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) + && !jsonObj.get("interval").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `interval` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("interval").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpenOrderListsStatusResponseRateLimitsInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'OpenOrderListsStatusResponseRateLimitsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(OpenOrderListsStatusResponseRateLimitsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, OpenOrderListsStatusResponseRateLimitsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OpenOrderListsStatusResponseRateLimitsInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of OpenOrderListsStatusResponseRateLimitsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenOrderListsStatusResponseRateLimitsInner + * @throws IOException if the JSON string is invalid with respect to + * OpenOrderListsStatusResponseRateLimitsInner + */ + public static OpenOrderListsStatusResponseRateLimitsInner fromJson(String jsonString) + throws IOException { + return JSON.getGson() + .fromJson(jsonString, OpenOrderListsStatusResponseRateLimitsInner.class); + } + + /** + * Convert an instance of OpenOrderListsStatusResponseRateLimitsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllResponse.java index b33d84423..8b725e2fb 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersCancelAllResponse.java @@ -65,7 +65,7 @@ public class OpenOrdersCancelAllResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid PingResponseRateLimitsInner> rateLimits; public OpenOrdersCancelAllResponse() {} @@ -141,14 +141,13 @@ public void setResult( } public OpenOrdersCancelAllResponse rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public OpenOrdersCancelAllResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + PingResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -163,13 +162,12 @@ public OpenOrdersCancelAllResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid PingResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -224,7 +222,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid PingResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -364,8 +362,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + PingResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersStatusResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersStatusResponse.java index 33d50b190..cb74f285e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersStatusResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OpenOrdersStatusResponse.java @@ -65,7 +65,7 @@ public class OpenOrdersStatusResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid OpenOrderListsStatusResponseRateLimitsInner> rateLimits; public OpenOrdersStatusResponse() {} @@ -139,13 +139,13 @@ public void setResult( public OpenOrdersStatusResponse rateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid OpenOrderListsStatusResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public OpenOrdersStatusResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + OpenOrderListsStatusResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -160,13 +160,13 @@ public OpenOrdersStatusResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid OpenOrderListsStatusResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid OpenOrderListsStatusResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -221,7 +221,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid OpenOrderListsStatusResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -359,7 +359,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( + OpenOrderListsStatusResponseRateLimitsInner.validateJsonElement( jsonArrayrateLimits.get(i)); } ; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponse.java index 34f06bc80..74dfd5841 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendKeepPriorityResponse.java @@ -65,7 +65,7 @@ public class OrderAmendKeepPriorityResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid PingResponseRateLimitsInner> rateLimits; public OrderAmendKeepPriorityResponse() {} @@ -130,14 +130,13 @@ public void setResult( } public OrderAmendKeepPriorityResponse rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public OrderAmendKeepPriorityResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + PingResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -152,13 +151,12 @@ public OrderAmendKeepPriorityResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid PingResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -214,7 +212,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid PingResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -338,8 +336,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + PingResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendmentsResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendmentsResponse.java index 67b38bef9..88eb49cc4 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendmentsResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendmentsResponse.java @@ -65,7 +65,7 @@ public class OrderAmendmentsResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimits; public OrderAmendmentsResponse() {} @@ -139,13 +139,13 @@ public void setResult( public OrderAmendmentsResponse rateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public OrderAmendmentsResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + OrderAmendmentsResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -160,13 +160,13 @@ public OrderAmendmentsResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid OrderAmendmentsResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -221,7 +221,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -359,7 +359,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( + OrderAmendmentsResponseRateLimitsInner.validateJsonElement( jsonArrayrateLimits.get(i)); } ; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendmentsResponseRateLimitsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendmentsResponseRateLimitsInner.java new file mode 100644 index 000000000..bfd34f047 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderAmendmentsResponseRateLimitsInner.java @@ -0,0 +1,411 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** OrderAmendmentsResponseRateLimitsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class OrderAmendmentsResponseRateLimitsInner extends BaseDTO { + public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; + + @SerializedName(SERIALIZED_NAME_RATE_LIMIT_TYPE) + @jakarta.annotation.Nullable + private String rateLimitType; + + public static final String SERIALIZED_NAME_INTERVAL = "interval"; + + @SerializedName(SERIALIZED_NAME_INTERVAL) + @jakarta.annotation.Nullable + private String interval; + + public static final String SERIALIZED_NAME_INTERVAL_NUM = "intervalNum"; + + @SerializedName(SERIALIZED_NAME_INTERVAL_NUM) + @jakarta.annotation.Nullable + private Long intervalNum; + + public static final String SERIALIZED_NAME_LIMIT = "limit"; + + @SerializedName(SERIALIZED_NAME_LIMIT) + @jakarta.annotation.Nullable + private Long limit; + + public static final String SERIALIZED_NAME_COUNT = "count"; + + @SerializedName(SERIALIZED_NAME_COUNT) + @jakarta.annotation.Nullable + private Long count; + + public OrderAmendmentsResponseRateLimitsInner() {} + + public OrderAmendmentsResponseRateLimitsInner rateLimitType( + @jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + return this; + } + + /** + * Get rateLimitType + * + * @return rateLimitType + */ + @jakarta.annotation.Nullable + public String getRateLimitType() { + return rateLimitType; + } + + public void setRateLimitType(@jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + } + + public OrderAmendmentsResponseRateLimitsInner interval( + @jakarta.annotation.Nullable String interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * + * @return interval + */ + @jakarta.annotation.Nullable + public String getInterval() { + return interval; + } + + public void setInterval(@jakarta.annotation.Nullable String interval) { + this.interval = interval; + } + + public OrderAmendmentsResponseRateLimitsInner intervalNum( + @jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + return this; + } + + /** + * Get intervalNum + * + * @return intervalNum + */ + @jakarta.annotation.Nullable + public Long getIntervalNum() { + return intervalNum; + } + + public void setIntervalNum(@jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + } + + public OrderAmendmentsResponseRateLimitsInner limit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + return this; + } + + /** + * Get limit + * + * @return limit + */ + @jakarta.annotation.Nullable + public Long getLimit() { + return limit; + } + + public void setLimit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + } + + public OrderAmendmentsResponseRateLimitsInner count(@jakarta.annotation.Nullable Long count) { + this.count = count; + return this; + } + + /** + * Get count + * + * @return count + */ + @jakarta.annotation.Nullable + public Long getCount() { + return count; + } + + public void setCount(@jakarta.annotation.Nullable Long count) { + this.count = count; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderAmendmentsResponseRateLimitsInner orderAmendmentsResponseRateLimitsInner = + (OrderAmendmentsResponseRateLimitsInner) o; + return Objects.equals( + this.rateLimitType, orderAmendmentsResponseRateLimitsInner.rateLimitType) + && Objects.equals(this.interval, orderAmendmentsResponseRateLimitsInner.interval) + && Objects.equals( + this.intervalNum, orderAmendmentsResponseRateLimitsInner.intervalNum) + && Objects.equals(this.limit, orderAmendmentsResponseRateLimitsInner.limit) + && Objects.equals(this.count, orderAmendmentsResponseRateLimitsInner.count); + } + + @Override + public int hashCode() { + return Objects.hash(rateLimitType, interval, intervalNum, limit, count); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderAmendmentsResponseRateLimitsInner {\n"); + sb.append(" rateLimitType: ").append(toIndentedString(rateLimitType)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" intervalNum: ").append(toIndentedString(intervalNum)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + String rateLimitTypeValueAsString = rateLimitTypeValue.toString(); + valMap.put("rateLimitType", rateLimitTypeValueAsString); + } + String intervalValue = getInterval(); + if (intervalValue != null) { + String intervalValueAsString = intervalValue.toString(); + valMap.put("interval", intervalValueAsString); + } + Long intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + String intervalNumValueAsString = intervalNumValue.toString(); + valMap.put("intervalNum", intervalNumValueAsString); + } + Long limitValue = getLimit(); + if (limitValue != null) { + String limitValueAsString = limitValue.toString(); + valMap.put("limit", limitValueAsString); + } + Long countValue = getCount(); + if (countValue != null) { + String countValueAsString = countValue.toString(); + valMap.put("count", countValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + valMap.put("rateLimitType", rateLimitTypeValue); + } + Object intervalValue = getInterval(); + if (intervalValue != null) { + valMap.put("interval", intervalValue); + } + Object intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + valMap.put("intervalNum", intervalNumValue); + } + Object limitValue = getLimit(); + if (limitValue != null) { + valMap.put("limit", limitValue); + } + Object countValue = getCount(); + if (countValue != null) { + valMap.put("count", countValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * 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 "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("rateLimitType"); + openapiFields.add("interval"); + openapiFields.add("intervalNum"); + openapiFields.add("limit"); + openapiFields.add("count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * OrderAmendmentsResponseRateLimitsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderAmendmentsResponseRateLimitsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OrderAmendmentsResponseRateLimitsInner" + + " is not found in the empty JSON string", + OrderAmendmentsResponseRateLimitsInner.openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderAmendmentsResponseRateLimitsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `OrderAmendmentsResponseRateLimitsInner` properties. JSON:" + + " %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("rateLimitType") != null && !jsonObj.get("rateLimitType").isJsonNull()) + && !jsonObj.get("rateLimitType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateLimitType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("rateLimitType").toString())); + } + if ((jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) + && !jsonObj.get("interval").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `interval` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("interval").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderAmendmentsResponseRateLimitsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderAmendmentsResponseRateLimitsInner' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(OrderAmendmentsResponseRateLimitsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, OrderAmendmentsResponseRateLimitsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderAmendmentsResponseRateLimitsInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of OrderAmendmentsResponseRateLimitsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderAmendmentsResponseRateLimitsInner + * @throws IOException if the JSON string is invalid with respect to + * OrderAmendmentsResponseRateLimitsInner + */ + public static OrderAmendmentsResponseRateLimitsInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, OrderAmendmentsResponseRateLimitsInner.class); + } + + /** + * Convert an instance of OrderAmendmentsResponseRateLimitsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceRequest.java index 9f95802c7..11b3a4270 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceRequest.java @@ -531,7 +531,7 @@ public OrderCancelReplaceRequest trailingDelta( } /** - * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) + * See Trailing Stop order FAQ * * @return trailingDelta */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponse.java index 78a54993d..4065659fa 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponse.java @@ -38,7 +38,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** OrderCancelReplaceResponse */ +/** + * If both cancel and placement succeed, you get the following response with + * `\"status\": 200`: + */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0") @@ -65,7 +68,7 @@ public class OrderCancelReplaceResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid PingResponseRateLimitsInner> rateLimits; public OrderCancelReplaceResponse() {} @@ -129,14 +132,13 @@ public void setResult(@jakarta.annotation.Nullable OrderCancelReplaceResponseRes } public OrderCancelReplaceResponse rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public OrderCancelReplaceResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + PingResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -151,13 +153,12 @@ public OrderCancelReplaceResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid PingResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -212,7 +213,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid PingResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -335,8 +336,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + PingResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponseResultCancelResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponseResultCancelResponse.java index 6861077ea..fc4a081b3 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponseResultCancelResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponseResultCancelResponse.java @@ -34,7 +34,10 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** OrderCancelReplaceResponseResultCancelResponse */ +/** + * Format is identical to \"order.cancel\" format. Some fields are optional and are + * included only for orders that set them. + */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0") @@ -255,7 +258,7 @@ public OrderCancelReplaceResponseResultCancelResponse origClientOrderId( } /** - * Get origClientOrderId + * cancelOrigClientOrderId from request * * @return origClientOrderId */ @@ -315,7 +318,7 @@ public OrderCancelReplaceResponseResultCancelResponse clientOrderId( } /** - * Get clientOrderId + * cancelNewClientOrderId from request * * @return clientOrderId */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponseResultNewOrderResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponseResultNewOrderResponse.java index 3a9fdbf1f..12cd2eaca 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponseResultNewOrderResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelReplaceResponseResultNewOrderResponse.java @@ -34,7 +34,11 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** OrderCancelReplaceResponseResultNewOrderResponse */ +/** + * Format is identical to \"order.place\" format, affected by + * \"newOrderRespType\". Some fields are optional and are included only for orders that + * set them. + */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0") diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelResponse.java index 0f3f08b38..abf0c73b7 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelResponse.java @@ -65,7 +65,7 @@ public class OrderCancelResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid PingResponseRateLimitsInner> rateLimits; public OrderCancelResponse() {} @@ -129,14 +129,12 @@ public void setResult(@jakarta.annotation.Nullable OrderCancelResponseResult res } public OrderCancelResponse rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OrderCancelResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + public OrderCancelResponse addRateLimitsItem(PingResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -151,13 +149,12 @@ public OrderCancelResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid PingResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -212,7 +209,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid PingResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -335,8 +332,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + PingResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelResponseResult.java index 719797054..059e4f067 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderCancelResponseResult.java @@ -300,7 +300,7 @@ public OrderCancelResponseResult origClientOrderId( } /** - * Get origClientOrderId + * clientOrderId that was canceled * * @return origClientOrderId */ @@ -338,7 +338,7 @@ public OrderCancelResponseResult orderListId(@jakarta.annotation.Nullable Long o } /** - * Get orderListId + * set only for legs of an order list * * @return orderListId */ @@ -358,7 +358,7 @@ public OrderCancelResponseResult clientOrderId( } /** - * Get clientOrderId + * newClientOrderId from request * * @return clientOrderId */ @@ -569,7 +569,7 @@ public OrderCancelResponseResult stopPrice(@jakarta.annotation.Nullable String s } /** - * Appears for STOP_LOSS, TAKE_PROFIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT orders. + * present only if stopPrice set for the order * * @return stopPrice */ @@ -589,7 +589,7 @@ public OrderCancelResponseResult trailingDelta( } /** - * Delta price change required before order activation. + * present only if trailingDelta set for the order * * @return trailingDelta */ @@ -608,7 +608,7 @@ public OrderCancelResponseResult icebergQty(@jakarta.annotation.Nullable String } /** - * Appears only if the parameter icebergQty was sent in the request. + * present only if icebergQty set for the order * * @return icebergQty */ @@ -627,7 +627,7 @@ public OrderCancelResponseResult strategyId(@jakarta.annotation.Nullable Long st } /** - * Appears only if the strategyId parameter was provided upon order placement. + * present only if strategyId set for the order * * @return strategyId */ @@ -646,7 +646,7 @@ public OrderCancelResponseResult strategyType(@jakarta.annotation.Nullable Long } /** - * Appears only if the strategyType parameter was provided upon order placement. + * present only if strategyType set for the order * * @return strategyType */ @@ -1028,7 +1028,7 @@ public OrderCancelResponseResult addOrderReportsItem( } /** - * Get orderReports + * order list order's status format is the same as for individual orders. * * @return orderReports */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelResponse.java index 9294175eb..f22a385b5 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListCancelResponse.java @@ -65,7 +65,7 @@ public class OrderListCancelResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid PingResponseRateLimitsInner> rateLimits; public OrderListCancelResponse() {} @@ -129,14 +129,12 @@ public void setResult(@jakarta.annotation.Nullable OrderListCancelResponseResult } public OrderListCancelResponse rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OrderListCancelResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + public OrderListCancelResponse addRateLimitsItem(PingResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -151,13 +149,12 @@ public OrderListCancelResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid PingResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -212,7 +209,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid PingResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -335,8 +332,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + PingResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoRequest.java index 762e85698..46b249e6f 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoRequest.java @@ -453,7 +453,7 @@ public OrderListPlaceOcoRequest aboveTrailingDelta( } /** - * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) + * See Trailing Stop order FAQ * * @return aboveTrailingDelta */ @@ -707,7 +707,7 @@ public OrderListPlaceOcoRequest belowTrailingDelta( } /** - * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) + * See Trailing Stop order FAQ * * @return belowTrailingDelta */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoResponse.java index 402515fd6..ecdf87711 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOcoResponse.java @@ -65,7 +65,7 @@ public class OrderListPlaceOcoResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid PingResponseRateLimitsInner> rateLimits; public OrderListPlaceOcoResponse() {} @@ -129,14 +129,12 @@ public void setResult(@jakarta.annotation.Nullable OrderListPlaceOcoResponseResu } public OrderListPlaceOcoResponse rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OrderListPlaceOcoResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + public OrderListPlaceOcoResponse addRateLimitsItem(PingResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -151,13 +149,12 @@ public OrderListPlaceOcoResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid PingResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -212,7 +209,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid PingResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -335,8 +332,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + PingResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoRequest.java index 513560636..2be0f20ca 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOpocoRequest.java @@ -365,7 +365,8 @@ public OrderListPlaceOpocoRequest listClientOrderId( * Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order * list with the same `listClientOrderId` is accepted only when the previous one is * filled or completely expired. `listClientOrderId` is distinct from the - * `workingClientOrderId` and the `pendingClientOrderId`. + * `workingClientOrderId`, `pendingAboveClientOrderId`, and the + * `pendingBelowClientOrderId`. * * @return listClientOrderId */ @@ -667,8 +668,7 @@ public OrderListPlaceOpocoRequest workingPegOffsetValue( } /** - * Price level for pegging (max: 100). See [Pegged Orders](/products/spot/faqs/pegged_orders) - * maximum: 100 + * Price level for pegging (max: 100). See Pegged Orders maximum: 100 * * @return workingPegOffsetValue */ @@ -801,7 +801,7 @@ public OrderListPlaceOpocoRequest pendingAboveTrailingDelta( } /** - * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) + * See Trailing Stop order FAQ * * @return pendingAboveTrailingDelta */ @@ -955,8 +955,7 @@ public OrderListPlaceOpocoRequest pendingAbovePegOffsetValue( } /** - * Price level for pegging (max: 100). See [Pegged Orders](/products/spot/faqs/pegged_orders) - * maximum: 100 + * Price level for pegging (max: 100). See Pegged Orders maximum: 100 * * @return pendingAbovePegOffsetValue */ @@ -1069,7 +1068,7 @@ public OrderListPlaceOpocoRequest pendingBelowTrailingDelta( } /** - * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) + * See Trailing Stop order FAQ * * @return pendingBelowTrailingDelta */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoResponse.java index 99308a5c8..cfe21924b 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtoResponse.java @@ -65,7 +65,7 @@ public class OrderListPlaceOtoResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid PingResponseRateLimitsInner> rateLimits; public OrderListPlaceOtoResponse() {} @@ -129,14 +129,12 @@ public void setResult(@jakarta.annotation.Nullable OrderListPlaceOtoResponseResu } public OrderListPlaceOtoResponse rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OrderListPlaceOtoResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + public OrderListPlaceOtoResponse addRateLimitsItem(PingResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -151,13 +149,12 @@ public OrderListPlaceOtoResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid PingResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -212,7 +209,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid PingResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -335,8 +332,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + PingResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoRequest.java index 548bb8cbc..72901b5b2 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoRequest.java @@ -371,7 +371,8 @@ public OrderListPlaceOtocoRequest listClientOrderId( * Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order * list with the same `listClientOrderId` is accepted only when the previous one is * filled or completely expired. `listClientOrderId` is distinct from the - * `workingClientOrderId` and the `pendingClientOrderId`. + * `workingClientOrderId`, `pendingAboveClientOrderId`, and the + * `pendingBelowClientOrderId`. * * @return listClientOrderId */ @@ -828,7 +829,7 @@ public OrderListPlaceOtocoRequest pendingAboveTrailingDelta( } /** - * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) + * See Trailing Stop order FAQ * * @return pendingAboveTrailingDelta */ @@ -1095,7 +1096,7 @@ public OrderListPlaceOtocoRequest pendingBelowTrailingDelta( } /** - * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) + * See Trailing Stop order FAQ * * @return pendingBelowTrailingDelta */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoResponse.java index fd829dfac..9063530b6 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceOtocoResponse.java @@ -65,7 +65,7 @@ public class OrderListPlaceOtocoResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid PingResponseRateLimitsInner> rateLimits; public OrderListPlaceOtocoResponse() {} @@ -129,14 +129,13 @@ public void setResult(@jakarta.annotation.Nullable OrderListPlaceOtocoResponseRe } public OrderListPlaceOtocoResponse rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public OrderListPlaceOtocoResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + PingResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -151,13 +150,12 @@ public OrderListPlaceOtocoResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid PingResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -212,7 +210,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid PingResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -336,8 +334,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + PingResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceResponse.java index e0e25cc39..031a47ad1 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListPlaceResponse.java @@ -65,7 +65,7 @@ public class OrderListPlaceResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid PingResponseRateLimitsInner> rateLimits; public OrderListPlaceResponse() {} @@ -129,14 +129,12 @@ public void setResult(@jakarta.annotation.Nullable OrderListPlaceResponseResult } public OrderListPlaceResponse rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OrderListPlaceResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + public OrderListPlaceResponse addRateLimitsItem(PingResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -151,13 +149,12 @@ public OrderListPlaceResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid PingResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -212,7 +209,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid PingResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -335,8 +332,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + PingResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListStatusResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListStatusResponse.java index 83740c157..43eb6540e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListStatusResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderListStatusResponse.java @@ -65,7 +65,7 @@ public class OrderListStatusResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimits; public OrderListStatusResponse() {} @@ -130,13 +130,13 @@ public void setResult(@jakarta.annotation.Nullable OrderListStatusResponseResult public OrderListStatusResponse rateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public OrderListStatusResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + OrderAmendmentsResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -151,13 +151,13 @@ public OrderListStatusResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid OrderAmendmentsResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -212,7 +212,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -335,7 +335,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( + OrderAmendmentsResponseRateLimitsInner.validateJsonElement( jsonArrayrateLimits.get(i)); } ; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponse.java index cc0576611..9fb91fb5f 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponse.java @@ -65,7 +65,7 @@ public class OrderPlaceResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid OrderPlaceResponseRateLimitsInner> rateLimits; public OrderPlaceResponse() {} @@ -129,13 +129,12 @@ public void setResult(@jakarta.annotation.Nullable OrderPlaceResponseResult resu public OrderPlaceResponse rateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid OrderPlaceResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OrderPlaceResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + public OrderPlaceResponse addRateLimitsItem(OrderPlaceResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -150,13 +149,13 @@ public OrderPlaceResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid OrderPlaceResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid OrderPlaceResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -211,7 +210,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid OrderPlaceResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -334,7 +333,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( + OrderPlaceResponseRateLimitsInner.validateJsonElement( jsonArrayrateLimits.get(i)); } ; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponseRateLimitsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponseRateLimitsInner.java new file mode 100644 index 000000000..acfbfb39f --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponseRateLimitsInner.java @@ -0,0 +1,406 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** OrderPlaceResponseRateLimitsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class OrderPlaceResponseRateLimitsInner extends BaseDTO { + public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; + + @SerializedName(SERIALIZED_NAME_RATE_LIMIT_TYPE) + @jakarta.annotation.Nullable + private String rateLimitType; + + public static final String SERIALIZED_NAME_INTERVAL = "interval"; + + @SerializedName(SERIALIZED_NAME_INTERVAL) + @jakarta.annotation.Nullable + private String interval; + + public static final String SERIALIZED_NAME_INTERVAL_NUM = "intervalNum"; + + @SerializedName(SERIALIZED_NAME_INTERVAL_NUM) + @jakarta.annotation.Nullable + private Long intervalNum; + + public static final String SERIALIZED_NAME_LIMIT = "limit"; + + @SerializedName(SERIALIZED_NAME_LIMIT) + @jakarta.annotation.Nullable + private Long limit; + + public static final String SERIALIZED_NAME_COUNT = "count"; + + @SerializedName(SERIALIZED_NAME_COUNT) + @jakarta.annotation.Nullable + private Long count; + + public OrderPlaceResponseRateLimitsInner() {} + + public OrderPlaceResponseRateLimitsInner rateLimitType( + @jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + return this; + } + + /** + * Get rateLimitType + * + * @return rateLimitType + */ + @jakarta.annotation.Nullable + public String getRateLimitType() { + return rateLimitType; + } + + public void setRateLimitType(@jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + } + + public OrderPlaceResponseRateLimitsInner interval( + @jakarta.annotation.Nullable String interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * + * @return interval + */ + @jakarta.annotation.Nullable + public String getInterval() { + return interval; + } + + public void setInterval(@jakarta.annotation.Nullable String interval) { + this.interval = interval; + } + + public OrderPlaceResponseRateLimitsInner intervalNum( + @jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + return this; + } + + /** + * Get intervalNum + * + * @return intervalNum + */ + @jakarta.annotation.Nullable + public Long getIntervalNum() { + return intervalNum; + } + + public void setIntervalNum(@jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + } + + public OrderPlaceResponseRateLimitsInner limit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + return this; + } + + /** + * Get limit + * + * @return limit + */ + @jakarta.annotation.Nullable + public Long getLimit() { + return limit; + } + + public void setLimit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + } + + public OrderPlaceResponseRateLimitsInner count(@jakarta.annotation.Nullable Long count) { + this.count = count; + return this; + } + + /** + * Get count + * + * @return count + */ + @jakarta.annotation.Nullable + public Long getCount() { + return count; + } + + public void setCount(@jakarta.annotation.Nullable Long count) { + this.count = count; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderPlaceResponseRateLimitsInner orderPlaceResponseRateLimitsInner = + (OrderPlaceResponseRateLimitsInner) o; + return Objects.equals(this.rateLimitType, orderPlaceResponseRateLimitsInner.rateLimitType) + && Objects.equals(this.interval, orderPlaceResponseRateLimitsInner.interval) + && Objects.equals(this.intervalNum, orderPlaceResponseRateLimitsInner.intervalNum) + && Objects.equals(this.limit, orderPlaceResponseRateLimitsInner.limit) + && Objects.equals(this.count, orderPlaceResponseRateLimitsInner.count); + } + + @Override + public int hashCode() { + return Objects.hash(rateLimitType, interval, intervalNum, limit, count); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderPlaceResponseRateLimitsInner {\n"); + sb.append(" rateLimitType: ").append(toIndentedString(rateLimitType)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" intervalNum: ").append(toIndentedString(intervalNum)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + String rateLimitTypeValueAsString = rateLimitTypeValue.toString(); + valMap.put("rateLimitType", rateLimitTypeValueAsString); + } + String intervalValue = getInterval(); + if (intervalValue != null) { + String intervalValueAsString = intervalValue.toString(); + valMap.put("interval", intervalValueAsString); + } + Long intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + String intervalNumValueAsString = intervalNumValue.toString(); + valMap.put("intervalNum", intervalNumValueAsString); + } + Long limitValue = getLimit(); + if (limitValue != null) { + String limitValueAsString = limitValue.toString(); + valMap.put("limit", limitValueAsString); + } + Long countValue = getCount(); + if (countValue != null) { + String countValueAsString = countValue.toString(); + valMap.put("count", countValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + valMap.put("rateLimitType", rateLimitTypeValue); + } + Object intervalValue = getInterval(); + if (intervalValue != null) { + valMap.put("interval", intervalValue); + } + Object intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + valMap.put("intervalNum", intervalNumValue); + } + Object limitValue = getLimit(); + if (limitValue != null) { + valMap.put("limit", limitValue); + } + Object countValue = getCount(); + if (countValue != null) { + valMap.put("count", countValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * 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 "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("rateLimitType"); + openapiFields.add("interval"); + openapiFields.add("intervalNum"); + openapiFields.add("limit"); + openapiFields.add("count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * OrderPlaceResponseRateLimitsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderPlaceResponseRateLimitsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in OrderPlaceResponseRateLimitsInner is" + + " not found in the empty JSON string", + OrderPlaceResponseRateLimitsInner.openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderPlaceResponseRateLimitsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `OrderPlaceResponseRateLimitsInner` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("rateLimitType") != null && !jsonObj.get("rateLimitType").isJsonNull()) + && !jsonObj.get("rateLimitType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateLimitType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("rateLimitType").toString())); + } + if ((jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) + && !jsonObj.get("interval").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `interval` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("interval").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderPlaceResponseRateLimitsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrderPlaceResponseRateLimitsInner' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(OrderPlaceResponseRateLimitsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, OrderPlaceResponseRateLimitsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderPlaceResponseRateLimitsInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of OrderPlaceResponseRateLimitsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderPlaceResponseRateLimitsInner + * @throws IOException if the JSON string is invalid with respect to + * OrderPlaceResponseRateLimitsInner + */ + public static OrderPlaceResponseRateLimitsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrderPlaceResponseRateLimitsInner.class); + } + + /** + * Convert an instance of OrderPlaceResponseRateLimitsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponseResult.java index a3c46b147..7333c1bf6 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderPlaceResponseResult.java @@ -282,7 +282,7 @@ public OrderPlaceResponseResult orderListId(@jakarta.annotation.Nullable Long or } /** - * Get orderListId + * always -1 for singular orders * * @return orderListId */ @@ -851,7 +851,9 @@ public OrderPlaceResponseResult addFillsItem(OrderPlaceResponseResultFillsInner } /** - * Get fills + * FULL response is identical to RESULT response, with the same optional fields based on the + * order type and parameters. FULL response additionally includes the list of trades which + * immediately filled the order. * * @return fills */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderStatusResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderStatusResponse.java index dc998a28c..da26ee1e4 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderStatusResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderStatusResponse.java @@ -65,7 +65,7 @@ public class OrderStatusResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimits; public OrderStatusResponse() {} @@ -130,13 +130,13 @@ public void setResult(@jakarta.annotation.Nullable OrderStatusResponseResult res public OrderStatusResponse rateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public OrderStatusResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + OrderAmendmentsResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -151,13 +151,13 @@ public OrderStatusResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid OrderAmendmentsResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -212,7 +212,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -335,7 +335,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( + OrderAmendmentsResponseRateLimitsInner.validateJsonElement( jsonArrayrateLimits.get(i)); } ; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestRequest.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestRequest.java index e2a7fe7fe..86c1766a4 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestRequest.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestRequest.java @@ -196,8 +196,7 @@ public OrderTestRequest computeCommissionRates( } /** - * Default: `false` <br> See [Commissions - * FAQ](/products/spot/faqs/commission_faq#test-order-diferences) to learn more. + * Default: `false` <br> See Commissions FAQ to learn more. * * @return computeCommissionRates */ @@ -423,7 +422,7 @@ public OrderTestRequest trailingDelta(@jakarta.annotation.Nullable Integer trail } /** - * See [Trailing Stop order FAQ](/products/spot/faqs/trailing-stop-faq) + * See Trailing Stop order FAQ * * @return trailingDelta */ @@ -544,8 +543,7 @@ public OrderTestRequest pegOffsetValue(@jakarta.annotation.Nullable Integer pegO } /** - * Price level for pegging (max: 100). See [Pegged Orders](/products/spot/faqs/pegged_orders) - * maximum: 100 + * Price level for pegging (max: 100). See Pegged Orders maximum: 100 * * @return pegOffsetValue */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponse.java index c92519afa..255dcb571 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponse.java @@ -65,7 +65,7 @@ public class OrderTestResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid PingResponseRateLimitsInner> rateLimits; public OrderTestResponse() {} @@ -128,14 +128,12 @@ public void setResult(@jakarta.annotation.Nullable OrderTestResponseResult resul } public OrderTestResponse rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public OrderTestResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + public OrderTestResponse addRateLimitsItem(PingResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -150,13 +148,12 @@ public OrderTestResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid PingResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -211,7 +208,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid PingResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -334,8 +331,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + PingResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResult.java index b18ec3055..f83d04aff 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResult.java @@ -52,13 +52,13 @@ public class OrderTestResponseResult extends BaseDTO { @SerializedName(SERIALIZED_NAME_SPECIAL_COMMISSION_FOR_ORDER) @jakarta.annotation.Nullable - private OrderTestResponseResultStandardCommissionForOrder specialCommissionForOrder; + private OrderTestResponseResultSpecialCommissionForOrder specialCommissionForOrder; public static final String SERIALIZED_NAME_TAX_COMMISSION_FOR_ORDER = "taxCommissionForOrder"; @SerializedName(SERIALIZED_NAME_TAX_COMMISSION_FOR_ORDER) @jakarta.annotation.Nullable - private OrderTestResponseResultStandardCommissionForOrder taxCommissionForOrder; + private OrderTestResponseResultTaxCommissionForOrder taxCommissionForOrder; public static final String SERIALIZED_NAME_DISCOUNT = "discount"; @@ -94,7 +94,7 @@ public void setStandardCommissionForOrder( public OrderTestResponseResult specialCommissionForOrder( @jakarta.annotation.Nullable - OrderTestResponseResultStandardCommissionForOrder specialCommissionForOrder) { + OrderTestResponseResultSpecialCommissionForOrder specialCommissionForOrder) { this.specialCommissionForOrder = specialCommissionForOrder; return this; } @@ -106,19 +106,19 @@ public OrderTestResponseResult specialCommissionForOrder( */ @jakarta.annotation.Nullable @Valid - public OrderTestResponseResultStandardCommissionForOrder getSpecialCommissionForOrder() { + public OrderTestResponseResultSpecialCommissionForOrder getSpecialCommissionForOrder() { return specialCommissionForOrder; } public void setSpecialCommissionForOrder( @jakarta.annotation.Nullable - OrderTestResponseResultStandardCommissionForOrder specialCommissionForOrder) { + OrderTestResponseResultSpecialCommissionForOrder specialCommissionForOrder) { this.specialCommissionForOrder = specialCommissionForOrder; } public OrderTestResponseResult taxCommissionForOrder( @jakarta.annotation.Nullable - OrderTestResponseResultStandardCommissionForOrder taxCommissionForOrder) { + OrderTestResponseResultTaxCommissionForOrder taxCommissionForOrder) { this.taxCommissionForOrder = taxCommissionForOrder; return this; } @@ -130,13 +130,13 @@ public OrderTestResponseResult taxCommissionForOrder( */ @jakarta.annotation.Nullable @Valid - public OrderTestResponseResultStandardCommissionForOrder getTaxCommissionForOrder() { + public OrderTestResponseResultTaxCommissionForOrder getTaxCommissionForOrder() { return taxCommissionForOrder; } public void setTaxCommissionForOrder( @jakarta.annotation.Nullable - OrderTestResponseResultStandardCommissionForOrder taxCommissionForOrder) { + OrderTestResponseResultTaxCommissionForOrder taxCommissionForOrder) { this.taxCommissionForOrder = taxCommissionForOrder; } @@ -219,14 +219,14 @@ public String toUrlQueryString() { JSON.getGson().toJson(standardCommissionForOrderValue); valMap.put("standardCommissionForOrder", standardCommissionForOrderValueAsString); } - OrderTestResponseResultStandardCommissionForOrder specialCommissionForOrderValue = + OrderTestResponseResultSpecialCommissionForOrder specialCommissionForOrderValue = getSpecialCommissionForOrder(); if (specialCommissionForOrderValue != null) { String specialCommissionForOrderValueAsString = JSON.getGson().toJson(specialCommissionForOrderValue); valMap.put("specialCommissionForOrder", specialCommissionForOrderValueAsString); } - OrderTestResponseResultStandardCommissionForOrder taxCommissionForOrderValue = + OrderTestResponseResultTaxCommissionForOrder taxCommissionForOrderValue = getTaxCommissionForOrder(); if (taxCommissionForOrderValue != null) { String taxCommissionForOrderValueAsString = @@ -339,13 +339,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `specialCommissionForOrder` if (jsonObj.get("specialCommissionForOrder") != null && !jsonObj.get("specialCommissionForOrder").isJsonNull()) { - OrderTestResponseResultStandardCommissionForOrder.validateJsonElement( + OrderTestResponseResultSpecialCommissionForOrder.validateJsonElement( jsonObj.get("specialCommissionForOrder")); } // validate the optional field `taxCommissionForOrder` if (jsonObj.get("taxCommissionForOrder") != null && !jsonObj.get("taxCommissionForOrder").isJsonNull()) { - OrderTestResponseResultStandardCommissionForOrder.validateJsonElement( + OrderTestResponseResultTaxCommissionForOrder.validateJsonElement( jsonObj.get("taxCommissionForOrder")); } // validate the optional field `discount` diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultDiscount.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultDiscount.java index 2d9725e47..33cb8643e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultDiscount.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultDiscount.java @@ -34,7 +34,7 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** OrderTestResponseResultDiscount */ +/** Discount on standard commissions when paying in BNB. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0") @@ -131,7 +131,7 @@ public OrderTestResponseResultDiscount discount(@jakarta.annotation.Nullable Str } /** - * Get discount + * Standard commission is reduced by this rate when paying commission in BNB. * * @return discount */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultSpecialCommissionForOrder.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultSpecialCommissionForOrder.java new file mode 100644 index 000000000..416e71e9c --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultSpecialCommissionForOrder.java @@ -0,0 +1,306 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** Special commission rates on trades from the order. */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class OrderTestResponseResultSpecialCommissionForOrder extends BaseDTO { + public static final String SERIALIZED_NAME_MAKER = "maker"; + + @SerializedName(SERIALIZED_NAME_MAKER) + @jakarta.annotation.Nullable + private String maker; + + public static final String SERIALIZED_NAME_TAKER = "taker"; + + @SerializedName(SERIALIZED_NAME_TAKER) + @jakarta.annotation.Nullable + private String taker; + + public OrderTestResponseResultSpecialCommissionForOrder() {} + + public OrderTestResponseResultSpecialCommissionForOrder maker( + @jakarta.annotation.Nullable String maker) { + this.maker = maker; + return this; + } + + /** + * Get maker + * + * @return maker + */ + @jakarta.annotation.Nullable + public String getMaker() { + return maker; + } + + public void setMaker(@jakarta.annotation.Nullable String maker) { + this.maker = maker; + } + + public OrderTestResponseResultSpecialCommissionForOrder taker( + @jakarta.annotation.Nullable String taker) { + this.taker = taker; + return this; + } + + /** + * Get taker + * + * @return taker + */ + @jakarta.annotation.Nullable + public String getTaker() { + return taker; + } + + public void setTaker(@jakarta.annotation.Nullable String taker) { + this.taker = taker; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderTestResponseResultSpecialCommissionForOrder + orderTestResponseResultSpecialCommissionForOrder = + (OrderTestResponseResultSpecialCommissionForOrder) o; + return Objects.equals(this.maker, orderTestResponseResultSpecialCommissionForOrder.maker) + && Objects.equals( + this.taker, orderTestResponseResultSpecialCommissionForOrder.taker); + } + + @Override + public int hashCode() { + return Objects.hash(maker, taker); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderTestResponseResultSpecialCommissionForOrder {\n"); + sb.append(" maker: ").append(toIndentedString(maker)).append("\n"); + sb.append(" taker: ").append(toIndentedString(taker)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String makerValue = getMaker(); + if (makerValue != null) { + String makerValueAsString = makerValue.toString(); + valMap.put("maker", makerValueAsString); + } + String takerValue = getTaker(); + if (takerValue != null) { + String takerValueAsString = takerValue.toString(); + valMap.put("taker", takerValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object makerValue = getMaker(); + if (makerValue != null) { + valMap.put("maker", makerValue); + } + Object takerValue = getTaker(); + if (takerValue != null) { + valMap.put("taker", takerValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * 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 "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("maker"); + openapiFields.add("taker"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * OrderTestResponseResultSpecialCommissionForOrder + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderTestResponseResultSpecialCommissionForOrder.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " OrderTestResponseResultSpecialCommissionForOrder is not" + + " found in the empty JSON string", + OrderTestResponseResultSpecialCommissionForOrder + .openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderTestResponseResultSpecialCommissionForOrder.openapiFields.contains( + entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `OrderTestResponseResultSpecialCommissionForOrder`" + + " properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("maker") != null && !jsonObj.get("maker").isJsonNull()) + && !jsonObj.get("maker").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `maker` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("maker").toString())); + } + if ((jsonObj.get("taker") != null && !jsonObj.get("taker").isJsonNull()) + && !jsonObj.get("taker").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `taker` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("taker").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderTestResponseResultSpecialCommissionForOrder.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'OrderTestResponseResultSpecialCommissionForOrder' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, + TypeToken.get(OrderTestResponseResultSpecialCommissionForOrder.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, + OrderTestResponseResultSpecialCommissionForOrder value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderTestResponseResultSpecialCommissionForOrder read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of OrderTestResponseResultSpecialCommissionForOrder given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderTestResponseResultSpecialCommissionForOrder + * @throws IOException if the JSON string is invalid with respect to + * OrderTestResponseResultSpecialCommissionForOrder + */ + public static OrderTestResponseResultSpecialCommissionForOrder fromJson(String jsonString) + throws IOException { + return JSON.getGson() + .fromJson(jsonString, OrderTestResponseResultSpecialCommissionForOrder.class); + } + + /** + * Convert an instance of OrderTestResponseResultSpecialCommissionForOrder to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultStandardCommissionForOrder.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultStandardCommissionForOrder.java index f2bce237a..7d3c03152 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultStandardCommissionForOrder.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultStandardCommissionForOrder.java @@ -34,7 +34,7 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** OrderTestResponseResultStandardCommissionForOrder */ +/** Standard commission rates on trades from the order. */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0") diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultTaxCommissionForOrder.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultTaxCommissionForOrder.java new file mode 100644 index 000000000..ee83c0324 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderTestResponseResultTaxCommissionForOrder.java @@ -0,0 +1,302 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** Tax commission rates for trades from the order. */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class OrderTestResponseResultTaxCommissionForOrder extends BaseDTO { + public static final String SERIALIZED_NAME_MAKER = "maker"; + + @SerializedName(SERIALIZED_NAME_MAKER) + @jakarta.annotation.Nullable + private String maker; + + public static final String SERIALIZED_NAME_TAKER = "taker"; + + @SerializedName(SERIALIZED_NAME_TAKER) + @jakarta.annotation.Nullable + private String taker; + + public OrderTestResponseResultTaxCommissionForOrder() {} + + public OrderTestResponseResultTaxCommissionForOrder maker( + @jakarta.annotation.Nullable String maker) { + this.maker = maker; + return this; + } + + /** + * Get maker + * + * @return maker + */ + @jakarta.annotation.Nullable + public String getMaker() { + return maker; + } + + public void setMaker(@jakarta.annotation.Nullable String maker) { + this.maker = maker; + } + + public OrderTestResponseResultTaxCommissionForOrder taker( + @jakarta.annotation.Nullable String taker) { + this.taker = taker; + return this; + } + + /** + * Get taker + * + * @return taker + */ + @jakarta.annotation.Nullable + public String getTaker() { + return taker; + } + + public void setTaker(@jakarta.annotation.Nullable String taker) { + this.taker = taker; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderTestResponseResultTaxCommissionForOrder orderTestResponseResultTaxCommissionForOrder = + (OrderTestResponseResultTaxCommissionForOrder) o; + return Objects.equals(this.maker, orderTestResponseResultTaxCommissionForOrder.maker) + && Objects.equals(this.taker, orderTestResponseResultTaxCommissionForOrder.taker); + } + + @Override + public int hashCode() { + return Objects.hash(maker, taker); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderTestResponseResultTaxCommissionForOrder {\n"); + sb.append(" maker: ").append(toIndentedString(maker)).append("\n"); + sb.append(" taker: ").append(toIndentedString(taker)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String makerValue = getMaker(); + if (makerValue != null) { + String makerValueAsString = makerValue.toString(); + valMap.put("maker", makerValueAsString); + } + String takerValue = getTaker(); + if (takerValue != null) { + String takerValueAsString = takerValue.toString(); + valMap.put("taker", takerValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object makerValue = getMaker(); + if (makerValue != null) { + valMap.put("maker", makerValue); + } + Object takerValue = getTaker(); + if (takerValue != null) { + valMap.put("taker", takerValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * 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 "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("maker"); + openapiFields.add("taker"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * OrderTestResponseResultTaxCommissionForOrder + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrderTestResponseResultTaxCommissionForOrder.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " OrderTestResponseResultTaxCommissionForOrder is not found" + + " in the empty JSON string", + OrderTestResponseResultTaxCommissionForOrder.openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrderTestResponseResultTaxCommissionForOrder.openapiFields.contains( + entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `OrderTestResponseResultTaxCommissionForOrder` properties." + + " JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("maker") != null && !jsonObj.get("maker").isJsonNull()) + && !jsonObj.get("maker").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `maker` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("maker").toString())); + } + if ((jsonObj.get("taker") != null && !jsonObj.get("taker").isJsonNull()) + && !jsonObj.get("taker").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `taker` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("taker").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrderTestResponseResultTaxCommissionForOrder.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes + // 'OrderTestResponseResultTaxCommissionForOrder' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, + TypeToken.get(OrderTestResponseResultTaxCommissionForOrder.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, OrderTestResponseResultTaxCommissionForOrder value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrderTestResponseResultTaxCommissionForOrder read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of OrderTestResponseResultTaxCommissionForOrder given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrderTestResponseResultTaxCommissionForOrder + * @throws IOException if the JSON string is invalid with respect to + * OrderTestResponseResultTaxCommissionForOrder + */ + public static OrderTestResponseResultTaxCommissionForOrder fromJson(String jsonString) + throws IOException { + return JSON.getGson() + .fromJson(jsonString, OrderTestResponseResultTaxCommissionForOrder.class); + } + + /** + * Convert an instance of OrderTestResponseResultTaxCommissionForOrder to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderType.java index 9187c2912..60ab11406 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/OrderType.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Please see [Enums](/products/spot/enums#ordertypes) for supported values. */ +/** Please see Enums for supported values. */ @JsonAdapter(OrderType.Adapter.class) public enum OrderType { MARKET("MARKET"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PegOffsetType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PegOffsetType.java index 3be87cd5e..5c21b14f7 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PegOffsetType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PegOffsetType.java @@ -21,9 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** - * Only `PRICE_LEVEL` is supported. See [Pegged Orders](/products/spot/faqs/pegged_orders) - */ +/** Only `PRICE_LEVEL` is supported. See Pegged Orders */ @JsonAdapter(PegOffsetType.Adapter.class) public enum PegOffsetType { PRICE_LEVEL("PRICE_LEVEL"); diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PegPriceType.java index a275fa18b..6f7a9532e 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PegPriceType.java @@ -21,10 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** - * `PRIMARY_PEG` or `MARKET_PEG`. See [Pegged - * Orders](/products/spot/faqs/pegged_orders) - */ +/** `PRIMARY_PEG` or `MARKET_PEG`. See Pegged Orders */ @JsonAdapter(PegPriceType.Adapter.class) public enum PegPriceType { PRIMARY_PEG("PRIMARY_PEG"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingAbovePegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingAbovePegPriceType.java index 3bd6c0dcb..23f286e10 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingAbovePegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingAbovePegPriceType.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** See [Pegged Orders](/products/spot/faqs/pegged_orders) */ +/** See Pegged Orders */ @JsonAdapter(PendingAbovePegPriceType.Adapter.class) public enum PendingAbovePegPriceType { PRIMARY_PEG("PRIMARY_PEG"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingBelowPegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingBelowPegPriceType.java index 0c065eb58..e2071f468 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingBelowPegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingBelowPegPriceType.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** See [Pegged Orders](/products/spot/faqs/pegged_orders) */ +/** See Pegged Orders */ @JsonAdapter(PendingBelowPegPriceType.Adapter.class) public enum PendingBelowPegPriceType { PRIMARY_PEG("PRIMARY_PEG"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingPegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingPegPriceType.java index 673f9db7f..996fbcf03 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingPegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingPegPriceType.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** See [Pegged Orders](/products/spot/faqs/pegged_orders) */ +/** See Pegged Orders */ @JsonAdapter(PendingPegPriceType.Adapter.class) public enum PendingPegPriceType { PRIMARY_PEG("PRIMARY_PEG"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingSide.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingSide.java index b40459668..f33925826 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingSide.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingSide.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Supported values: [Order Side](/products/spot/enums#side) */ +/** Supported values: Order Side */ @JsonAdapter(PendingSide.Adapter.class) public enum PendingSide { BUY("BUY"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingTimeInForce.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingTimeInForce.java index a5a553354..76c04bf4d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingTimeInForce.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingTimeInForce.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Supported values: [Time In Force](/products/spot/enums#timeinforce) */ +/** Supported values: Time In Force */ @JsonAdapter(PendingTimeInForce.Adapter.class) public enum PendingTimeInForce { GTC("GTC"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingType.java index 2b2f3669b..19d2b4346 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PendingType.java @@ -22,8 +22,8 @@ import org.hibernate.validator.constraints.*; /** - * Supported values: [Order Types](/products/spot/enums#ordertypes). Note that `MARKET` - * orders using `quoteOrderQty` are not supported. + * Supported values: Order Types. Note that `MARKET` orders using + * `quoteOrderQty` are not supported. */ @JsonAdapter(PendingType.Adapter.class) public enum PendingType { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PingResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PingResponse.java index bef6a0927..42465dc9a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PingResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PingResponse.java @@ -65,7 +65,7 @@ public class PingResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid PingResponseRateLimitsInner> rateLimits; public PingResponse() {} @@ -127,13 +127,12 @@ public void setResult(@jakarta.annotation.Nullable Object result) { } public PingResponse rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public PingResponse addRateLimitsItem(AccountCommissionResponseRateLimitsInner rateLimitsItem) { + public PingResponse addRateLimitsItem(PingResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -148,13 +147,12 @@ public PingResponse addRateLimitsItem(AccountCommissionResponseRateLimitsInner r */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid PingResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -209,7 +207,7 @@ public String toUrlQueryString() { String resultValueAsString = resultValue.toString(); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid PingResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -328,8 +326,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + PingResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PingResponseRateLimitsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PingResponseRateLimitsInner.java new file mode 100644 index 000000000..f6426ef5d --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/PingResponseRateLimitsInner.java @@ -0,0 +1,399 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** PingResponseRateLimitsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class PingResponseRateLimitsInner extends BaseDTO { + public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; + + @SerializedName(SERIALIZED_NAME_RATE_LIMIT_TYPE) + @jakarta.annotation.Nullable + private String rateLimitType; + + public static final String SERIALIZED_NAME_INTERVAL = "interval"; + + @SerializedName(SERIALIZED_NAME_INTERVAL) + @jakarta.annotation.Nullable + private String interval; + + public static final String SERIALIZED_NAME_INTERVAL_NUM = "intervalNum"; + + @SerializedName(SERIALIZED_NAME_INTERVAL_NUM) + @jakarta.annotation.Nullable + private Long intervalNum; + + public static final String SERIALIZED_NAME_LIMIT = "limit"; + + @SerializedName(SERIALIZED_NAME_LIMIT) + @jakarta.annotation.Nullable + private Long limit; + + public static final String SERIALIZED_NAME_COUNT = "count"; + + @SerializedName(SERIALIZED_NAME_COUNT) + @jakarta.annotation.Nullable + private Long count; + + public PingResponseRateLimitsInner() {} + + public PingResponseRateLimitsInner rateLimitType( + @jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + return this; + } + + /** + * Get rateLimitType + * + * @return rateLimitType + */ + @jakarta.annotation.Nullable + public String getRateLimitType() { + return rateLimitType; + } + + public void setRateLimitType(@jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + } + + public PingResponseRateLimitsInner interval(@jakarta.annotation.Nullable String interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * + * @return interval + */ + @jakarta.annotation.Nullable + public String getInterval() { + return interval; + } + + public void setInterval(@jakarta.annotation.Nullable String interval) { + this.interval = interval; + } + + public PingResponseRateLimitsInner intervalNum(@jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + return this; + } + + /** + * Get intervalNum + * + * @return intervalNum + */ + @jakarta.annotation.Nullable + public Long getIntervalNum() { + return intervalNum; + } + + public void setIntervalNum(@jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + } + + public PingResponseRateLimitsInner limit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + return this; + } + + /** + * Get limit + * + * @return limit + */ + @jakarta.annotation.Nullable + public Long getLimit() { + return limit; + } + + public void setLimit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + } + + public PingResponseRateLimitsInner count(@jakarta.annotation.Nullable Long count) { + this.count = count; + return this; + } + + /** + * Get count + * + * @return count + */ + @jakarta.annotation.Nullable + public Long getCount() { + return count; + } + + public void setCount(@jakarta.annotation.Nullable Long count) { + this.count = count; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PingResponseRateLimitsInner pingResponseRateLimitsInner = (PingResponseRateLimitsInner) o; + return Objects.equals(this.rateLimitType, pingResponseRateLimitsInner.rateLimitType) + && Objects.equals(this.interval, pingResponseRateLimitsInner.interval) + && Objects.equals(this.intervalNum, pingResponseRateLimitsInner.intervalNum) + && Objects.equals(this.limit, pingResponseRateLimitsInner.limit) + && Objects.equals(this.count, pingResponseRateLimitsInner.count); + } + + @Override + public int hashCode() { + return Objects.hash(rateLimitType, interval, intervalNum, limit, count); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PingResponseRateLimitsInner {\n"); + sb.append(" rateLimitType: ").append(toIndentedString(rateLimitType)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" intervalNum: ").append(toIndentedString(intervalNum)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + String rateLimitTypeValueAsString = rateLimitTypeValue.toString(); + valMap.put("rateLimitType", rateLimitTypeValueAsString); + } + String intervalValue = getInterval(); + if (intervalValue != null) { + String intervalValueAsString = intervalValue.toString(); + valMap.put("interval", intervalValueAsString); + } + Long intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + String intervalNumValueAsString = intervalNumValue.toString(); + valMap.put("intervalNum", intervalNumValueAsString); + } + Long limitValue = getLimit(); + if (limitValue != null) { + String limitValueAsString = limitValue.toString(); + valMap.put("limit", limitValueAsString); + } + Long countValue = getCount(); + if (countValue != null) { + String countValueAsString = countValue.toString(); + valMap.put("count", countValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + valMap.put("rateLimitType", rateLimitTypeValue); + } + Object intervalValue = getInterval(); + if (intervalValue != null) { + valMap.put("interval", intervalValue); + } + Object intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + valMap.put("intervalNum", intervalNumValue); + } + Object limitValue = getLimit(); + if (limitValue != null) { + valMap.put("limit", limitValue); + } + Object countValue = getCount(); + if (countValue != null) { + valMap.put("count", countValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * 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 "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("rateLimitType"); + openapiFields.add("interval"); + openapiFields.add("intervalNum"); + openapiFields.add("limit"); + openapiFields.add("count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * PingResponseRateLimitsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PingResponseRateLimitsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in PingResponseRateLimitsInner is not" + + " found in the empty JSON string", + PingResponseRateLimitsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PingResponseRateLimitsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `PingResponseRateLimitsInner` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("rateLimitType") != null && !jsonObj.get("rateLimitType").isJsonNull()) + && !jsonObj.get("rateLimitType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateLimitType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("rateLimitType").toString())); + } + if ((jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) + && !jsonObj.get("interval").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `interval` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("interval").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PingResponseRateLimitsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PingResponseRateLimitsInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(PingResponseRateLimitsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PingResponseRateLimitsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PingResponseRateLimitsInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of PingResponseRateLimitsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of PingResponseRateLimitsInner + * @throws IOException if the JSON string is invalid with respect to PingResponseRateLimitsInner + */ + public static PingResponseRateLimitsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PingResponseRateLimitsInner.class); + } + + /** + * Convert an instance of PingResponseRateLimitsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceCalculationResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceCalculationResponse.java index 993e9f097..f1b7bf6cb 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceCalculationResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceCalculationResponse.java @@ -65,7 +65,7 @@ public class ReferencePriceCalculationResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid AvgPriceResponseRateLimitsInner> rateLimits; public ReferencePriceCalculationResponse() {} @@ -130,14 +130,13 @@ public void setResult( } public ReferencePriceCalculationResponse rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid AvgPriceResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public ReferencePriceCalculationResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + AvgPriceResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -152,13 +151,12 @@ public ReferencePriceCalculationResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid AvgPriceResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid AvgPriceResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -214,7 +212,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid AvgPriceResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -339,8 +337,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + AvgPriceResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponse.java index 0bd336ebd..d8b6c9d83 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponse.java @@ -12,271 +12,224 @@ package com.binance.connector.client.spot.websocket.api.model; -import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.common.AbstractOpenApiSchema; import com.binance.connector.client.spot.websocket.api.JSON; import com.google.gson.Gson; -import com.google.gson.JsonArray; import com.google.gson.JsonElement; -import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; -import java.nio.charset.StandardCharsets; import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; +import java.util.HashMap; import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; +import java.util.logging.Level; +import java.util.logging.Logger; import org.hibernate.validator.constraints.*; -/** ReferencePriceResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0") -public class ReferencePriceResponse extends BaseDTO { - public static final String SERIALIZED_NAME_ID = "id"; +public class ReferencePriceResponse extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(ReferencePriceResponse.class.getName()); - @SerializedName(SERIALIZED_NAME_ID) - @jakarta.annotation.Nullable - private String id; - - public static final String SERIALIZED_NAME_STATUS = "status"; - - @SerializedName(SERIALIZED_NAME_STATUS) - @jakarta.annotation.Nullable - private Long status; - - public static final String SERIALIZED_NAME_RESULT = "result"; + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ReferencePriceResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReferencePriceResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterReferencePriceResponse1 = + gson.getDelegateAdapter(this, TypeToken.get(ReferencePriceResponse1.class)); + final TypeAdapter adapterReferencePriceResponse2 = + gson.getDelegateAdapter(this, TypeToken.get(ReferencePriceResponse2.class)); - @SerializedName(SERIALIZED_NAME_RESULT) - @jakarta.annotation.Nullable - private ReferencePriceResponseResult result; + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ReferencePriceResponse value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `ReferencePriceResponse1` + if (value.getActualInstance() instanceof ReferencePriceResponse1) { + JsonElement element = + adapterReferencePriceResponse1.toJsonTree( + (ReferencePriceResponse1) + value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `ReferencePriceResponse2` + if (value.getActualInstance() instanceof ReferencePriceResponse2) { + JsonElement element = + adapterReferencePriceResponse2.toJsonTree( + (ReferencePriceResponse2) + value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas:" + + " ReferencePriceResponse1, ReferencePriceResponse2"); + } - public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; + @Override + public ReferencePriceResponse read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); - @SerializedName(SERIALIZED_NAME_RATE_LIMITS) - @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize ReferencePriceResponse1 + try { + // validate the JSON object to see if any exception is thrown + ReferencePriceResponse1.validateJsonElement(jsonElement); + actualAdapter = adapterReferencePriceResponse1; + match++; + log.log( + Level.FINER, + "Input data matches schema 'ReferencePriceResponse1'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for ReferencePriceResponse1 failed" + + " with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema" + + " 'ReferencePriceResponse1'", + e); + } + // deserialize ReferencePriceResponse2 + try { + // validate the JSON object to see if any exception is thrown + ReferencePriceResponse2.validateJsonElement(jsonElement); + actualAdapter = adapterReferencePriceResponse2; + match++; + log.log( + Level.FINER, + "Input data matches schema 'ReferencePriceResponse2'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for ReferencePriceResponse2 failed" + + " with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema" + + " 'ReferencePriceResponse2'", + e); + } + + if (match == 1) { + ReferencePriceResponse ret = new ReferencePriceResponse(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + "Failed deserialization for ReferencePriceResponse: %d" + + " classes match result, expected 1. Detailed" + + " failure message for oneOf schemas: %s. JSON:" + + " %s", + match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } - public ReferencePriceResponse() {} + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); - public ReferencePriceResponse id(@jakarta.annotation.Nullable String id) { - this.id = id; - return this; + public ReferencePriceResponse() { + super("oneOf", Boolean.FALSE); } - /** - * Get id - * - * @return id - */ - @jakarta.annotation.Nullable - public String getId() { - return id; + public ReferencePriceResponse(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - public void setId(@jakarta.annotation.Nullable String id) { - this.id = id; + static { + schemas.put("ReferencePriceResponse1", ReferencePriceResponse1.class); + schemas.put("ReferencePriceResponse2", ReferencePriceResponse2.class); } - public ReferencePriceResponse status(@jakarta.annotation.Nullable Long status) { - this.status = status; - return this; + @Override + public Map> getSchemas() { + return ReferencePriceResponse.schemas; } /** - * Get status + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: ReferencePriceResponse1, ReferencePriceResponse2 * - * @return status + *

It could be an instance of the 'oneOf' schemas. */ - @jakarta.annotation.Nullable - public Long getStatus() { - return status; - } + @Override + public void setActualInstance(Object instance) { + if (instance instanceof ReferencePriceResponse1) { + super.setActualInstance(instance); + return; + } - public void setStatus(@jakarta.annotation.Nullable Long status) { - this.status = status; - } + if (instance instanceof ReferencePriceResponse2) { + super.setActualInstance(instance); + return; + } - public ReferencePriceResponse result( - @jakarta.annotation.Nullable ReferencePriceResponseResult result) { - this.result = result; - return this; + throw new RuntimeException( + "Invalid instance type. Must be ReferencePriceResponse1, ReferencePriceResponse2"); } /** - * Get result + * Get the actual instance, which can be the following: ReferencePriceResponse1, + * ReferencePriceResponse2 * - * @return result + * @return The actual instance (ReferencePriceResponse1, ReferencePriceResponse2) */ - @jakarta.annotation.Nullable - @Valid - public ReferencePriceResponseResult getResult() { - return result; - } - - public void setResult(@jakarta.annotation.Nullable ReferencePriceResponseResult result) { - this.result = result; - } - - public ReferencePriceResponse rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { - this.rateLimits = rateLimits; - return this; - } - - public ReferencePriceResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { - if (this.rateLimits == null) { - this.rateLimits = new ArrayList<>(); - } - this.rateLimits.add(rateLimitsItem); - return this; + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); } /** - * Get rateLimits + * Get the actual instance of `ReferencePriceResponse1`. If the actual instance is not + * `ReferencePriceResponse1`, the ClassCastException will be thrown. * - * @return rateLimits + * @return The actual instance of `ReferencePriceResponse1` + * @throws ClassCastException if the instance is not `ReferencePriceResponse1` */ - @jakarta.annotation.Nullable - @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { - return rateLimits; - } - - public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { - this.rateLimits = rateLimits; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReferencePriceResponse referencePriceResponse = (ReferencePriceResponse) o; - return Objects.equals(this.id, referencePriceResponse.id) - && Objects.equals(this.status, referencePriceResponse.status) - && Objects.equals(this.result, referencePriceResponse.result) - && Objects.equals(this.rateLimits, referencePriceResponse.rateLimits); - } - - @Override - public int hashCode() { - return Objects.hash(id, status, result, rateLimits); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReferencePriceResponse {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" result: ").append(toIndentedString(result)).append("\n"); - sb.append(" rateLimits: ").append(toIndentedString(rateLimits)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String idValue = getId(); - if (idValue != null) { - String idValueAsString = idValue.toString(); - valMap.put("id", idValueAsString); - } - Long statusValue = getStatus(); - if (statusValue != null) { - String statusValueAsString = statusValue.toString(); - valMap.put("status", statusValueAsString); - } - ReferencePriceResponseResult resultValue = getResult(); - if (resultValue != null) { - String resultValueAsString = JSON.getGson().toJson(resultValue); - valMap.put("result", resultValueAsString); - } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); - if (rateLimitsValue != null) { - String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); - valMap.put("rateLimits", rateLimitsValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object idValue = getId(); - if (idValue != null) { - valMap.put("id", idValue); - } - Object statusValue = getStatus(); - if (statusValue != null) { - valMap.put("status", statusValue); - } - Object resultValue = getResult(); - if (resultValue != null) { - valMap.put("result", resultValue); - } - Object rateLimitsValue = getRateLimits(); - if (rateLimitsValue != null) { - valMap.put("rateLimits", rateLimitsValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); + public ReferencePriceResponse1 getReferencePriceResponse1() throws ClassCastException { + return (ReferencePriceResponse1) super.getActualInstance(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). + * Get the actual instance of `ReferencePriceResponse2`. If the actual instance is not + * `ReferencePriceResponse2`, the ClassCastException will be thrown. + * + * @return The actual instance of `ReferencePriceResponse2` + * @throws ClassCastException if the instance is not `ReferencePriceResponse2` */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("status"); - openapiFields.add("result"); - openapiFields.add("rateLimits"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + public ReferencePriceResponse2 getReferencePriceResponse2() throws ClassCastException { + return (ReferencePriceResponse2) super.getActualInstance(); } /** @@ -286,90 +239,39 @@ private String toIndentedString(Object o) { * @throws IOException if the JSON Element is invalid with respect to ReferencePriceResponse */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReferencePriceResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in ReferencePriceResponse is not found in" - + " the empty JSON string", - ReferencePriceResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReferencePriceResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `ReferencePriceResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) - && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with ReferencePriceResponse1 + try { + ReferencePriceResponse1.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); - } - // validate the optional field `result` - if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { - ReferencePriceResponseResult.validateJsonElement(jsonObj.get("result")); + "Deserialization for ReferencePriceResponse1 failed with `%s`.", + e.getMessage())); + // continue to the next one } - if (jsonObj.get("rateLimits") != null && !jsonObj.get("rateLimits").isJsonNull()) { - JsonArray jsonArrayrateLimits = jsonObj.getAsJsonArray("rateLimits"); - if (jsonArrayrateLimits != null) { - // ensure the json data is an array - if (!jsonObj.get("rateLimits").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `rateLimits` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("rateLimits").toString())); - } - - // validate the optional field `rateLimits` (array) - for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); - } - ; - } + // validate the json string with ReferencePriceResponse2 + try { + ReferencePriceResponse2.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for ReferencePriceResponse2 failed with `%s`.", + e.getMessage())); + // continue to the next one } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReferencePriceResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReferencePriceResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ReferencePriceResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ReferencePriceResponse value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReferencePriceResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); + if (validCount != 1) { + throw new IOException( + String.format( + "The JSON string is invalid for ReferencePriceResponse with oneOf" + + " schemas: ReferencePriceResponse1, ReferencePriceResponse2. %d" + + " class(es) match the result, expected 1. Detailed failure" + + " message for oneOf schemas: %s. JSON: %s", + validCount, errorMessages, jsonElement.toString())); } } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponse1.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponse1.java new file mode 100644 index 000000000..76caa8929 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponse1.java @@ -0,0 +1,393 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** ReferencePriceResponse1 */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ReferencePriceResponse1 extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @jakarta.annotation.Nullable + private Long status; + + public static final String SERIALIZED_NAME_RESULT = "result"; + + @SerializedName(SERIALIZED_NAME_RESULT) + @jakarta.annotation.Nullable + private ReferencePriceResponse1Result result; + + public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; + + @SerializedName(SERIALIZED_NAME_RATE_LIMITS) + @jakarta.annotation.Nullable + private List<@Valid AvgPriceResponseRateLimitsInner> rateLimits; + + public ReferencePriceResponse1() {} + + public ReferencePriceResponse1 id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + public ReferencePriceResponse1 status(@jakarta.annotation.Nullable Long status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nullable + public Long getStatus() { + return status; + } + + public void setStatus(@jakarta.annotation.Nullable Long status) { + this.status = status; + } + + public ReferencePriceResponse1 result( + @jakarta.annotation.Nullable ReferencePriceResponse1Result result) { + this.result = result; + return this; + } + + /** + * Get result + * + * @return result + */ + @jakarta.annotation.Nullable + @Valid + public ReferencePriceResponse1Result getResult() { + return result; + } + + public void setResult(@jakarta.annotation.Nullable ReferencePriceResponse1Result result) { + this.result = result; + } + + public ReferencePriceResponse1 rateLimits( + @jakarta.annotation.Nullable List<@Valid AvgPriceResponseRateLimitsInner> rateLimits) { + this.rateLimits = rateLimits; + return this; + } + + public ReferencePriceResponse1 addRateLimitsItem( + AvgPriceResponseRateLimitsInner rateLimitsItem) { + if (this.rateLimits == null) { + this.rateLimits = new ArrayList<>(); + } + this.rateLimits.add(rateLimitsItem); + return this; + } + + /** + * Get rateLimits + * + * @return rateLimits + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid AvgPriceResponseRateLimitsInner> getRateLimits() { + return rateLimits; + } + + public void setRateLimits( + @jakarta.annotation.Nullable List<@Valid AvgPriceResponseRateLimitsInner> rateLimits) { + this.rateLimits = rateLimits; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReferencePriceResponse1 referencePriceResponse1 = (ReferencePriceResponse1) o; + return Objects.equals(this.id, referencePriceResponse1.id) + && Objects.equals(this.status, referencePriceResponse1.status) + && Objects.equals(this.result, referencePriceResponse1.result) + && Objects.equals(this.rateLimits, referencePriceResponse1.rateLimits); + } + + @Override + public int hashCode() { + return Objects.hash(id, status, result, rateLimits); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReferencePriceResponse1 {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" rateLimits: ").append(toIndentedString(rateLimits)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + Long statusValue = getStatus(); + if (statusValue != null) { + String statusValueAsString = statusValue.toString(); + valMap.put("status", statusValueAsString); + } + ReferencePriceResponse1Result resultValue = getResult(); + if (resultValue != null) { + String resultValueAsString = JSON.getGson().toJson(resultValue); + valMap.put("result", resultValueAsString); + } + List<@Valid AvgPriceResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + if (rateLimitsValue != null) { + String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); + valMap.put("rateLimits", rateLimitsValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + Object statusValue = getStatus(); + if (statusValue != null) { + valMap.put("status", statusValue); + } + Object resultValue = getResult(); + if (resultValue != null) { + valMap.put("result", resultValue); + } + Object rateLimitsValue = getRateLimits(); + if (rateLimitsValue != null) { + valMap.put("rateLimits", rateLimitsValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * 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 "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("status"); + openapiFields.add("result"); + openapiFields.add("rateLimits"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ReferencePriceResponse1 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ReferencePriceResponse1.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ReferencePriceResponse1 is not found" + + " in the empty JSON string", + ReferencePriceResponse1.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ReferencePriceResponse1.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ReferencePriceResponse1` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + // validate the optional field `result` + if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { + ReferencePriceResponse1Result.validateJsonElement(jsonObj.get("result")); + } + if (jsonObj.get("rateLimits") != null && !jsonObj.get("rateLimits").isJsonNull()) { + JsonArray jsonArrayrateLimits = jsonObj.getAsJsonArray("rateLimits"); + if (jsonArrayrateLimits != null) { + // ensure the json data is an array + if (!jsonObj.get("rateLimits").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateLimits` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("rateLimits").toString())); + } + + // validate the optional field `rateLimits` (array) + for (int i = 0; i < jsonArrayrateLimits.size(); i++) { + AvgPriceResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ReferencePriceResponse1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReferencePriceResponse1' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ReferencePriceResponse1.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ReferencePriceResponse1 value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ReferencePriceResponse1 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ReferencePriceResponse1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReferencePriceResponse1 + * @throws IOException if the JSON string is invalid with respect to ReferencePriceResponse1 + */ + public static ReferencePriceResponse1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReferencePriceResponse1.class); + } + + /** + * Convert an instance of ReferencePriceResponse1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponse1Result.java similarity index 83% rename from clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponseResult.java rename to clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponse1Result.java index 44f734f69..5b9f81f29 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponse1Result.java @@ -34,11 +34,11 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** ReferencePriceResponseResult */ +/** ReferencePriceResponse1Result */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0") -public class ReferencePriceResponseResult extends BaseDTO { +public class ReferencePriceResponse1Result extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -69,9 +69,9 @@ public class ReferencePriceResponseResult extends BaseDTO { @jakarta.annotation.Nullable private String msg; - public ReferencePriceResponseResult() {} + public ReferencePriceResponse1Result() {} - public ReferencePriceResponseResult symbol(@jakarta.annotation.Nullable String symbol) { + public ReferencePriceResponse1Result symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } @@ -90,7 +90,7 @@ public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } - public ReferencePriceResponseResult referencePrice( + public ReferencePriceResponse1Result referencePrice( @jakarta.annotation.Nullable String referencePrice) { this.referencePrice = referencePrice; return this; @@ -110,7 +110,7 @@ public void setReferencePrice(@jakarta.annotation.Nullable String referencePrice this.referencePrice = referencePrice; } - public ReferencePriceResponseResult timestamp(@jakarta.annotation.Nullable String timestamp) { + public ReferencePriceResponse1Result timestamp(@jakarta.annotation.Nullable String timestamp) { this.timestamp = timestamp; return this; } @@ -129,7 +129,7 @@ public void setTimestamp(@jakarta.annotation.Nullable String timestamp) { this.timestamp = timestamp; } - public ReferencePriceResponseResult code(@jakarta.annotation.Nullable Long code) { + public ReferencePriceResponse1Result code(@jakarta.annotation.Nullable Long code) { this.code = code; return this; } @@ -148,7 +148,7 @@ public void setCode(@jakarta.annotation.Nullable Long code) { this.code = code; } - public ReferencePriceResponseResult msg(@jakarta.annotation.Nullable String msg) { + public ReferencePriceResponse1Result msg(@jakarta.annotation.Nullable String msg) { this.msg = msg; return this; } @@ -175,13 +175,13 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ReferencePriceResponseResult referencePriceResponseResult = - (ReferencePriceResponseResult) o; - return Objects.equals(this.symbol, referencePriceResponseResult.symbol) - && Objects.equals(this.referencePrice, referencePriceResponseResult.referencePrice) - && Objects.equals(this.timestamp, referencePriceResponseResult.timestamp) - && Objects.equals(this.code, referencePriceResponseResult.code) - && Objects.equals(this.msg, referencePriceResponseResult.msg); + ReferencePriceResponse1Result referencePriceResponse1Result = + (ReferencePriceResponse1Result) o; + return Objects.equals(this.symbol, referencePriceResponse1Result.symbol) + && Objects.equals(this.referencePrice, referencePriceResponse1Result.referencePrice) + && Objects.equals(this.timestamp, referencePriceResponse1Result.timestamp) + && Objects.equals(this.code, referencePriceResponse1Result.code) + && Objects.equals(this.msg, referencePriceResponse1Result.msg); } @Override @@ -192,7 +192,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ReferencePriceResponseResult {\n"); + sb.append("class ReferencePriceResponse1Result {\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" referencePrice: ").append(toIndentedString(referencePrice)).append("\n"); sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); @@ -303,28 +303,28 @@ private String toIndentedString(Object o) { * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to - * ReferencePriceResponseResult + * ReferencePriceResponse1Result */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!ReferencePriceResponseResult.openapiRequiredFields + if (!ReferencePriceResponse1Result.openapiRequiredFields .isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException( String.format( - "The required field(s) %s in ReferencePriceResponseResult is not" + "The required field(s) %s in ReferencePriceResponse1Result is not" + " found in the empty JSON string", - ReferencePriceResponseResult.openapiRequiredFields.toString())); + ReferencePriceResponse1Result.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!ReferencePriceResponseResult.openapiFields.contains(entry.getKey())) { + if (!ReferencePriceResponse1Result.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException( String.format( "The field `%s` in the JSON string is not defined in the" - + " `ReferencePriceResponseResult` properties. JSON: %s", + + " `ReferencePriceResponse1Result` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } @@ -345,6 +345,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("referencePrice").toString())); } + if ((jsonObj.get("timestamp") != null && !jsonObj.get("timestamp").isJsonNull()) + && !jsonObj.get("timestamp").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `timestamp` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("timestamp").toString())); + } if ((jsonObj.get("msg") != null && !jsonObj.get("msg").isJsonNull()) && !jsonObj.get("msg").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -359,26 +367,27 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReferencePriceResponseResult.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReferencePriceResponseResult' and its + if (!ReferencePriceResponse1Result.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReferencePriceResponse1Result' and its // subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = + final TypeAdapter thisAdapter = gson.getDelegateAdapter( - this, TypeToken.get(ReferencePriceResponseResult.class)); + this, TypeToken.get(ReferencePriceResponse1Result.class)); return (TypeAdapter) - new TypeAdapter() { + new TypeAdapter() { @Override - public void write(JsonWriter out, ReferencePriceResponseResult value) + public void write(JsonWriter out, ReferencePriceResponse1Result value) throws IOException { JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ReferencePriceResponseResult read(JsonReader in) throws IOException { + public ReferencePriceResponse1Result read(JsonReader in) + throws IOException { JsonElement jsonElement = elementAdapter.read(in); // validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -388,19 +397,19 @@ public ReferencePriceResponseResult read(JsonReader in) throws IOException { } /** - * Create an instance of ReferencePriceResponseResult given an JSON string + * Create an instance of ReferencePriceResponse1Result given an JSON string * * @param jsonString JSON string - * @return An instance of ReferencePriceResponseResult + * @return An instance of ReferencePriceResponse1Result * @throws IOException if the JSON string is invalid with respect to - * ReferencePriceResponseResult + * ReferencePriceResponse1Result */ - public static ReferencePriceResponseResult fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReferencePriceResponseResult.class); + public static ReferencePriceResponse1Result fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReferencePriceResponse1Result.class); } /** - * Convert an instance of ReferencePriceResponseResult to an JSON string + * Convert an instance of ReferencePriceResponse1Result to an JSON string * * @return JSON string */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponse2.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponse2.java new file mode 100644 index 000000000..0678fcac3 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponse2.java @@ -0,0 +1,393 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** If no reference price is set: */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ReferencePriceResponse2 extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @jakarta.annotation.Nullable + private Long status; + + public static final String SERIALIZED_NAME_RESULT = "result"; + + @SerializedName(SERIALIZED_NAME_RESULT) + @jakarta.annotation.Nullable + private ReferencePriceResponse2Result result; + + public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; + + @SerializedName(SERIALIZED_NAME_RATE_LIMITS) + @jakarta.annotation.Nullable + private List<@Valid AvgPriceResponseRateLimitsInner> rateLimits; + + public ReferencePriceResponse2() {} + + public ReferencePriceResponse2 id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + public ReferencePriceResponse2 status(@jakarta.annotation.Nullable Long status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nullable + public Long getStatus() { + return status; + } + + public void setStatus(@jakarta.annotation.Nullable Long status) { + this.status = status; + } + + public ReferencePriceResponse2 result( + @jakarta.annotation.Nullable ReferencePriceResponse2Result result) { + this.result = result; + return this; + } + + /** + * Get result + * + * @return result + */ + @jakarta.annotation.Nullable + @Valid + public ReferencePriceResponse2Result getResult() { + return result; + } + + public void setResult(@jakarta.annotation.Nullable ReferencePriceResponse2Result result) { + this.result = result; + } + + public ReferencePriceResponse2 rateLimits( + @jakarta.annotation.Nullable List<@Valid AvgPriceResponseRateLimitsInner> rateLimits) { + this.rateLimits = rateLimits; + return this; + } + + public ReferencePriceResponse2 addRateLimitsItem( + AvgPriceResponseRateLimitsInner rateLimitsItem) { + if (this.rateLimits == null) { + this.rateLimits = new ArrayList<>(); + } + this.rateLimits.add(rateLimitsItem); + return this; + } + + /** + * Get rateLimits + * + * @return rateLimits + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid AvgPriceResponseRateLimitsInner> getRateLimits() { + return rateLimits; + } + + public void setRateLimits( + @jakarta.annotation.Nullable List<@Valid AvgPriceResponseRateLimitsInner> rateLimits) { + this.rateLimits = rateLimits; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReferencePriceResponse2 referencePriceResponse2 = (ReferencePriceResponse2) o; + return Objects.equals(this.id, referencePriceResponse2.id) + && Objects.equals(this.status, referencePriceResponse2.status) + && Objects.equals(this.result, referencePriceResponse2.result) + && Objects.equals(this.rateLimits, referencePriceResponse2.rateLimits); + } + + @Override + public int hashCode() { + return Objects.hash(id, status, result, rateLimits); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReferencePriceResponse2 {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" rateLimits: ").append(toIndentedString(rateLimits)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + Long statusValue = getStatus(); + if (statusValue != null) { + String statusValueAsString = statusValue.toString(); + valMap.put("status", statusValueAsString); + } + ReferencePriceResponse2Result resultValue = getResult(); + if (resultValue != null) { + String resultValueAsString = JSON.getGson().toJson(resultValue); + valMap.put("result", resultValueAsString); + } + List<@Valid AvgPriceResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + if (rateLimitsValue != null) { + String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); + valMap.put("rateLimits", rateLimitsValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + Object statusValue = getStatus(); + if (statusValue != null) { + valMap.put("status", statusValue); + } + Object resultValue = getResult(); + if (resultValue != null) { + valMap.put("result", resultValue); + } + Object rateLimitsValue = getRateLimits(); + if (rateLimitsValue != null) { + valMap.put("rateLimits", rateLimitsValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * 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 "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("status"); + openapiFields.add("result"); + openapiFields.add("rateLimits"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ReferencePriceResponse2 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ReferencePriceResponse2.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ReferencePriceResponse2 is not found" + + " in the empty JSON string", + ReferencePriceResponse2.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ReferencePriceResponse2.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ReferencePriceResponse2` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + // validate the optional field `result` + if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { + ReferencePriceResponse2Result.validateJsonElement(jsonObj.get("result")); + } + if (jsonObj.get("rateLimits") != null && !jsonObj.get("rateLimits").isJsonNull()) { + JsonArray jsonArrayrateLimits = jsonObj.getAsJsonArray("rateLimits"); + if (jsonArrayrateLimits != null) { + // ensure the json data is an array + if (!jsonObj.get("rateLimits").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateLimits` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("rateLimits").toString())); + } + + // validate the optional field `rateLimits` (array) + for (int i = 0; i < jsonArrayrateLimits.size(); i++) { + AvgPriceResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ReferencePriceResponse2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReferencePriceResponse2' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ReferencePriceResponse2.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ReferencePriceResponse2 value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ReferencePriceResponse2 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ReferencePriceResponse2 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReferencePriceResponse2 + * @throws IOException if the JSON string is invalid with respect to ReferencePriceResponse2 + */ + public static ReferencePriceResponse2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReferencePriceResponse2.class); + } + + /** + * Convert an instance of ReferencePriceResponse2 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponse2Result.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponse2Result.java new file mode 100644 index 000000000..f82ad3553 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/ReferencePriceResponse2Result.java @@ -0,0 +1,347 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; +import org.openapitools.jackson.nullable.JsonNullable; + +/** ReferencePriceResponse2Result */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class ReferencePriceResponse2Result extends BaseDTO { + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public static final String SERIALIZED_NAME_REFERENCE_PRICE = "referencePrice"; + + @SerializedName(SERIALIZED_NAME_REFERENCE_PRICE) + @jakarta.annotation.Nullable + private Object referencePrice; + + public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp"; + + @SerializedName(SERIALIZED_NAME_TIMESTAMP) + @jakarta.annotation.Nullable + private String timestamp; + + public ReferencePriceResponse2Result() {} + + public ReferencePriceResponse2Result symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Get symbol + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + public ReferencePriceResponse2Result referencePrice( + @jakarta.annotation.Nullable Object referencePrice) { + this.referencePrice = referencePrice; + return this; + } + + /** + * Get referencePrice + * + * @return referencePrice + */ + @jakarta.annotation.Nullable + public Object getReferencePrice() { + return referencePrice; + } + + public void setReferencePrice(@jakarta.annotation.Nullable Object referencePrice) { + this.referencePrice = referencePrice; + } + + public ReferencePriceResponse2Result timestamp(@jakarta.annotation.Nullable String timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Timestamp when the reference price was valid + * + * @return timestamp + */ + @jakarta.annotation.Nullable + public String getTimestamp() { + return timestamp; + } + + public void setTimestamp(@jakarta.annotation.Nullable String timestamp) { + this.timestamp = timestamp; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReferencePriceResponse2Result referencePriceResponse2Result = + (ReferencePriceResponse2Result) o; + return Objects.equals(this.symbol, referencePriceResponse2Result.symbol) + && Objects.equals(this.referencePrice, referencePriceResponse2Result.referencePrice) + && Objects.equals(this.timestamp, referencePriceResponse2Result.timestamp); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(symbol, referencePrice, timestamp); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReferencePriceResponse2Result {\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" referencePrice: ").append(toIndentedString(referencePrice)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String symbolValue = getSymbol(); + if (symbolValue != null) { + String symbolValueAsString = symbolValue.toString(); + valMap.put("symbol", symbolValueAsString); + } + Object referencePriceValue = getReferencePrice(); + if (referencePriceValue != null) { + String referencePriceValueAsString = referencePriceValue.toString(); + valMap.put("referencePrice", referencePriceValueAsString); + } + String timestampValue = getTimestamp(); + if (timestampValue != null) { + String timestampValueAsString = timestampValue.toString(); + valMap.put("timestamp", timestampValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object symbolValue = getSymbol(); + if (symbolValue != null) { + valMap.put("symbol", symbolValue); + } + Object referencePriceValue = getReferencePrice(); + if (referencePriceValue != null) { + valMap.put("referencePrice", referencePriceValue); + } + Object timestampValue = getTimestamp(); + if (timestampValue != null) { + valMap.put("timestamp", timestampValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * 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 "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("symbol"); + openapiFields.add("referencePrice"); + openapiFields.add("timestamp"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * ReferencePriceResponse2Result + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ReferencePriceResponse2Result.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in ReferencePriceResponse2Result is not" + + " found in the empty JSON string", + ReferencePriceResponse2Result.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ReferencePriceResponse2Result.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `ReferencePriceResponse2Result` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + if ((jsonObj.get("timestamp") != null && !jsonObj.get("timestamp").isJsonNull()) + && !jsonObj.get("timestamp").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `timestamp` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("timestamp").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ReferencePriceResponse2Result.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReferencePriceResponse2Result' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(ReferencePriceResponse2Result.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ReferencePriceResponse2Result value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ReferencePriceResponse2Result read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of ReferencePriceResponse2Result given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReferencePriceResponse2Result + * @throws IOException if the JSON string is invalid with respect to + * ReferencePriceResponse2Result + */ + public static ReferencePriceResponse2Result fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReferencePriceResponse2Result.class); + } + + /** + * Convert an instance of ReferencePriceResponse2Result to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SelfTradePreventionMode.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SelfTradePreventionMode.java index 4dfc4fe0f..4385ac4a3 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SelfTradePreventionMode.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SelfTradePreventionMode.java @@ -22,8 +22,7 @@ import org.hibernate.validator.constraints.*; /** - * The allowed enums is dependent on what is configured on the symbol. Supported values: [STP - * Modes](/products/spot/enums#stpmodes) + * The allowed enums is dependent on what is configured on the symbol. Supported values: STP Modes */ @JsonAdapter(SelfTradePreventionMode.Adapter.class) public enum SelfTradePreventionMode { diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionStatusResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionStatusResponseResult.java index b4e06aed8..cf81b2756 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionStatusResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SessionStatusResponseResult.java @@ -83,7 +83,7 @@ public SessionStatusResponseResult apiKey(@jakarta.annotation.Nullable String ap } /** - * Get apiKey + * `null` if the connection is not authenticated. * * @return apiKey */ @@ -103,7 +103,7 @@ public SessionStatusResponseResult authorizedSince( } /** - * Get authorizedSince + * `null` if the connection is not authenticated. * * @return authorizedSince */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Side.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Side.java index 3ce8a259f..f1aa90113 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Side.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Side.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Please see [Enums](/products/spot/enums#side) for supported values. */ +/** Please see Enums for supported values. */ @JsonAdapter(Side.Adapter.class) public enum Side { BUY("BUY"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderPlaceResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderPlaceResponse.java index 6d47a2e7a..1c2ff20c0 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderPlaceResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderPlaceResponse.java @@ -65,7 +65,7 @@ public class SorOrderPlaceResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid PingResponseRateLimitsInner> rateLimits; public SorOrderPlaceResponse() {} @@ -138,14 +138,12 @@ public void setResult( } public SorOrderPlaceResponse rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public SorOrderPlaceResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + public SorOrderPlaceResponse addRateLimitsItem(PingResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -160,13 +158,12 @@ public SorOrderPlaceResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid PingResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -221,7 +218,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid PingResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -359,8 +356,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + PingResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderTestResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderTestResponse.java index 06163c5be..9c811ecbe 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderTestResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderTestResponse.java @@ -65,7 +65,7 @@ public class SorOrderTestResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid PingResponseRateLimitsInner> rateLimits; public SorOrderTestResponse() {} @@ -129,14 +129,12 @@ public void setResult(@jakarta.annotation.Nullable SorOrderTestResponseResult re } public SorOrderTestResponse rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public SorOrderTestResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + public SorOrderTestResponse addRateLimitsItem(PingResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -151,13 +149,12 @@ public SorOrderTestResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid PingResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -212,7 +209,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid PingResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -335,8 +332,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + PingResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderTestResponseResult.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderTestResponseResult.java index 4fca2c3ab..d61d073d7 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderTestResponseResult.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/SorOrderTestResponseResult.java @@ -51,7 +51,7 @@ public class SorOrderTestResponseResult extends BaseDTO { @SerializedName(SERIALIZED_NAME_TAX_COMMISSION_FOR_ORDER) @jakarta.annotation.Nullable - private OrderTestResponseResultStandardCommissionForOrder taxCommissionForOrder; + private OrderTestResponseResultTaxCommissionForOrder taxCommissionForOrder; public static final String SERIALIZED_NAME_DISCOUNT = "discount"; @@ -87,7 +87,7 @@ public void setStandardCommissionForOrder( public SorOrderTestResponseResult taxCommissionForOrder( @jakarta.annotation.Nullable - OrderTestResponseResultStandardCommissionForOrder taxCommissionForOrder) { + OrderTestResponseResultTaxCommissionForOrder taxCommissionForOrder) { this.taxCommissionForOrder = taxCommissionForOrder; return this; } @@ -99,13 +99,13 @@ public SorOrderTestResponseResult taxCommissionForOrder( */ @jakarta.annotation.Nullable @Valid - public OrderTestResponseResultStandardCommissionForOrder getTaxCommissionForOrder() { + public OrderTestResponseResultTaxCommissionForOrder getTaxCommissionForOrder() { return taxCommissionForOrder; } public void setTaxCommissionForOrder( @jakarta.annotation.Nullable - OrderTestResponseResultStandardCommissionForOrder taxCommissionForOrder) { + OrderTestResponseResultTaxCommissionForOrder taxCommissionForOrder) { this.taxCommissionForOrder = taxCommissionForOrder; } @@ -179,7 +179,7 @@ public String toUrlQueryString() { JSON.getGson().toJson(standardCommissionForOrderValue); valMap.put("standardCommissionForOrder", standardCommissionForOrderValueAsString); } - OrderTestResponseResultStandardCommissionForOrder taxCommissionForOrderValue = + OrderTestResponseResultTaxCommissionForOrder taxCommissionForOrderValue = getTaxCommissionForOrder(); if (taxCommissionForOrderValue != null) { String taxCommissionForOrderValueAsString = @@ -287,7 +287,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `taxCommissionForOrder` if (jsonObj.get("taxCommissionForOrder") != null && !jsonObj.get("taxCommissionForOrder").isJsonNull()) { - OrderTestResponseResultStandardCommissionForOrder.validateJsonElement( + OrderTestResponseResultTaxCommissionForOrder.validateJsonElement( jsonObj.get("taxCommissionForOrder")); } // validate the optional field `discount` diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse1.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse1.java index d64c452a9..1b30d2c39 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse1.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse1.java @@ -65,7 +65,7 @@ public class Ticker24hrResponse1 extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid Ticker24hrResponse1RateLimitsInner> rateLimits; public Ticker24hrResponse1() {} @@ -130,13 +130,13 @@ public void setResult(@jakarta.annotation.Nullable Ticker24hrResponse1Result res public Ticker24hrResponse1 rateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid Ticker24hrResponse1RateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public Ticker24hrResponse1 addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + Ticker24hrResponse1RateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -151,13 +151,13 @@ public Ticker24hrResponse1 addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid Ticker24hrResponse1RateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid Ticker24hrResponse1RateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -212,7 +212,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid Ticker24hrResponse1RateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -335,7 +335,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( + Ticker24hrResponse1RateLimitsInner.validateJsonElement( jsonArrayrateLimits.get(i)); } ; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse1RateLimitsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse1RateLimitsInner.java new file mode 100644 index 000000000..0ef8fb617 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse1RateLimitsInner.java @@ -0,0 +1,407 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** Ticker24hrResponse1RateLimitsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class Ticker24hrResponse1RateLimitsInner extends BaseDTO { + public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; + + @SerializedName(SERIALIZED_NAME_RATE_LIMIT_TYPE) + @jakarta.annotation.Nullable + private String rateLimitType; + + public static final String SERIALIZED_NAME_INTERVAL = "interval"; + + @SerializedName(SERIALIZED_NAME_INTERVAL) + @jakarta.annotation.Nullable + private String interval; + + public static final String SERIALIZED_NAME_INTERVAL_NUM = "intervalNum"; + + @SerializedName(SERIALIZED_NAME_INTERVAL_NUM) + @jakarta.annotation.Nullable + private Long intervalNum; + + public static final String SERIALIZED_NAME_LIMIT = "limit"; + + @SerializedName(SERIALIZED_NAME_LIMIT) + @jakarta.annotation.Nullable + private Long limit; + + public static final String SERIALIZED_NAME_COUNT = "count"; + + @SerializedName(SERIALIZED_NAME_COUNT) + @jakarta.annotation.Nullable + private Long count; + + public Ticker24hrResponse1RateLimitsInner() {} + + public Ticker24hrResponse1RateLimitsInner rateLimitType( + @jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + return this; + } + + /** + * Get rateLimitType + * + * @return rateLimitType + */ + @jakarta.annotation.Nullable + public String getRateLimitType() { + return rateLimitType; + } + + public void setRateLimitType(@jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + } + + public Ticker24hrResponse1RateLimitsInner interval( + @jakarta.annotation.Nullable String interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * + * @return interval + */ + @jakarta.annotation.Nullable + public String getInterval() { + return interval; + } + + public void setInterval(@jakarta.annotation.Nullable String interval) { + this.interval = interval; + } + + public Ticker24hrResponse1RateLimitsInner intervalNum( + @jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + return this; + } + + /** + * Get intervalNum + * + * @return intervalNum + */ + @jakarta.annotation.Nullable + public Long getIntervalNum() { + return intervalNum; + } + + public void setIntervalNum(@jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + } + + public Ticker24hrResponse1RateLimitsInner limit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + return this; + } + + /** + * Get limit + * + * @return limit + */ + @jakarta.annotation.Nullable + public Long getLimit() { + return limit; + } + + public void setLimit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + } + + public Ticker24hrResponse1RateLimitsInner count(@jakarta.annotation.Nullable Long count) { + this.count = count; + return this; + } + + /** + * Number of trades + * + * @return count + */ + @jakarta.annotation.Nullable + public Long getCount() { + return count; + } + + public void setCount(@jakarta.annotation.Nullable Long count) { + this.count = count; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Ticker24hrResponse1RateLimitsInner ticker24hrResponse1RateLimitsInner = + (Ticker24hrResponse1RateLimitsInner) o; + return Objects.equals(this.rateLimitType, ticker24hrResponse1RateLimitsInner.rateLimitType) + && Objects.equals(this.interval, ticker24hrResponse1RateLimitsInner.interval) + && Objects.equals(this.intervalNum, ticker24hrResponse1RateLimitsInner.intervalNum) + && Objects.equals(this.limit, ticker24hrResponse1RateLimitsInner.limit) + && Objects.equals(this.count, ticker24hrResponse1RateLimitsInner.count); + } + + @Override + public int hashCode() { + return Objects.hash(rateLimitType, interval, intervalNum, limit, count); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Ticker24hrResponse1RateLimitsInner {\n"); + sb.append(" rateLimitType: ").append(toIndentedString(rateLimitType)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" intervalNum: ").append(toIndentedString(intervalNum)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + String rateLimitTypeValueAsString = rateLimitTypeValue.toString(); + valMap.put("rateLimitType", rateLimitTypeValueAsString); + } + String intervalValue = getInterval(); + if (intervalValue != null) { + String intervalValueAsString = intervalValue.toString(); + valMap.put("interval", intervalValueAsString); + } + Long intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + String intervalNumValueAsString = intervalNumValue.toString(); + valMap.put("intervalNum", intervalNumValueAsString); + } + Long limitValue = getLimit(); + if (limitValue != null) { + String limitValueAsString = limitValue.toString(); + valMap.put("limit", limitValueAsString); + } + Long countValue = getCount(); + if (countValue != null) { + String countValueAsString = countValue.toString(); + valMap.put("count", countValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + valMap.put("rateLimitType", rateLimitTypeValue); + } + Object intervalValue = getInterval(); + if (intervalValue != null) { + valMap.put("interval", intervalValue); + } + Object intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + valMap.put("intervalNum", intervalNumValue); + } + Object limitValue = getLimit(); + if (limitValue != null) { + valMap.put("limit", limitValue); + } + Object countValue = getCount(); + if (countValue != null) { + valMap.put("count", countValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * 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 "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("rateLimitType"); + openapiFields.add("interval"); + openapiFields.add("intervalNum"); + openapiFields.add("limit"); + openapiFields.add("count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * Ticker24hrResponse1RateLimitsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Ticker24hrResponse1RateLimitsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in Ticker24hrResponse1RateLimitsInner is" + + " not found in the empty JSON string", + Ticker24hrResponse1RateLimitsInner.openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Ticker24hrResponse1RateLimitsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `Ticker24hrResponse1RateLimitsInner` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("rateLimitType") != null && !jsonObj.get("rateLimitType").isJsonNull()) + && !jsonObj.get("rateLimitType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateLimitType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("rateLimitType").toString())); + } + if ((jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) + && !jsonObj.get("interval").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `interval` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("interval").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Ticker24hrResponse1RateLimitsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Ticker24hrResponse1RateLimitsInner' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(Ticker24hrResponse1RateLimitsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, Ticker24hrResponse1RateLimitsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Ticker24hrResponse1RateLimitsInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of Ticker24hrResponse1RateLimitsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of Ticker24hrResponse1RateLimitsInner + * @throws IOException if the JSON string is invalid with respect to + * Ticker24hrResponse1RateLimitsInner + */ + public static Ticker24hrResponse1RateLimitsInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, Ticker24hrResponse1RateLimitsInner.class); + } + + /** + * Convert an instance of Ticker24hrResponse1RateLimitsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse2.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse2.java index c7c13629c..6462e0297 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse2.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/Ticker24hrResponse2.java @@ -38,7 +38,7 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** Ticker24hrResponse2 */ +/** If more than one symbol is requested, response returns an array: */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0") @@ -65,7 +65,7 @@ public class Ticker24hrResponse2 extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid AvgPriceResponseRateLimitsInner> rateLimits; public Ticker24hrResponse2() {} @@ -138,14 +138,12 @@ public void setResult( } public Ticker24hrResponse2 rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid AvgPriceResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public Ticker24hrResponse2 addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + public Ticker24hrResponse2 addRateLimitsItem(AvgPriceResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -160,13 +158,12 @@ public Ticker24hrResponse2 addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid AvgPriceResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid AvgPriceResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -221,7 +218,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid AvgPriceResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -359,8 +356,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + AvgPriceResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse1.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse1.java index 2949d3df8..bbc4fdb32 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse1.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse1.java @@ -65,7 +65,7 @@ public class TickerBookResponse1 extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid AvgPriceResponseRateLimitsInner> rateLimits; public TickerBookResponse1() {} @@ -129,14 +129,12 @@ public void setResult(@jakarta.annotation.Nullable TickerBookResponse1Result res } public TickerBookResponse1 rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid AvgPriceResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public TickerBookResponse1 addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + public TickerBookResponse1 addRateLimitsItem(AvgPriceResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -151,13 +149,12 @@ public TickerBookResponse1 addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid AvgPriceResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid AvgPriceResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -212,7 +209,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid AvgPriceResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -335,8 +332,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + AvgPriceResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse2.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse2.java index fff71ba7b..15cb2e54f 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse2.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerBookResponse2.java @@ -65,7 +65,7 @@ public class TickerBookResponse2 extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimits; public TickerBookResponse2() {} @@ -139,13 +139,13 @@ public void setResult( public TickerBookResponse2 rateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public TickerBookResponse2 addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + OrderAmendmentsResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -160,13 +160,13 @@ public TickerBookResponse2 addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid OrderAmendmentsResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -221,7 +221,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -359,7 +359,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( + OrderAmendmentsResponseRateLimitsInner.validateJsonElement( jsonArrayrateLimits.get(i)); } ; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse1.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse1.java index 900e6e402..60b0d1b3a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse1.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse1.java @@ -65,7 +65,7 @@ public class TickerPriceResponse1 extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid AvgPriceResponseRateLimitsInner> rateLimits; public TickerPriceResponse1() {} @@ -129,14 +129,12 @@ public void setResult(@jakarta.annotation.Nullable TickerPriceResponse1Result re } public TickerPriceResponse1 rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid AvgPriceResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public TickerPriceResponse1 addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + public TickerPriceResponse1 addRateLimitsItem(AvgPriceResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -151,13 +149,12 @@ public TickerPriceResponse1 addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid AvgPriceResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid AvgPriceResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -212,7 +209,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid AvgPriceResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -335,8 +332,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + AvgPriceResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse2.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse2.java index c4a26ad41..3cd344dba 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse2.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerPriceResponse2.java @@ -65,7 +65,7 @@ public class TickerPriceResponse2 extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimits; public TickerPriceResponse2() {} @@ -139,13 +139,13 @@ public void setResult( public TickerPriceResponse2 rateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public TickerPriceResponse2 addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + OrderAmendmentsResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -160,13 +160,13 @@ public TickerPriceResponse2 addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid OrderAmendmentsResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -221,7 +221,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -359,7 +359,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( + OrderAmendmentsResponseRateLimitsInner.validateJsonElement( jsonArrayrateLimits.get(i)); } ; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse1.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse1.java index 8e9d357e6..b7442e3d0 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse1.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse1.java @@ -65,7 +65,7 @@ public class TickerResponse1 extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid TickerResponse1RateLimitsInner> rateLimits; public TickerResponse1() {} @@ -128,14 +128,12 @@ public void setResult(@jakarta.annotation.Nullable TickerResponse1Result result) } public TickerResponse1 rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid TickerResponse1RateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public TickerResponse1 addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + public TickerResponse1 addRateLimitsItem(TickerResponse1RateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -150,13 +148,12 @@ public TickerResponse1 addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid TickerResponse1RateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid TickerResponse1RateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -211,7 +208,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid TickerResponse1RateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -334,8 +331,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + TickerResponse1RateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse1RateLimitsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse1RateLimitsInner.java new file mode 100644 index 000000000..97dd13d48 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse1RateLimitsInner.java @@ -0,0 +1,404 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** TickerResponse1RateLimitsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class TickerResponse1RateLimitsInner extends BaseDTO { + public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; + + @SerializedName(SERIALIZED_NAME_RATE_LIMIT_TYPE) + @jakarta.annotation.Nullable + private String rateLimitType; + + public static final String SERIALIZED_NAME_INTERVAL = "interval"; + + @SerializedName(SERIALIZED_NAME_INTERVAL) + @jakarta.annotation.Nullable + private String interval; + + public static final String SERIALIZED_NAME_INTERVAL_NUM = "intervalNum"; + + @SerializedName(SERIALIZED_NAME_INTERVAL_NUM) + @jakarta.annotation.Nullable + private Long intervalNum; + + public static final String SERIALIZED_NAME_LIMIT = "limit"; + + @SerializedName(SERIALIZED_NAME_LIMIT) + @jakarta.annotation.Nullable + private Long limit; + + public static final String SERIALIZED_NAME_COUNT = "count"; + + @SerializedName(SERIALIZED_NAME_COUNT) + @jakarta.annotation.Nullable + private Long count; + + public TickerResponse1RateLimitsInner() {} + + public TickerResponse1RateLimitsInner rateLimitType( + @jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + return this; + } + + /** + * Get rateLimitType + * + * @return rateLimitType + */ + @jakarta.annotation.Nullable + public String getRateLimitType() { + return rateLimitType; + } + + public void setRateLimitType(@jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + } + + public TickerResponse1RateLimitsInner interval(@jakarta.annotation.Nullable String interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * + * @return interval + */ + @jakarta.annotation.Nullable + public String getInterval() { + return interval; + } + + public void setInterval(@jakarta.annotation.Nullable String interval) { + this.interval = interval; + } + + public TickerResponse1RateLimitsInner intervalNum( + @jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + return this; + } + + /** + * Get intervalNum + * + * @return intervalNum + */ + @jakarta.annotation.Nullable + public Long getIntervalNum() { + return intervalNum; + } + + public void setIntervalNum(@jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + } + + public TickerResponse1RateLimitsInner limit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + return this; + } + + /** + * Get limit + * + * @return limit + */ + @jakarta.annotation.Nullable + public Long getLimit() { + return limit; + } + + public void setLimit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + } + + public TickerResponse1RateLimitsInner count(@jakarta.annotation.Nullable Long count) { + this.count = count; + return this; + } + + /** + * Number of trades + * + * @return count + */ + @jakarta.annotation.Nullable + public Long getCount() { + return count; + } + + public void setCount(@jakarta.annotation.Nullable Long count) { + this.count = count; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TickerResponse1RateLimitsInner tickerResponse1RateLimitsInner = + (TickerResponse1RateLimitsInner) o; + return Objects.equals(this.rateLimitType, tickerResponse1RateLimitsInner.rateLimitType) + && Objects.equals(this.interval, tickerResponse1RateLimitsInner.interval) + && Objects.equals(this.intervalNum, tickerResponse1RateLimitsInner.intervalNum) + && Objects.equals(this.limit, tickerResponse1RateLimitsInner.limit) + && Objects.equals(this.count, tickerResponse1RateLimitsInner.count); + } + + @Override + public int hashCode() { + return Objects.hash(rateLimitType, interval, intervalNum, limit, count); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TickerResponse1RateLimitsInner {\n"); + sb.append(" rateLimitType: ").append(toIndentedString(rateLimitType)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" intervalNum: ").append(toIndentedString(intervalNum)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + String rateLimitTypeValueAsString = rateLimitTypeValue.toString(); + valMap.put("rateLimitType", rateLimitTypeValueAsString); + } + String intervalValue = getInterval(); + if (intervalValue != null) { + String intervalValueAsString = intervalValue.toString(); + valMap.put("interval", intervalValueAsString); + } + Long intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + String intervalNumValueAsString = intervalNumValue.toString(); + valMap.put("intervalNum", intervalNumValueAsString); + } + Long limitValue = getLimit(); + if (limitValue != null) { + String limitValueAsString = limitValue.toString(); + valMap.put("limit", limitValueAsString); + } + Long countValue = getCount(); + if (countValue != null) { + String countValueAsString = countValue.toString(); + valMap.put("count", countValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + valMap.put("rateLimitType", rateLimitTypeValue); + } + Object intervalValue = getInterval(); + if (intervalValue != null) { + valMap.put("interval", intervalValue); + } + Object intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + valMap.put("intervalNum", intervalNumValue); + } + Object limitValue = getLimit(); + if (limitValue != null) { + valMap.put("limit", limitValue); + } + Object countValue = getCount(); + if (countValue != null) { + valMap.put("count", countValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * 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 "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("rateLimitType"); + openapiFields.add("interval"); + openapiFields.add("intervalNum"); + openapiFields.add("limit"); + openapiFields.add("count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * TickerResponse1RateLimitsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TickerResponse1RateLimitsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in TickerResponse1RateLimitsInner is not" + + " found in the empty JSON string", + TickerResponse1RateLimitsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TickerResponse1RateLimitsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `TickerResponse1RateLimitsInner` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("rateLimitType") != null && !jsonObj.get("rateLimitType").isJsonNull()) + && !jsonObj.get("rateLimitType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateLimitType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("rateLimitType").toString())); + } + if ((jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) + && !jsonObj.get("interval").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `interval` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("interval").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TickerResponse1RateLimitsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TickerResponse1RateLimitsInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(TickerResponse1RateLimitsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, TickerResponse1RateLimitsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TickerResponse1RateLimitsInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of TickerResponse1RateLimitsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of TickerResponse1RateLimitsInner + * @throws IOException if the JSON string is invalid with respect to + * TickerResponse1RateLimitsInner + */ + public static TickerResponse1RateLimitsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TickerResponse1RateLimitsInner.class); + } + + /** + * Convert an instance of TickerResponse1RateLimitsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse1Result.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse1Result.java index dbc11d95b..cc63098a2 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse1Result.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse1Result.java @@ -386,7 +386,7 @@ public TickerResponse1Result lastId(@jakarta.annotation.Nullable Long lastId) { } /** - * Get lastId + * Last trade ID * * @return lastId */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse2.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse2.java index 05e2cf7ee..b0b554daf 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse2.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse2.java @@ -38,7 +38,7 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** TickerResponse2 */ +/** If more than one symbol is requested, response returns an array: */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0") @@ -65,7 +65,7 @@ public class TickerResponse2 extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid TickerResponse2RateLimitsInner> rateLimits; public TickerResponse2() {} @@ -138,14 +138,12 @@ public void setResult( } public TickerResponse2 rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid TickerResponse2RateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public TickerResponse2 addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + public TickerResponse2 addRateLimitsItem(TickerResponse2RateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -160,13 +158,12 @@ public TickerResponse2 addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid TickerResponse2RateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid TickerResponse2RateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -221,7 +218,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid TickerResponse2RateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -359,8 +356,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + TickerResponse2RateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse2RateLimitsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse2RateLimitsInner.java new file mode 100644 index 000000000..358032a6a --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerResponse2RateLimitsInner.java @@ -0,0 +1,404 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** TickerResponse2RateLimitsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class TickerResponse2RateLimitsInner extends BaseDTO { + public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; + + @SerializedName(SERIALIZED_NAME_RATE_LIMIT_TYPE) + @jakarta.annotation.Nullable + private String rateLimitType; + + public static final String SERIALIZED_NAME_INTERVAL = "interval"; + + @SerializedName(SERIALIZED_NAME_INTERVAL) + @jakarta.annotation.Nullable + private String interval; + + public static final String SERIALIZED_NAME_INTERVAL_NUM = "intervalNum"; + + @SerializedName(SERIALIZED_NAME_INTERVAL_NUM) + @jakarta.annotation.Nullable + private Long intervalNum; + + public static final String SERIALIZED_NAME_LIMIT = "limit"; + + @SerializedName(SERIALIZED_NAME_LIMIT) + @jakarta.annotation.Nullable + private Long limit; + + public static final String SERIALIZED_NAME_COUNT = "count"; + + @SerializedName(SERIALIZED_NAME_COUNT) + @jakarta.annotation.Nullable + private Long count; + + public TickerResponse2RateLimitsInner() {} + + public TickerResponse2RateLimitsInner rateLimitType( + @jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + return this; + } + + /** + * Get rateLimitType + * + * @return rateLimitType + */ + @jakarta.annotation.Nullable + public String getRateLimitType() { + return rateLimitType; + } + + public void setRateLimitType(@jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + } + + public TickerResponse2RateLimitsInner interval(@jakarta.annotation.Nullable String interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * + * @return interval + */ + @jakarta.annotation.Nullable + public String getInterval() { + return interval; + } + + public void setInterval(@jakarta.annotation.Nullable String interval) { + this.interval = interval; + } + + public TickerResponse2RateLimitsInner intervalNum( + @jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + return this; + } + + /** + * Get intervalNum + * + * @return intervalNum + */ + @jakarta.annotation.Nullable + public Long getIntervalNum() { + return intervalNum; + } + + public void setIntervalNum(@jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + } + + public TickerResponse2RateLimitsInner limit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + return this; + } + + /** + * Get limit + * + * @return limit + */ + @jakarta.annotation.Nullable + public Long getLimit() { + return limit; + } + + public void setLimit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + } + + public TickerResponse2RateLimitsInner count(@jakarta.annotation.Nullable Long count) { + this.count = count; + return this; + } + + /** + * Get count + * + * @return count + */ + @jakarta.annotation.Nullable + public Long getCount() { + return count; + } + + public void setCount(@jakarta.annotation.Nullable Long count) { + this.count = count; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TickerResponse2RateLimitsInner tickerResponse2RateLimitsInner = + (TickerResponse2RateLimitsInner) o; + return Objects.equals(this.rateLimitType, tickerResponse2RateLimitsInner.rateLimitType) + && Objects.equals(this.interval, tickerResponse2RateLimitsInner.interval) + && Objects.equals(this.intervalNum, tickerResponse2RateLimitsInner.intervalNum) + && Objects.equals(this.limit, tickerResponse2RateLimitsInner.limit) + && Objects.equals(this.count, tickerResponse2RateLimitsInner.count); + } + + @Override + public int hashCode() { + return Objects.hash(rateLimitType, interval, intervalNum, limit, count); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TickerResponse2RateLimitsInner {\n"); + sb.append(" rateLimitType: ").append(toIndentedString(rateLimitType)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" intervalNum: ").append(toIndentedString(intervalNum)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + String rateLimitTypeValueAsString = rateLimitTypeValue.toString(); + valMap.put("rateLimitType", rateLimitTypeValueAsString); + } + String intervalValue = getInterval(); + if (intervalValue != null) { + String intervalValueAsString = intervalValue.toString(); + valMap.put("interval", intervalValueAsString); + } + Long intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + String intervalNumValueAsString = intervalNumValue.toString(); + valMap.put("intervalNum", intervalNumValueAsString); + } + Long limitValue = getLimit(); + if (limitValue != null) { + String limitValueAsString = limitValue.toString(); + valMap.put("limit", limitValueAsString); + } + Long countValue = getCount(); + if (countValue != null) { + String countValueAsString = countValue.toString(); + valMap.put("count", countValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + valMap.put("rateLimitType", rateLimitTypeValue); + } + Object intervalValue = getInterval(); + if (intervalValue != null) { + valMap.put("interval", intervalValue); + } + Object intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + valMap.put("intervalNum", intervalNumValue); + } + Object limitValue = getLimit(); + if (limitValue != null) { + valMap.put("limit", limitValue); + } + Object countValue = getCount(); + if (countValue != null) { + valMap.put("count", countValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * 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 "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("rateLimitType"); + openapiFields.add("interval"); + openapiFields.add("intervalNum"); + openapiFields.add("limit"); + openapiFields.add("count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * TickerResponse2RateLimitsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TickerResponse2RateLimitsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in TickerResponse2RateLimitsInner is not" + + " found in the empty JSON string", + TickerResponse2RateLimitsInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TickerResponse2RateLimitsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `TickerResponse2RateLimitsInner` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("rateLimitType") != null && !jsonObj.get("rateLimitType").isJsonNull()) + && !jsonObj.get("rateLimitType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateLimitType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("rateLimitType").toString())); + } + if ((jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) + && !jsonObj.get("interval").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `interval` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("interval").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TickerResponse2RateLimitsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TickerResponse2RateLimitsInner' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(TickerResponse2RateLimitsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, TickerResponse2RateLimitsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TickerResponse2RateLimitsInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of TickerResponse2RateLimitsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of TickerResponse2RateLimitsInner + * @throws IOException if the JSON string is invalid with respect to + * TickerResponse2RateLimitsInner + */ + public static TickerResponse2RateLimitsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TickerResponse2RateLimitsInner.class); + } + + /** + * Convert an instance of TickerResponse2RateLimitsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponse.java index 2c2918528..9bba9c961 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponse.java @@ -12,280 +12,228 @@ package com.binance.connector.client.spot.websocket.api.model; -import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.common.AbstractOpenApiSchema; import com.binance.connector.client.spot.websocket.api.JSON; import com.google.gson.Gson; -import com.google.gson.JsonArray; import com.google.gson.JsonElement; -import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import jakarta.validation.Valid; import jakarta.validation.constraints.*; import java.io.IOException; -import java.nio.charset.StandardCharsets; import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; +import java.util.HashMap; import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.TreeMap; -import java.util.stream.Collectors; +import java.util.logging.Level; +import java.util.logging.Logger; import org.hibernate.validator.constraints.*; -/** TickerTradingDayResponse */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0") -public class TickerTradingDayResponse extends BaseDTO { - public static final String SERIALIZED_NAME_ID = "id"; +public class TickerTradingDayResponse extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(TickerTradingDayResponse.class.getName()); - @SerializedName(SERIALIZED_NAME_ID) - @jakarta.annotation.Nullable - private String id; - - public static final String SERIALIZED_NAME_STATUS = "status"; - - @SerializedName(SERIALIZED_NAME_STATUS) - @jakarta.annotation.Nullable - private Long status; - - public static final String SERIALIZED_NAME_RESULT = "result"; + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TickerTradingDayResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TickerTradingDayResponse' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterTickerTradingDayResponse1 = + gson.getDelegateAdapter(this, TypeToken.get(TickerTradingDayResponse1.class)); + final TypeAdapter adapterTickerTradingDayResponse2 = + gson.getDelegateAdapter(this, TypeToken.get(TickerTradingDayResponse2.class)); - @SerializedName(SERIALIZED_NAME_RESULT) - @jakarta.annotation.Nullable - private List<@Valid TickerTradingDayResponseResultInner> result; + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, TickerTradingDayResponse value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type + // `TickerTradingDayResponse1` + if (value.getActualInstance() instanceof TickerTradingDayResponse1) { + JsonElement element = + adapterTickerTradingDayResponse1.toJsonTree( + (TickerTradingDayResponse1) + value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type + // `TickerTradingDayResponse2` + if (value.getActualInstance() instanceof TickerTradingDayResponse2) { + JsonElement element = + adapterTickerTradingDayResponse2.toJsonTree( + (TickerTradingDayResponse2) + value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas:" + + " TickerTradingDayResponse1, TickerTradingDayResponse2"); + } - public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; + @Override + public TickerTradingDayResponse read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); - @SerializedName(SERIALIZED_NAME_RATE_LIMITS) - @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize TickerTradingDayResponse1 + try { + // validate the JSON object to see if any exception is thrown + TickerTradingDayResponse1.validateJsonElement(jsonElement); + actualAdapter = adapterTickerTradingDayResponse1; + match++; + log.log( + Level.FINER, + "Input data matches schema 'TickerTradingDayResponse1'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for TickerTradingDayResponse1" + + " failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema" + + " 'TickerTradingDayResponse1'", + e); + } + // deserialize TickerTradingDayResponse2 + try { + // validate the JSON object to see if any exception is thrown + TickerTradingDayResponse2.validateJsonElement(jsonElement); + actualAdapter = adapterTickerTradingDayResponse2; + match++; + log.log( + Level.FINER, + "Input data matches schema 'TickerTradingDayResponse2'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + "Deserialization for TickerTradingDayResponse2" + + " failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema" + + " 'TickerTradingDayResponse2'", + e); + } + + if (match == 1) { + TickerTradingDayResponse ret = new TickerTradingDayResponse(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + "Failed deserialization for TickerTradingDayResponse:" + + " %d classes match result, expected 1. Detailed" + + " failure message for oneOf schemas: %s. JSON:" + + " %s", + match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } - public TickerTradingDayResponse() {} + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); - public TickerTradingDayResponse id(@jakarta.annotation.Nullable String id) { - this.id = id; - return this; + public TickerTradingDayResponse() { + super("oneOf", Boolean.FALSE); } - /** - * Get id - * - * @return id - */ - @jakarta.annotation.Nullable - public String getId() { - return id; + public TickerTradingDayResponse(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - public void setId(@jakarta.annotation.Nullable String id) { - this.id = id; + static { + schemas.put("TickerTradingDayResponse1", TickerTradingDayResponse1.class); + schemas.put("TickerTradingDayResponse2", TickerTradingDayResponse2.class); } - public TickerTradingDayResponse status(@jakarta.annotation.Nullable Long status) { - this.status = status; - return this; + @Override + public Map> getSchemas() { + return TickerTradingDayResponse.schemas; } /** - * Get status + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: TickerTradingDayResponse1, TickerTradingDayResponse2 * - * @return status + *

It could be an instance of the 'oneOf' schemas. */ - @jakarta.annotation.Nullable - public Long getStatus() { - return status; - } - - public void setStatus(@jakarta.annotation.Nullable Long status) { - this.status = status; - } - - public TickerTradingDayResponse result( - @jakarta.annotation.Nullable List<@Valid TickerTradingDayResponseResultInner> result) { - this.result = result; - return this; - } + @Override + public void setActualInstance(Object instance) { + if (instance instanceof TickerTradingDayResponse1) { + super.setActualInstance(instance); + return; + } - public TickerTradingDayResponse addResultItem(TickerTradingDayResponseResultInner resultItem) { - if (this.result == null) { - this.result = new ArrayList<>(); + if (instance instanceof TickerTradingDayResponse2) { + super.setActualInstance(instance); + return; } - this.result.add(resultItem); - return this; + + throw new RuntimeException( + "Invalid instance type. Must be TickerTradingDayResponse1," + + " TickerTradingDayResponse2"); } /** - * Get result + * Get the actual instance, which can be the following: TickerTradingDayResponse1, + * TickerTradingDayResponse2 * - * @return result + * @return The actual instance (TickerTradingDayResponse1, TickerTradingDayResponse2) */ - @jakarta.annotation.Nullable - @Valid - public List<@Valid TickerTradingDayResponseResultInner> getResult() { - return result; - } - - public void setResult( - @jakarta.annotation.Nullable List<@Valid TickerTradingDayResponseResultInner> result) { - this.result = result; - } - - public TickerTradingDayResponse rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { - this.rateLimits = rateLimits; - return this; - } - - public TickerTradingDayResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { - if (this.rateLimits == null) { - this.rateLimits = new ArrayList<>(); - } - this.rateLimits.add(rateLimitsItem); - return this; + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); } /** - * Get rateLimits + * Get the actual instance of `TickerTradingDayResponse1`. If the actual instance is not + * `TickerTradingDayResponse1`, the ClassCastException will be thrown. * - * @return rateLimits + * @return The actual instance of `TickerTradingDayResponse1` + * @throws ClassCastException if the instance is not `TickerTradingDayResponse1` */ - @jakarta.annotation.Nullable - @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { - return rateLimits; - } - - public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { - this.rateLimits = rateLimits; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TickerTradingDayResponse tickerTradingDayResponse = (TickerTradingDayResponse) o; - return Objects.equals(this.id, tickerTradingDayResponse.id) - && Objects.equals(this.status, tickerTradingDayResponse.status) - && Objects.equals(this.result, tickerTradingDayResponse.result) - && Objects.equals(this.rateLimits, tickerTradingDayResponse.rateLimits); - } - - @Override - public int hashCode() { - return Objects.hash(id, status, result, rateLimits); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TickerTradingDayResponse {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" result: ").append(toIndentedString(result)).append("\n"); - sb.append(" rateLimits: ").append(toIndentedString(rateLimits)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public String toUrlQueryString() { - StringBuilder sb = new StringBuilder(); - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - String idValue = getId(); - if (idValue != null) { - String idValueAsString = idValue.toString(); - valMap.put("id", idValueAsString); - } - Long statusValue = getStatus(); - if (statusValue != null) { - String statusValueAsString = statusValue.toString(); - valMap.put("status", statusValueAsString); - } - List<@Valid TickerTradingDayResponseResultInner> resultValue = getResult(); - if (resultValue != null) { - String resultValueAsString = JSON.getGson().toJson(resultValue); - valMap.put("result", resultValueAsString); - } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); - if (rateLimitsValue != null) { - String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); - valMap.put("rateLimits", rateLimitsValueAsString); - } - - valMap.put("timestamp", getTimestamp()); - return asciiEncode( - valMap.keySet().stream() - .map(key -> key + "=" + valMap.get(key)) - .collect(Collectors.joining("&"))); - } - - public Map toMap() { - Map valMap = new TreeMap(); - valMap.put("apiKey", getApiKey()); - Object idValue = getId(); - if (idValue != null) { - valMap.put("id", idValue); - } - Object statusValue = getStatus(); - if (statusValue != null) { - valMap.put("status", statusValue); - } - Object resultValue = getResult(); - if (resultValue != null) { - valMap.put("result", resultValue); - } - Object rateLimitsValue = getRateLimits(); - if (rateLimitsValue != null) { - valMap.put("rateLimits", rateLimitsValue); - } - - valMap.put("timestamp", getTimestamp()); - return valMap; - } - - public static String asciiEncode(String s) { - return new String(s.getBytes(), StandardCharsets.US_ASCII); + public TickerTradingDayResponse1 getTickerTradingDayResponse1() throws ClassCastException { + return (TickerTradingDayResponse1) super.getActualInstance(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). + * Get the actual instance of `TickerTradingDayResponse2`. If the actual instance is not + * `TickerTradingDayResponse2`, the ClassCastException will be thrown. + * + * @return The actual instance of `TickerTradingDayResponse2` + * @throws ClassCastException if the instance is not `TickerTradingDayResponse2` */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("status"); - openapiFields.add("result"); - openapiFields.add("rateLimits"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + public TickerTradingDayResponse2 getTickerTradingDayResponse2() throws ClassCastException { + return (TickerTradingDayResponse2) super.getActualInstance(); } /** @@ -295,106 +243,39 @@ private String toIndentedString(Object o) { * @throws IOException if the JSON Element is invalid with respect to TickerTradingDayResponse */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TickerTradingDayResponse.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in TickerTradingDayResponse is not found" - + " in the empty JSON string", - TickerTradingDayResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!TickerTradingDayResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException( - String.format( - "The field `%s` in the JSON string is not defined in the" - + " `TickerTradingDayResponse` properties. JSON: %s", - entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) - && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with TickerTradingDayResponse1 + try { + TickerTradingDayResponse1.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( String.format( - "Expected the field `id` to be a primitive type in the JSON string but" - + " got `%s`", - jsonObj.get("id").toString())); + "Deserialization for TickerTradingDayResponse1 failed with `%s`.", + e.getMessage())); + // continue to the next one } - if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { - JsonArray jsonArrayresult = jsonObj.getAsJsonArray("result"); - if (jsonArrayresult != null) { - // ensure the json data is an array - if (!jsonObj.get("result").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `result` to be an array in the JSON string" - + " but got `%s`", - jsonObj.get("result").toString())); - } - - // validate the optional field `result` (array) - for (int i = 0; i < jsonArrayresult.size(); i++) { - TickerTradingDayResponseResultInner.validateJsonElement(jsonArrayresult.get(i)); - } - ; - } - } - if (jsonObj.get("rateLimits") != null && !jsonObj.get("rateLimits").isJsonNull()) { - JsonArray jsonArrayrateLimits = jsonObj.getAsJsonArray("rateLimits"); - if (jsonArrayrateLimits != null) { - // ensure the json data is an array - if (!jsonObj.get("rateLimits").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - "Expected the field `rateLimits` to be an array in the JSON" - + " string but got `%s`", - jsonObj.get("rateLimits").toString())); - } - - // validate the optional field `rateLimits` (array) - for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); - } - ; - } + // validate the json string with TickerTradingDayResponse2 + try { + TickerTradingDayResponse2.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + "Deserialization for TickerTradingDayResponse2 failed with `%s`.", + e.getMessage())); + // continue to the next one } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TickerTradingDayResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TickerTradingDayResponse' and its - // subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(TickerTradingDayResponse.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, TickerTradingDayResponse value) - throws IOException { - JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public TickerTradingDayResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - // validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); + if (validCount != 1) { + throw new IOException( + String.format( + "The JSON string is invalid for TickerTradingDayResponse with oneOf" + + " schemas: TickerTradingDayResponse1, TickerTradingDayResponse2." + + " %d class(es) match the result, expected 1. Detailed failure" + + " message for oneOf schemas: %s. JSON: %s", + validCount, errorMessages, jsonElement.toString())); } } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponse1.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponse1.java new file mode 100644 index 000000000..573bef661 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponse1.java @@ -0,0 +1,396 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** TickerTradingDayResponse1 */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class TickerTradingDayResponse1 extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @jakarta.annotation.Nullable + private Long status; + + public static final String SERIALIZED_NAME_RESULT = "result"; + + @SerializedName(SERIALIZED_NAME_RESULT) + @jakarta.annotation.Nullable + private TickerTradingDayResponse1Result result; + + public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; + + @SerializedName(SERIALIZED_NAME_RATE_LIMITS) + @jakarta.annotation.Nullable + private List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimits; + + public TickerTradingDayResponse1() {} + + public TickerTradingDayResponse1 id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + public TickerTradingDayResponse1 status(@jakarta.annotation.Nullable Long status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nullable + public Long getStatus() { + return status; + } + + public void setStatus(@jakarta.annotation.Nullable Long status) { + this.status = status; + } + + public TickerTradingDayResponse1 result( + @jakarta.annotation.Nullable TickerTradingDayResponse1Result result) { + this.result = result; + return this; + } + + /** + * Get result + * + * @return result + */ + @jakarta.annotation.Nullable + @Valid + public TickerTradingDayResponse1Result getResult() { + return result; + } + + public void setResult(@jakarta.annotation.Nullable TickerTradingDayResponse1Result result) { + this.result = result; + } + + public TickerTradingDayResponse1 rateLimits( + @jakarta.annotation.Nullable + List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimits) { + this.rateLimits = rateLimits; + return this; + } + + public TickerTradingDayResponse1 addRateLimitsItem( + OrderAmendmentsResponseRateLimitsInner rateLimitsItem) { + if (this.rateLimits == null) { + this.rateLimits = new ArrayList<>(); + } + this.rateLimits.add(rateLimitsItem); + return this; + } + + /** + * Get rateLimits + * + * @return rateLimits + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid OrderAmendmentsResponseRateLimitsInner> getRateLimits() { + return rateLimits; + } + + public void setRateLimits( + @jakarta.annotation.Nullable + List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimits) { + this.rateLimits = rateLimits; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TickerTradingDayResponse1 tickerTradingDayResponse1 = (TickerTradingDayResponse1) o; + return Objects.equals(this.id, tickerTradingDayResponse1.id) + && Objects.equals(this.status, tickerTradingDayResponse1.status) + && Objects.equals(this.result, tickerTradingDayResponse1.result) + && Objects.equals(this.rateLimits, tickerTradingDayResponse1.rateLimits); + } + + @Override + public int hashCode() { + return Objects.hash(id, status, result, rateLimits); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TickerTradingDayResponse1 {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" rateLimits: ").append(toIndentedString(rateLimits)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + Long statusValue = getStatus(); + if (statusValue != null) { + String statusValueAsString = statusValue.toString(); + valMap.put("status", statusValueAsString); + } + TickerTradingDayResponse1Result resultValue = getResult(); + if (resultValue != null) { + String resultValueAsString = JSON.getGson().toJson(resultValue); + valMap.put("result", resultValueAsString); + } + List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + if (rateLimitsValue != null) { + String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); + valMap.put("rateLimits", rateLimitsValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + Object statusValue = getStatus(); + if (statusValue != null) { + valMap.put("status", statusValue); + } + Object resultValue = getResult(); + if (resultValue != null) { + valMap.put("result", resultValue); + } + Object rateLimitsValue = getRateLimits(); + if (rateLimitsValue != null) { + valMap.put("rateLimits", rateLimitsValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * 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 "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("status"); + openapiFields.add("result"); + openapiFields.add("rateLimits"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TickerTradingDayResponse1 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TickerTradingDayResponse1.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in TickerTradingDayResponse1 is not found" + + " in the empty JSON string", + TickerTradingDayResponse1.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TickerTradingDayResponse1.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `TickerTradingDayResponse1` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + // validate the optional field `result` + if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { + TickerTradingDayResponse1Result.validateJsonElement(jsonObj.get("result")); + } + if (jsonObj.get("rateLimits") != null && !jsonObj.get("rateLimits").isJsonNull()) { + JsonArray jsonArrayrateLimits = jsonObj.getAsJsonArray("rateLimits"); + if (jsonArrayrateLimits != null) { + // ensure the json data is an array + if (!jsonObj.get("rateLimits").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateLimits` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("rateLimits").toString())); + } + + // validate the optional field `rateLimits` (array) + for (int i = 0; i < jsonArrayrateLimits.size(); i++) { + OrderAmendmentsResponseRateLimitsInner.validateJsonElement( + jsonArrayrateLimits.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TickerTradingDayResponse1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TickerTradingDayResponse1' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(TickerTradingDayResponse1.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, TickerTradingDayResponse1 value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TickerTradingDayResponse1 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of TickerTradingDayResponse1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of TickerTradingDayResponse1 + * @throws IOException if the JSON string is invalid with respect to TickerTradingDayResponse1 + */ + public static TickerTradingDayResponse1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TickerTradingDayResponse1.class); + } + + /** + * Convert an instance of TickerTradingDayResponse1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponseResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponse1Result.java similarity index 88% rename from clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponseResultInner.java rename to clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponse1Result.java index ec8c57051..1e0852192 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponseResultInner.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponse1Result.java @@ -34,11 +34,11 @@ import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; -/** TickerTradingDayResponseResultInner */ +/** TickerTradingDayResponse1Result */ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0") -public class TickerTradingDayResponseResultInner extends BaseDTO { +public class TickerTradingDayResponse1Result extends BaseDTO { public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -129,9 +129,9 @@ public class TickerTradingDayResponseResultInner extends BaseDTO { @jakarta.annotation.Nullable private Long count; - public TickerTradingDayResponseResultInner() {} + public TickerTradingDayResponse1Result() {} - public TickerTradingDayResponseResultInner symbol(@jakarta.annotation.Nullable String symbol) { + public TickerTradingDayResponse1Result symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; } @@ -150,7 +150,7 @@ public void setSymbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; } - public TickerTradingDayResponseResultInner priceChange( + public TickerTradingDayResponse1Result priceChange( @jakarta.annotation.Nullable String priceChange) { this.priceChange = priceChange; return this; @@ -170,7 +170,7 @@ public void setPriceChange(@jakarta.annotation.Nullable String priceChange) { this.priceChange = priceChange; } - public TickerTradingDayResponseResultInner priceChangePercent( + public TickerTradingDayResponse1Result priceChangePercent( @jakarta.annotation.Nullable String priceChangePercent) { this.priceChangePercent = priceChangePercent; return this; @@ -190,7 +190,7 @@ public void setPriceChangePercent(@jakarta.annotation.Nullable String priceChang this.priceChangePercent = priceChangePercent; } - public TickerTradingDayResponseResultInner weightedAvgPrice( + public TickerTradingDayResponse1Result weightedAvgPrice( @jakarta.annotation.Nullable String weightedAvgPrice) { this.weightedAvgPrice = weightedAvgPrice; return this; @@ -210,7 +210,7 @@ public void setWeightedAvgPrice(@jakarta.annotation.Nullable String weightedAvgP this.weightedAvgPrice = weightedAvgPrice; } - public TickerTradingDayResponseResultInner openPrice( + public TickerTradingDayResponse1Result openPrice( @jakarta.annotation.Nullable String openPrice) { this.openPrice = openPrice; return this; @@ -230,7 +230,7 @@ public void setOpenPrice(@jakarta.annotation.Nullable String openPrice) { this.openPrice = openPrice; } - public TickerTradingDayResponseResultInner highPrice( + public TickerTradingDayResponse1Result highPrice( @jakarta.annotation.Nullable String highPrice) { this.highPrice = highPrice; return this; @@ -250,8 +250,7 @@ public void setHighPrice(@jakarta.annotation.Nullable String highPrice) { this.highPrice = highPrice; } - public TickerTradingDayResponseResultInner lowPrice( - @jakarta.annotation.Nullable String lowPrice) { + public TickerTradingDayResponse1Result lowPrice(@jakarta.annotation.Nullable String lowPrice) { this.lowPrice = lowPrice; return this; } @@ -270,7 +269,7 @@ public void setLowPrice(@jakarta.annotation.Nullable String lowPrice) { this.lowPrice = lowPrice; } - public TickerTradingDayResponseResultInner lastPrice( + public TickerTradingDayResponse1Result lastPrice( @jakarta.annotation.Nullable String lastPrice) { this.lastPrice = lastPrice; return this; @@ -290,7 +289,7 @@ public void setLastPrice(@jakarta.annotation.Nullable String lastPrice) { this.lastPrice = lastPrice; } - public TickerTradingDayResponseResultInner volume(@jakarta.annotation.Nullable String volume) { + public TickerTradingDayResponse1Result volume(@jakarta.annotation.Nullable String volume) { this.volume = volume; return this; } @@ -309,7 +308,7 @@ public void setVolume(@jakarta.annotation.Nullable String volume) { this.volume = volume; } - public TickerTradingDayResponseResultInner quoteVolume( + public TickerTradingDayResponse1Result quoteVolume( @jakarta.annotation.Nullable String quoteVolume) { this.quoteVolume = quoteVolume; return this; @@ -329,8 +328,7 @@ public void setQuoteVolume(@jakarta.annotation.Nullable String quoteVolume) { this.quoteVolume = quoteVolume; } - public TickerTradingDayResponseResultInner openTime( - @jakarta.annotation.Nullable Long openTime) { + public TickerTradingDayResponse1Result openTime(@jakarta.annotation.Nullable Long openTime) { this.openTime = openTime; return this; } @@ -349,8 +347,7 @@ public void setOpenTime(@jakarta.annotation.Nullable Long openTime) { this.openTime = openTime; } - public TickerTradingDayResponseResultInner closeTime( - @jakarta.annotation.Nullable Long closeTime) { + public TickerTradingDayResponse1Result closeTime(@jakarta.annotation.Nullable Long closeTime) { this.closeTime = closeTime; return this; } @@ -369,7 +366,7 @@ public void setCloseTime(@jakarta.annotation.Nullable Long closeTime) { this.closeTime = closeTime; } - public TickerTradingDayResponseResultInner firstId(@jakarta.annotation.Nullable Long firstId) { + public TickerTradingDayResponse1Result firstId(@jakarta.annotation.Nullable Long firstId) { this.firstId = firstId; return this; } @@ -388,7 +385,7 @@ public void setFirstId(@jakarta.annotation.Nullable Long firstId) { this.firstId = firstId; } - public TickerTradingDayResponseResultInner lastId(@jakarta.annotation.Nullable Long lastId) { + public TickerTradingDayResponse1Result lastId(@jakarta.annotation.Nullable Long lastId) { this.lastId = lastId; return this; } @@ -407,7 +404,7 @@ public void setLastId(@jakarta.annotation.Nullable Long lastId) { this.lastId = lastId; } - public TickerTradingDayResponseResultInner count(@jakarta.annotation.Nullable Long count) { + public TickerTradingDayResponse1Result count(@jakarta.annotation.Nullable Long count) { this.count = count; return this; } @@ -434,26 +431,25 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - TickerTradingDayResponseResultInner tickerTradingDayResponseResultInner = - (TickerTradingDayResponseResultInner) o; - return Objects.equals(this.symbol, tickerTradingDayResponseResultInner.symbol) - && Objects.equals(this.priceChange, tickerTradingDayResponseResultInner.priceChange) + TickerTradingDayResponse1Result tickerTradingDayResponse1Result = + (TickerTradingDayResponse1Result) o; + return Objects.equals(this.symbol, tickerTradingDayResponse1Result.symbol) + && Objects.equals(this.priceChange, tickerTradingDayResponse1Result.priceChange) && Objects.equals( - this.priceChangePercent, - tickerTradingDayResponseResultInner.priceChangePercent) + this.priceChangePercent, tickerTradingDayResponse1Result.priceChangePercent) && Objects.equals( - this.weightedAvgPrice, tickerTradingDayResponseResultInner.weightedAvgPrice) - && Objects.equals(this.openPrice, tickerTradingDayResponseResultInner.openPrice) - && Objects.equals(this.highPrice, tickerTradingDayResponseResultInner.highPrice) - && Objects.equals(this.lowPrice, tickerTradingDayResponseResultInner.lowPrice) - && Objects.equals(this.lastPrice, tickerTradingDayResponseResultInner.lastPrice) - && Objects.equals(this.volume, tickerTradingDayResponseResultInner.volume) - && Objects.equals(this.quoteVolume, tickerTradingDayResponseResultInner.quoteVolume) - && Objects.equals(this.openTime, tickerTradingDayResponseResultInner.openTime) - && Objects.equals(this.closeTime, tickerTradingDayResponseResultInner.closeTime) - && Objects.equals(this.firstId, tickerTradingDayResponseResultInner.firstId) - && Objects.equals(this.lastId, tickerTradingDayResponseResultInner.lastId) - && Objects.equals(this.count, tickerTradingDayResponseResultInner.count); + this.weightedAvgPrice, tickerTradingDayResponse1Result.weightedAvgPrice) + && Objects.equals(this.openPrice, tickerTradingDayResponse1Result.openPrice) + && Objects.equals(this.highPrice, tickerTradingDayResponse1Result.highPrice) + && Objects.equals(this.lowPrice, tickerTradingDayResponse1Result.lowPrice) + && Objects.equals(this.lastPrice, tickerTradingDayResponse1Result.lastPrice) + && Objects.equals(this.volume, tickerTradingDayResponse1Result.volume) + && Objects.equals(this.quoteVolume, tickerTradingDayResponse1Result.quoteVolume) + && Objects.equals(this.openTime, tickerTradingDayResponse1Result.openTime) + && Objects.equals(this.closeTime, tickerTradingDayResponse1Result.closeTime) + && Objects.equals(this.firstId, tickerTradingDayResponse1Result.firstId) + && Objects.equals(this.lastId, tickerTradingDayResponse1Result.lastId) + && Objects.equals(this.count, tickerTradingDayResponse1Result.count); } @Override @@ -479,7 +475,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class TickerTradingDayResponseResultInner {\n"); + sb.append("class TickerTradingDayResponse1Result {\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" priceChange: ").append(toIndentedString(priceChange)).append("\n"); sb.append(" priceChangePercent: ") @@ -702,29 +698,28 @@ private String toIndentedString(Object o) { * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to - * TickerTradingDayResponseResultInner + * TickerTradingDayResponse1Result */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!TickerTradingDayResponseResultInner.openapiRequiredFields + if (!TickerTradingDayResponse1Result.openapiRequiredFields .isEmpty()) { // has required fields but JSON element is null throw new IllegalArgumentException( String.format( - "The required field(s) %s in TickerTradingDayResponseResultInner is" - + " not found in the empty JSON string", - TickerTradingDayResponseResultInner.openapiRequiredFields - .toString())); + "The required field(s) %s in TickerTradingDayResponse1Result is not" + + " found in the empty JSON string", + TickerTradingDayResponse1Result.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!TickerTradingDayResponseResultInner.openapiFields.contains(entry.getKey())) { + if (!TickerTradingDayResponse1Result.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException( String.format( "The field `%s` in the JSON string is not defined in the" - + " `TickerTradingDayResponseResultInner` properties. JSON: %s", + + " `TickerTradingDayResponse1Result` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } @@ -817,26 +812,26 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!TickerTradingDayResponseResultInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TickerTradingDayResponseResultInner' and - // its subtypes + if (!TickerTradingDayResponse1Result.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TickerTradingDayResponse1Result' and its + // subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = + final TypeAdapter thisAdapter = gson.getDelegateAdapter( - this, TypeToken.get(TickerTradingDayResponseResultInner.class)); + this, TypeToken.get(TickerTradingDayResponse1Result.class)); return (TypeAdapter) - new TypeAdapter() { + new TypeAdapter() { @Override - public void write(JsonWriter out, TickerTradingDayResponseResultInner value) + public void write(JsonWriter out, TickerTradingDayResponse1Result value) throws IOException { JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public TickerTradingDayResponseResultInner read(JsonReader in) + public TickerTradingDayResponse1Result read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); // validateJsonElement(jsonElement); @@ -847,20 +842,19 @@ public TickerTradingDayResponseResultInner read(JsonReader in) } /** - * Create an instance of TickerTradingDayResponseResultInner given an JSON string + * Create an instance of TickerTradingDayResponse1Result given an JSON string * * @param jsonString JSON string - * @return An instance of TickerTradingDayResponseResultInner + * @return An instance of TickerTradingDayResponse1Result * @throws IOException if the JSON string is invalid with respect to - * TickerTradingDayResponseResultInner + * TickerTradingDayResponse1Result */ - public static TickerTradingDayResponseResultInner fromJson(String jsonString) - throws IOException { - return JSON.getGson().fromJson(jsonString, TickerTradingDayResponseResultInner.class); + public static TickerTradingDayResponse1Result fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TickerTradingDayResponse1Result.class); } /** - * Convert an instance of TickerTradingDayResponseResultInner to an JSON string + * Convert an instance of TickerTradingDayResponse1Result to an JSON string * * @return JSON string */ diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponse2.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponse2.java new file mode 100644 index 000000000..b21f538b9 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponse2.java @@ -0,0 +1,419 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** TickerTradingDayResponse2 */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class TickerTradingDayResponse2 extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @jakarta.annotation.Nullable + private Long status; + + public static final String SERIALIZED_NAME_RESULT = "result"; + + @SerializedName(SERIALIZED_NAME_RESULT) + @jakarta.annotation.Nullable + private List<@Valid TickerTradingDayResponse2ResultInner> result; + + public static final String SERIALIZED_NAME_RATE_LIMITS = "rateLimits"; + + @SerializedName(SERIALIZED_NAME_RATE_LIMITS) + @jakarta.annotation.Nullable + private List<@Valid TickerResponse2RateLimitsInner> rateLimits; + + public TickerTradingDayResponse2() {} + + public TickerTradingDayResponse2 id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + + public TickerTradingDayResponse2 status(@jakarta.annotation.Nullable Long status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nullable + public Long getStatus() { + return status; + } + + public void setStatus(@jakarta.annotation.Nullable Long status) { + this.status = status; + } + + public TickerTradingDayResponse2 result( + @jakarta.annotation.Nullable List<@Valid TickerTradingDayResponse2ResultInner> result) { + this.result = result; + return this; + } + + public TickerTradingDayResponse2 addResultItem( + TickerTradingDayResponse2ResultInner resultItem) { + if (this.result == null) { + this.result = new ArrayList<>(); + } + this.result.add(resultItem); + return this; + } + + /** + * Get result + * + * @return result + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid TickerTradingDayResponse2ResultInner> getResult() { + return result; + } + + public void setResult( + @jakarta.annotation.Nullable List<@Valid TickerTradingDayResponse2ResultInner> result) { + this.result = result; + } + + public TickerTradingDayResponse2 rateLimits( + @jakarta.annotation.Nullable List<@Valid TickerResponse2RateLimitsInner> rateLimits) { + this.rateLimits = rateLimits; + return this; + } + + public TickerTradingDayResponse2 addRateLimitsItem( + TickerResponse2RateLimitsInner rateLimitsItem) { + if (this.rateLimits == null) { + this.rateLimits = new ArrayList<>(); + } + this.rateLimits.add(rateLimitsItem); + return this; + } + + /** + * Get rateLimits + * + * @return rateLimits + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid TickerResponse2RateLimitsInner> getRateLimits() { + return rateLimits; + } + + public void setRateLimits( + @jakarta.annotation.Nullable List<@Valid TickerResponse2RateLimitsInner> rateLimits) { + this.rateLimits = rateLimits; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TickerTradingDayResponse2 tickerTradingDayResponse2 = (TickerTradingDayResponse2) o; + return Objects.equals(this.id, tickerTradingDayResponse2.id) + && Objects.equals(this.status, tickerTradingDayResponse2.status) + && Objects.equals(this.result, tickerTradingDayResponse2.result) + && Objects.equals(this.rateLimits, tickerTradingDayResponse2.rateLimits); + } + + @Override + public int hashCode() { + return Objects.hash(id, status, result, rateLimits); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TickerTradingDayResponse2 {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" rateLimits: ").append(toIndentedString(rateLimits)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } + Long statusValue = getStatus(); + if (statusValue != null) { + String statusValueAsString = statusValue.toString(); + valMap.put("status", statusValueAsString); + } + List<@Valid TickerTradingDayResponse2ResultInner> resultValue = getResult(); + if (resultValue != null) { + String resultValueAsString = JSON.getGson().toJson(resultValue); + valMap.put("result", resultValueAsString); + } + List<@Valid TickerResponse2RateLimitsInner> rateLimitsValue = getRateLimits(); + if (rateLimitsValue != null) { + String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); + valMap.put("rateLimits", rateLimitsValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } + Object statusValue = getStatus(); + if (statusValue != null) { + valMap.put("status", statusValue); + } + Object resultValue = getResult(); + if (resultValue != null) { + valMap.put("result", resultValue); + } + Object rateLimitsValue = getRateLimits(); + if (rateLimitsValue != null) { + valMap.put("rateLimits", rateLimitsValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * 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 "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("status"); + openapiFields.add("result"); + openapiFields.add("rateLimits"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TickerTradingDayResponse2 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TickerTradingDayResponse2.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in TickerTradingDayResponse2 is not found" + + " in the empty JSON string", + TickerTradingDayResponse2.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TickerTradingDayResponse2.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `TickerTradingDayResponse2` properties. JSON: %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } + if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { + JsonArray jsonArrayresult = jsonObj.getAsJsonArray("result"); + if (jsonArrayresult != null) { + // ensure the json data is an array + if (!jsonObj.get("result").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `result` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("result").toString())); + } + + // validate the optional field `result` (array) + for (int i = 0; i < jsonArrayresult.size(); i++) { + TickerTradingDayResponse2ResultInner.validateJsonElement( + jsonArrayresult.get(i)); + } + ; + } + } + if (jsonObj.get("rateLimits") != null && !jsonObj.get("rateLimits").isJsonNull()) { + JsonArray jsonArrayrateLimits = jsonObj.getAsJsonArray("rateLimits"); + if (jsonArrayrateLimits != null) { + // ensure the json data is an array + if (!jsonObj.get("rateLimits").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateLimits` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("rateLimits").toString())); + } + + // validate the optional field `rateLimits` (array) + for (int i = 0; i < jsonArrayrateLimits.size(); i++) { + TickerResponse2RateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TickerTradingDayResponse2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TickerTradingDayResponse2' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(TickerTradingDayResponse2.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, TickerTradingDayResponse2 value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TickerTradingDayResponse2 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of TickerTradingDayResponse2 given an JSON string + * + * @param jsonString JSON string + * @return An instance of TickerTradingDayResponse2 + * @throws IOException if the JSON string is invalid with respect to TickerTradingDayResponse2 + */ + public static TickerTradingDayResponse2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TickerTradingDayResponse2.class); + } + + /** + * Convert an instance of TickerTradingDayResponse2 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponse2ResultInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponse2ResultInner.java new file mode 100644 index 000000000..f11841ab7 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TickerTradingDayResponse2ResultInner.java @@ -0,0 +1,875 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** TickerTradingDayResponse2ResultInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class TickerTradingDayResponse2ResultInner extends BaseDTO { + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; + + @SerializedName(SERIALIZED_NAME_SYMBOL) + @jakarta.annotation.Nullable + private String symbol; + + public static final String SERIALIZED_NAME_PRICE_CHANGE = "priceChange"; + + @SerializedName(SERIALIZED_NAME_PRICE_CHANGE) + @jakarta.annotation.Nullable + private String priceChange; + + public static final String SERIALIZED_NAME_PRICE_CHANGE_PERCENT = "priceChangePercent"; + + @SerializedName(SERIALIZED_NAME_PRICE_CHANGE_PERCENT) + @jakarta.annotation.Nullable + private String priceChangePercent; + + public static final String SERIALIZED_NAME_WEIGHTED_AVG_PRICE = "weightedAvgPrice"; + + @SerializedName(SERIALIZED_NAME_WEIGHTED_AVG_PRICE) + @jakarta.annotation.Nullable + private String weightedAvgPrice; + + public static final String SERIALIZED_NAME_OPEN_PRICE = "openPrice"; + + @SerializedName(SERIALIZED_NAME_OPEN_PRICE) + @jakarta.annotation.Nullable + private String openPrice; + + public static final String SERIALIZED_NAME_HIGH_PRICE = "highPrice"; + + @SerializedName(SERIALIZED_NAME_HIGH_PRICE) + @jakarta.annotation.Nullable + private String highPrice; + + public static final String SERIALIZED_NAME_LOW_PRICE = "lowPrice"; + + @SerializedName(SERIALIZED_NAME_LOW_PRICE) + @jakarta.annotation.Nullable + private String lowPrice; + + public static final String SERIALIZED_NAME_LAST_PRICE = "lastPrice"; + + @SerializedName(SERIALIZED_NAME_LAST_PRICE) + @jakarta.annotation.Nullable + private String lastPrice; + + public static final String SERIALIZED_NAME_VOLUME = "volume"; + + @SerializedName(SERIALIZED_NAME_VOLUME) + @jakarta.annotation.Nullable + private String volume; + + public static final String SERIALIZED_NAME_QUOTE_VOLUME = "quoteVolume"; + + @SerializedName(SERIALIZED_NAME_QUOTE_VOLUME) + @jakarta.annotation.Nullable + private String quoteVolume; + + public static final String SERIALIZED_NAME_OPEN_TIME = "openTime"; + + @SerializedName(SERIALIZED_NAME_OPEN_TIME) + @jakarta.annotation.Nullable + private Long openTime; + + public static final String SERIALIZED_NAME_CLOSE_TIME = "closeTime"; + + @SerializedName(SERIALIZED_NAME_CLOSE_TIME) + @jakarta.annotation.Nullable + private Long closeTime; + + public static final String SERIALIZED_NAME_FIRST_ID = "firstId"; + + @SerializedName(SERIALIZED_NAME_FIRST_ID) + @jakarta.annotation.Nullable + private Long firstId; + + public static final String SERIALIZED_NAME_LAST_ID = "lastId"; + + @SerializedName(SERIALIZED_NAME_LAST_ID) + @jakarta.annotation.Nullable + private Long lastId; + + public static final String SERIALIZED_NAME_COUNT = "count"; + + @SerializedName(SERIALIZED_NAME_COUNT) + @jakarta.annotation.Nullable + private Long count; + + public TickerTradingDayResponse2ResultInner() {} + + public TickerTradingDayResponse2ResultInner symbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Get symbol + * + * @return symbol + */ + @jakarta.annotation.Nullable + public String getSymbol() { + return symbol; + } + + public void setSymbol(@jakarta.annotation.Nullable String symbol) { + this.symbol = symbol; + } + + public TickerTradingDayResponse2ResultInner priceChange( + @jakarta.annotation.Nullable String priceChange) { + this.priceChange = priceChange; + return this; + } + + /** + * Absolute price change + * + * @return priceChange + */ + @jakarta.annotation.Nullable + public String getPriceChange() { + return priceChange; + } + + public void setPriceChange(@jakarta.annotation.Nullable String priceChange) { + this.priceChange = priceChange; + } + + public TickerTradingDayResponse2ResultInner priceChangePercent( + @jakarta.annotation.Nullable String priceChangePercent) { + this.priceChangePercent = priceChangePercent; + return this; + } + + /** + * Relative price change in percent + * + * @return priceChangePercent + */ + @jakarta.annotation.Nullable + public String getPriceChangePercent() { + return priceChangePercent; + } + + public void setPriceChangePercent(@jakarta.annotation.Nullable String priceChangePercent) { + this.priceChangePercent = priceChangePercent; + } + + public TickerTradingDayResponse2ResultInner weightedAvgPrice( + @jakarta.annotation.Nullable String weightedAvgPrice) { + this.weightedAvgPrice = weightedAvgPrice; + return this; + } + + /** + * quoteVolume / volume + * + * @return weightedAvgPrice + */ + @jakarta.annotation.Nullable + public String getWeightedAvgPrice() { + return weightedAvgPrice; + } + + public void setWeightedAvgPrice(@jakarta.annotation.Nullable String weightedAvgPrice) { + this.weightedAvgPrice = weightedAvgPrice; + } + + public TickerTradingDayResponse2ResultInner openPrice( + @jakarta.annotation.Nullable String openPrice) { + this.openPrice = openPrice; + return this; + } + + /** + * Get openPrice + * + * @return openPrice + */ + @jakarta.annotation.Nullable + public String getOpenPrice() { + return openPrice; + } + + public void setOpenPrice(@jakarta.annotation.Nullable String openPrice) { + this.openPrice = openPrice; + } + + public TickerTradingDayResponse2ResultInner highPrice( + @jakarta.annotation.Nullable String highPrice) { + this.highPrice = highPrice; + return this; + } + + /** + * Get highPrice + * + * @return highPrice + */ + @jakarta.annotation.Nullable + public String getHighPrice() { + return highPrice; + } + + public void setHighPrice(@jakarta.annotation.Nullable String highPrice) { + this.highPrice = highPrice; + } + + public TickerTradingDayResponse2ResultInner lowPrice( + @jakarta.annotation.Nullable String lowPrice) { + this.lowPrice = lowPrice; + return this; + } + + /** + * Get lowPrice + * + * @return lowPrice + */ + @jakarta.annotation.Nullable + public String getLowPrice() { + return lowPrice; + } + + public void setLowPrice(@jakarta.annotation.Nullable String lowPrice) { + this.lowPrice = lowPrice; + } + + public TickerTradingDayResponse2ResultInner lastPrice( + @jakarta.annotation.Nullable String lastPrice) { + this.lastPrice = lastPrice; + return this; + } + + /** + * Get lastPrice + * + * @return lastPrice + */ + @jakarta.annotation.Nullable + public String getLastPrice() { + return lastPrice; + } + + public void setLastPrice(@jakarta.annotation.Nullable String lastPrice) { + this.lastPrice = lastPrice; + } + + public TickerTradingDayResponse2ResultInner volume(@jakarta.annotation.Nullable String volume) { + this.volume = volume; + return this; + } + + /** + * Volume in base asset + * + * @return volume + */ + @jakarta.annotation.Nullable + public String getVolume() { + return volume; + } + + public void setVolume(@jakarta.annotation.Nullable String volume) { + this.volume = volume; + } + + public TickerTradingDayResponse2ResultInner quoteVolume( + @jakarta.annotation.Nullable String quoteVolume) { + this.quoteVolume = quoteVolume; + return this; + } + + /** + * Volume in quote asset + * + * @return quoteVolume + */ + @jakarta.annotation.Nullable + public String getQuoteVolume() { + return quoteVolume; + } + + public void setQuoteVolume(@jakarta.annotation.Nullable String quoteVolume) { + this.quoteVolume = quoteVolume; + } + + public TickerTradingDayResponse2ResultInner openTime( + @jakarta.annotation.Nullable Long openTime) { + this.openTime = openTime; + return this; + } + + /** + * Get openTime + * + * @return openTime + */ + @jakarta.annotation.Nullable + public Long getOpenTime() { + return openTime; + } + + public void setOpenTime(@jakarta.annotation.Nullable Long openTime) { + this.openTime = openTime; + } + + public TickerTradingDayResponse2ResultInner closeTime( + @jakarta.annotation.Nullable Long closeTime) { + this.closeTime = closeTime; + return this; + } + + /** + * Get closeTime + * + * @return closeTime + */ + @jakarta.annotation.Nullable + public Long getCloseTime() { + return closeTime; + } + + public void setCloseTime(@jakarta.annotation.Nullable Long closeTime) { + this.closeTime = closeTime; + } + + public TickerTradingDayResponse2ResultInner firstId(@jakarta.annotation.Nullable Long firstId) { + this.firstId = firstId; + return this; + } + + /** + * Trade ID of the first trade in the interval + * + * @return firstId + */ + @jakarta.annotation.Nullable + public Long getFirstId() { + return firstId; + } + + public void setFirstId(@jakarta.annotation.Nullable Long firstId) { + this.firstId = firstId; + } + + public TickerTradingDayResponse2ResultInner lastId(@jakarta.annotation.Nullable Long lastId) { + this.lastId = lastId; + return this; + } + + /** + * Trade ID of the last trade in the interval + * + * @return lastId + */ + @jakarta.annotation.Nullable + public Long getLastId() { + return lastId; + } + + public void setLastId(@jakarta.annotation.Nullable Long lastId) { + this.lastId = lastId; + } + + public TickerTradingDayResponse2ResultInner count(@jakarta.annotation.Nullable Long count) { + this.count = count; + return this; + } + + /** + * Number of trades in the interval + * + * @return count + */ + @jakarta.annotation.Nullable + public Long getCount() { + return count; + } + + public void setCount(@jakarta.annotation.Nullable Long count) { + this.count = count; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TickerTradingDayResponse2ResultInner tickerTradingDayResponse2ResultInner = + (TickerTradingDayResponse2ResultInner) o; + return Objects.equals(this.symbol, tickerTradingDayResponse2ResultInner.symbol) + && Objects.equals( + this.priceChange, tickerTradingDayResponse2ResultInner.priceChange) + && Objects.equals( + this.priceChangePercent, + tickerTradingDayResponse2ResultInner.priceChangePercent) + && Objects.equals( + this.weightedAvgPrice, + tickerTradingDayResponse2ResultInner.weightedAvgPrice) + && Objects.equals(this.openPrice, tickerTradingDayResponse2ResultInner.openPrice) + && Objects.equals(this.highPrice, tickerTradingDayResponse2ResultInner.highPrice) + && Objects.equals(this.lowPrice, tickerTradingDayResponse2ResultInner.lowPrice) + && Objects.equals(this.lastPrice, tickerTradingDayResponse2ResultInner.lastPrice) + && Objects.equals(this.volume, tickerTradingDayResponse2ResultInner.volume) + && Objects.equals( + this.quoteVolume, tickerTradingDayResponse2ResultInner.quoteVolume) + && Objects.equals(this.openTime, tickerTradingDayResponse2ResultInner.openTime) + && Objects.equals(this.closeTime, tickerTradingDayResponse2ResultInner.closeTime) + && Objects.equals(this.firstId, tickerTradingDayResponse2ResultInner.firstId) + && Objects.equals(this.lastId, tickerTradingDayResponse2ResultInner.lastId) + && Objects.equals(this.count, tickerTradingDayResponse2ResultInner.count); + } + + @Override + public int hashCode() { + return Objects.hash( + symbol, + priceChange, + priceChangePercent, + weightedAvgPrice, + openPrice, + highPrice, + lowPrice, + lastPrice, + volume, + quoteVolume, + openTime, + closeTime, + firstId, + lastId, + count); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TickerTradingDayResponse2ResultInner {\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" priceChange: ").append(toIndentedString(priceChange)).append("\n"); + sb.append(" priceChangePercent: ") + .append(toIndentedString(priceChangePercent)) + .append("\n"); + sb.append(" weightedAvgPrice: ").append(toIndentedString(weightedAvgPrice)).append("\n"); + sb.append(" openPrice: ").append(toIndentedString(openPrice)).append("\n"); + sb.append(" highPrice: ").append(toIndentedString(highPrice)).append("\n"); + sb.append(" lowPrice: ").append(toIndentedString(lowPrice)).append("\n"); + sb.append(" lastPrice: ").append(toIndentedString(lastPrice)).append("\n"); + sb.append(" volume: ").append(toIndentedString(volume)).append("\n"); + sb.append(" quoteVolume: ").append(toIndentedString(quoteVolume)).append("\n"); + sb.append(" openTime: ").append(toIndentedString(openTime)).append("\n"); + sb.append(" closeTime: ").append(toIndentedString(closeTime)).append("\n"); + sb.append(" firstId: ").append(toIndentedString(firstId)).append("\n"); + sb.append(" lastId: ").append(toIndentedString(lastId)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String symbolValue = getSymbol(); + if (symbolValue != null) { + String symbolValueAsString = symbolValue.toString(); + valMap.put("symbol", symbolValueAsString); + } + String priceChangeValue = getPriceChange(); + if (priceChangeValue != null) { + String priceChangeValueAsString = priceChangeValue.toString(); + valMap.put("priceChange", priceChangeValueAsString); + } + String priceChangePercentValue = getPriceChangePercent(); + if (priceChangePercentValue != null) { + String priceChangePercentValueAsString = priceChangePercentValue.toString(); + valMap.put("priceChangePercent", priceChangePercentValueAsString); + } + String weightedAvgPriceValue = getWeightedAvgPrice(); + if (weightedAvgPriceValue != null) { + String weightedAvgPriceValueAsString = weightedAvgPriceValue.toString(); + valMap.put("weightedAvgPrice", weightedAvgPriceValueAsString); + } + String openPriceValue = getOpenPrice(); + if (openPriceValue != null) { + String openPriceValueAsString = openPriceValue.toString(); + valMap.put("openPrice", openPriceValueAsString); + } + String highPriceValue = getHighPrice(); + if (highPriceValue != null) { + String highPriceValueAsString = highPriceValue.toString(); + valMap.put("highPrice", highPriceValueAsString); + } + String lowPriceValue = getLowPrice(); + if (lowPriceValue != null) { + String lowPriceValueAsString = lowPriceValue.toString(); + valMap.put("lowPrice", lowPriceValueAsString); + } + String lastPriceValue = getLastPrice(); + if (lastPriceValue != null) { + String lastPriceValueAsString = lastPriceValue.toString(); + valMap.put("lastPrice", lastPriceValueAsString); + } + String volumeValue = getVolume(); + if (volumeValue != null) { + String volumeValueAsString = volumeValue.toString(); + valMap.put("volume", volumeValueAsString); + } + String quoteVolumeValue = getQuoteVolume(); + if (quoteVolumeValue != null) { + String quoteVolumeValueAsString = quoteVolumeValue.toString(); + valMap.put("quoteVolume", quoteVolumeValueAsString); + } + Long openTimeValue = getOpenTime(); + if (openTimeValue != null) { + String openTimeValueAsString = openTimeValue.toString(); + valMap.put("openTime", openTimeValueAsString); + } + Long closeTimeValue = getCloseTime(); + if (closeTimeValue != null) { + String closeTimeValueAsString = closeTimeValue.toString(); + valMap.put("closeTime", closeTimeValueAsString); + } + Long firstIdValue = getFirstId(); + if (firstIdValue != null) { + String firstIdValueAsString = firstIdValue.toString(); + valMap.put("firstId", firstIdValueAsString); + } + Long lastIdValue = getLastId(); + if (lastIdValue != null) { + String lastIdValueAsString = lastIdValue.toString(); + valMap.put("lastId", lastIdValueAsString); + } + Long countValue = getCount(); + if (countValue != null) { + String countValueAsString = countValue.toString(); + valMap.put("count", countValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object symbolValue = getSymbol(); + if (symbolValue != null) { + valMap.put("symbol", symbolValue); + } + Object priceChangeValue = getPriceChange(); + if (priceChangeValue != null) { + valMap.put("priceChange", priceChangeValue); + } + Object priceChangePercentValue = getPriceChangePercent(); + if (priceChangePercentValue != null) { + valMap.put("priceChangePercent", priceChangePercentValue); + } + Object weightedAvgPriceValue = getWeightedAvgPrice(); + if (weightedAvgPriceValue != null) { + valMap.put("weightedAvgPrice", weightedAvgPriceValue); + } + Object openPriceValue = getOpenPrice(); + if (openPriceValue != null) { + valMap.put("openPrice", openPriceValue); + } + Object highPriceValue = getHighPrice(); + if (highPriceValue != null) { + valMap.put("highPrice", highPriceValue); + } + Object lowPriceValue = getLowPrice(); + if (lowPriceValue != null) { + valMap.put("lowPrice", lowPriceValue); + } + Object lastPriceValue = getLastPrice(); + if (lastPriceValue != null) { + valMap.put("lastPrice", lastPriceValue); + } + Object volumeValue = getVolume(); + if (volumeValue != null) { + valMap.put("volume", volumeValue); + } + Object quoteVolumeValue = getQuoteVolume(); + if (quoteVolumeValue != null) { + valMap.put("quoteVolume", quoteVolumeValue); + } + Object openTimeValue = getOpenTime(); + if (openTimeValue != null) { + valMap.put("openTime", openTimeValue); + } + Object closeTimeValue = getCloseTime(); + if (closeTimeValue != null) { + valMap.put("closeTime", closeTimeValue); + } + Object firstIdValue = getFirstId(); + if (firstIdValue != null) { + valMap.put("firstId", firstIdValue); + } + Object lastIdValue = getLastId(); + if (lastIdValue != null) { + valMap.put("lastId", lastIdValue); + } + Object countValue = getCount(); + if (countValue != null) { + valMap.put("count", countValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * 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 "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("symbol"); + openapiFields.add("priceChange"); + openapiFields.add("priceChangePercent"); + openapiFields.add("weightedAvgPrice"); + openapiFields.add("openPrice"); + openapiFields.add("highPrice"); + openapiFields.add("lowPrice"); + openapiFields.add("lastPrice"); + openapiFields.add("volume"); + openapiFields.add("quoteVolume"); + openapiFields.add("openTime"); + openapiFields.add("closeTime"); + openapiFields.add("firstId"); + openapiFields.add("lastId"); + openapiFields.add("count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * TickerTradingDayResponse2ResultInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TickerTradingDayResponse2ResultInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in TickerTradingDayResponse2ResultInner" + + " is not found in the empty JSON string", + TickerTradingDayResponse2ResultInner.openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TickerTradingDayResponse2ResultInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `TickerTradingDayResponse2ResultInner` properties. JSON:" + + " %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) + && !jsonObj.get("symbol").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `symbol` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("symbol").toString())); + } + if ((jsonObj.get("priceChange") != null && !jsonObj.get("priceChange").isJsonNull()) + && !jsonObj.get("priceChange").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `priceChange` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("priceChange").toString())); + } + if ((jsonObj.get("priceChangePercent") != null + && !jsonObj.get("priceChangePercent").isJsonNull()) + && !jsonObj.get("priceChangePercent").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `priceChangePercent` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("priceChangePercent").toString())); + } + if ((jsonObj.get("weightedAvgPrice") != null + && !jsonObj.get("weightedAvgPrice").isJsonNull()) + && !jsonObj.get("weightedAvgPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `weightedAvgPrice` to be a primitive type in the" + + " JSON string but got `%s`", + jsonObj.get("weightedAvgPrice").toString())); + } + if ((jsonObj.get("openPrice") != null && !jsonObj.get("openPrice").isJsonNull()) + && !jsonObj.get("openPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `openPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("openPrice").toString())); + } + if ((jsonObj.get("highPrice") != null && !jsonObj.get("highPrice").isJsonNull()) + && !jsonObj.get("highPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `highPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("highPrice").toString())); + } + if ((jsonObj.get("lowPrice") != null && !jsonObj.get("lowPrice").isJsonNull()) + && !jsonObj.get("lowPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `lowPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("lowPrice").toString())); + } + if ((jsonObj.get("lastPrice") != null && !jsonObj.get("lastPrice").isJsonNull()) + && !jsonObj.get("lastPrice").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `lastPrice` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("lastPrice").toString())); + } + if ((jsonObj.get("volume") != null && !jsonObj.get("volume").isJsonNull()) + && !jsonObj.get("volume").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `volume` to be a primitive type in the JSON string" + + " but got `%s`", + jsonObj.get("volume").toString())); + } + if ((jsonObj.get("quoteVolume") != null && !jsonObj.get("quoteVolume").isJsonNull()) + && !jsonObj.get("quoteVolume").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `quoteVolume` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("quoteVolume").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TickerTradingDayResponse2ResultInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TickerTradingDayResponse2ResultInner' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(TickerTradingDayResponse2ResultInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, TickerTradingDayResponse2ResultInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TickerTradingDayResponse2ResultInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of TickerTradingDayResponse2ResultInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of TickerTradingDayResponse2ResultInner + * @throws IOException if the JSON string is invalid with respect to + * TickerTradingDayResponse2ResultInner + */ + public static TickerTradingDayResponse2ResultInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, TickerTradingDayResponse2ResultInner.class); + } + + /** + * Convert an instance of TickerTradingDayResponse2ResultInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TimeInForce.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TimeInForce.java index 73162c7e5..bd696fbb0 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TimeInForce.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TimeInForce.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Please see [Enums](/products/spot/enums#timeinforce) for supported values. */ +/** Please see Enums for supported values. */ @JsonAdapter(TimeInForce.Adapter.class) public enum TimeInForce { GTC("GTC"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TimeResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TimeResponse.java index 02b9b374d..35b920345 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TimeResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TimeResponse.java @@ -65,7 +65,7 @@ public class TimeResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid PingResponseRateLimitsInner> rateLimits; public TimeResponse() {} @@ -128,13 +128,12 @@ public void setResult(@jakarta.annotation.Nullable TimeResponseResult result) { } public TimeResponse rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public TimeResponse addRateLimitsItem(AccountCommissionResponseRateLimitsInner rateLimitsItem) { + public TimeResponse addRateLimitsItem(PingResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -149,13 +148,12 @@ public TimeResponse addRateLimitsItem(AccountCommissionResponseRateLimitsInner r */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid PingResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid PingResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -210,7 +208,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid PingResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -333,8 +331,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + PingResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesAggregateResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesAggregateResponse.java index 7398f8948..b89fde785 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesAggregateResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesAggregateResponse.java @@ -65,7 +65,7 @@ public class TradesAggregateResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimits; public TradesAggregateResponse() {} @@ -139,13 +139,13 @@ public void setResult( public TradesAggregateResponse rateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public TradesAggregateResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + OrderAmendmentsResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -160,13 +160,13 @@ public TradesAggregateResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid OrderAmendmentsResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -221,7 +221,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid OrderAmendmentsResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -359,7 +359,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( + OrderAmendmentsResponseRateLimitsInner.validateJsonElement( jsonArrayrateLimits.get(i)); } ; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesHistoricalResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesHistoricalResponse.java index 83c62d174..43262e038 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesHistoricalResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesHistoricalResponse.java @@ -65,7 +65,7 @@ public class TradesHistoricalResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid TradesHistoricalResponseRateLimitsInner> rateLimits; public TradesHistoricalResponse() {} @@ -139,13 +139,13 @@ public void setResult( public TradesHistoricalResponse rateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid TradesHistoricalResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public TradesHistoricalResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + TradesHistoricalResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -160,13 +160,13 @@ public TradesHistoricalResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid TradesHistoricalResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid TradesHistoricalResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -221,7 +221,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid TradesHistoricalResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -359,7 +359,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( + TradesHistoricalResponseRateLimitsInner.validateJsonElement( jsonArrayrateLimits.get(i)); } ; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesHistoricalResponseRateLimitsInner.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesHistoricalResponseRateLimitsInner.java new file mode 100644 index 000000000..2a789b566 --- /dev/null +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesHistoricalResponseRateLimitsInner.java @@ -0,0 +1,413 @@ +/* + * Spot WebSocket API + * Access market data, manage accounts, and trade on Binance Spot. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.binance.connector.client.spot.websocket.api.model; + +import com.binance.connector.client.common.websocket.dtos.BaseDTO; +import com.binance.connector.client.spot.websocket.api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.TreeMap; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** TradesHistoricalResponseRateLimitsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.22.0") +public class TradesHistoricalResponseRateLimitsInner extends BaseDTO { + public static final String SERIALIZED_NAME_RATE_LIMIT_TYPE = "rateLimitType"; + + @SerializedName(SERIALIZED_NAME_RATE_LIMIT_TYPE) + @jakarta.annotation.Nullable + private String rateLimitType; + + public static final String SERIALIZED_NAME_INTERVAL = "interval"; + + @SerializedName(SERIALIZED_NAME_INTERVAL) + @jakarta.annotation.Nullable + private String interval; + + public static final String SERIALIZED_NAME_INTERVAL_NUM = "intervalNum"; + + @SerializedName(SERIALIZED_NAME_INTERVAL_NUM) + @jakarta.annotation.Nullable + private Long intervalNum; + + public static final String SERIALIZED_NAME_LIMIT = "limit"; + + @SerializedName(SERIALIZED_NAME_LIMIT) + @jakarta.annotation.Nullable + private Long limit; + + public static final String SERIALIZED_NAME_COUNT = "count"; + + @SerializedName(SERIALIZED_NAME_COUNT) + @jakarta.annotation.Nullable + private Long count; + + public TradesHistoricalResponseRateLimitsInner() {} + + public TradesHistoricalResponseRateLimitsInner rateLimitType( + @jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + return this; + } + + /** + * Get rateLimitType + * + * @return rateLimitType + */ + @jakarta.annotation.Nullable + public String getRateLimitType() { + return rateLimitType; + } + + public void setRateLimitType(@jakarta.annotation.Nullable String rateLimitType) { + this.rateLimitType = rateLimitType; + } + + public TradesHistoricalResponseRateLimitsInner interval( + @jakarta.annotation.Nullable String interval) { + this.interval = interval; + return this; + } + + /** + * Get interval + * + * @return interval + */ + @jakarta.annotation.Nullable + public String getInterval() { + return interval; + } + + public void setInterval(@jakarta.annotation.Nullable String interval) { + this.interval = interval; + } + + public TradesHistoricalResponseRateLimitsInner intervalNum( + @jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + return this; + } + + /** + * Get intervalNum + * + * @return intervalNum + */ + @jakarta.annotation.Nullable + public Long getIntervalNum() { + return intervalNum; + } + + public void setIntervalNum(@jakarta.annotation.Nullable Long intervalNum) { + this.intervalNum = intervalNum; + } + + public TradesHistoricalResponseRateLimitsInner limit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + return this; + } + + /** + * Get limit + * + * @return limit + */ + @jakarta.annotation.Nullable + public Long getLimit() { + return limit; + } + + public void setLimit(@jakarta.annotation.Nullable Long limit) { + this.limit = limit; + } + + public TradesHistoricalResponseRateLimitsInner count(@jakarta.annotation.Nullable Long count) { + this.count = count; + return this; + } + + /** + * Get count + * + * @return count + */ + @jakarta.annotation.Nullable + public Long getCount() { + return count; + } + + public void setCount(@jakarta.annotation.Nullable Long count) { + this.count = count; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TradesHistoricalResponseRateLimitsInner tradesHistoricalResponseRateLimitsInner = + (TradesHistoricalResponseRateLimitsInner) o; + return Objects.equals( + this.rateLimitType, tradesHistoricalResponseRateLimitsInner.rateLimitType) + && Objects.equals(this.interval, tradesHistoricalResponseRateLimitsInner.interval) + && Objects.equals( + this.intervalNum, tradesHistoricalResponseRateLimitsInner.intervalNum) + && Objects.equals(this.limit, tradesHistoricalResponseRateLimitsInner.limit) + && Objects.equals(this.count, tradesHistoricalResponseRateLimitsInner.count); + } + + @Override + public int hashCode() { + return Objects.hash(rateLimitType, interval, intervalNum, limit, count); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TradesHistoricalResponseRateLimitsInner {\n"); + sb.append(" rateLimitType: ").append(toIndentedString(rateLimitType)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" intervalNum: ").append(toIndentedString(intervalNum)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + String rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + String rateLimitTypeValueAsString = rateLimitTypeValue.toString(); + valMap.put("rateLimitType", rateLimitTypeValueAsString); + } + String intervalValue = getInterval(); + if (intervalValue != null) { + String intervalValueAsString = intervalValue.toString(); + valMap.put("interval", intervalValueAsString); + } + Long intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + String intervalNumValueAsString = intervalNumValue.toString(); + valMap.put("intervalNum", intervalNumValueAsString); + } + Long limitValue = getLimit(); + if (limitValue != null) { + String limitValueAsString = limitValue.toString(); + valMap.put("limit", limitValueAsString); + } + Long countValue = getCount(); + if (countValue != null) { + String countValueAsString = countValue.toString(); + valMap.put("count", countValueAsString); + } + + valMap.put("timestamp", getTimestamp()); + return asciiEncode( + valMap.keySet().stream() + .map(key -> key + "=" + valMap.get(key)) + .collect(Collectors.joining("&"))); + } + + public Map toMap() { + Map valMap = new TreeMap(); + valMap.put("apiKey", getApiKey()); + Object rateLimitTypeValue = getRateLimitType(); + if (rateLimitTypeValue != null) { + valMap.put("rateLimitType", rateLimitTypeValue); + } + Object intervalValue = getInterval(); + if (intervalValue != null) { + valMap.put("interval", intervalValue); + } + Object intervalNumValue = getIntervalNum(); + if (intervalNumValue != null) { + valMap.put("intervalNum", intervalNumValue); + } + Object limitValue = getLimit(); + if (limitValue != null) { + valMap.put("limit", limitValue); + } + Object countValue = getCount(); + if (countValue != null) { + valMap.put("count", countValue); + } + + valMap.put("timestamp", getTimestamp()); + return valMap; + } + + public static String asciiEncode(String s) { + return new String(s.getBytes(), StandardCharsets.US_ASCII); + } + + /** + * 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 "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("rateLimitType"); + openapiFields.add("interval"); + openapiFields.add("intervalNum"); + openapiFields.add("limit"); + openapiFields.add("count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * TradesHistoricalResponseRateLimitsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TradesHistoricalResponseRateLimitsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in" + + " TradesHistoricalResponseRateLimitsInner is not found in the" + + " empty JSON string", + TradesHistoricalResponseRateLimitsInner.openapiRequiredFields + .toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TradesHistoricalResponseRateLimitsInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException( + String.format( + "The field `%s` in the JSON string is not defined in the" + + " `TradesHistoricalResponseRateLimitsInner` properties. JSON:" + + " %s", + entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("rateLimitType") != null && !jsonObj.get("rateLimitType").isJsonNull()) + && !jsonObj.get("rateLimitType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `rateLimitType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("rateLimitType").toString())); + } + if ((jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull()) + && !jsonObj.get("interval").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `interval` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("interval").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TradesHistoricalResponseRateLimitsInner.class.isAssignableFrom( + type.getRawType())) { + return null; // this class only serializes 'TradesHistoricalResponseRateLimitsInner' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(TradesHistoricalResponseRateLimitsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, TradesHistoricalResponseRateLimitsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TradesHistoricalResponseRateLimitsInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of TradesHistoricalResponseRateLimitsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of TradesHistoricalResponseRateLimitsInner + * @throws IOException if the JSON string is invalid with respect to + * TradesHistoricalResponseRateLimitsInner + */ + public static TradesHistoricalResponseRateLimitsInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, TradesHistoricalResponseRateLimitsInner.class); + } + + /** + * Convert an instance of TradesHistoricalResponseRateLimitsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesRecentResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesRecentResponse.java index 5c49894e1..8b8f344dd 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesRecentResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/TradesRecentResponse.java @@ -65,7 +65,7 @@ public class TradesRecentResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid TradesHistoricalResponseRateLimitsInner> rateLimits; public TradesRecentResponse() {} @@ -139,13 +139,13 @@ public void setResult( public TradesRecentResponse rateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid TradesHistoricalResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } public TradesRecentResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + TradesHistoricalResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -160,13 +160,13 @@ public TradesRecentResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid TradesHistoricalResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + List<@Valid TradesHistoricalResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -221,7 +221,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid TradesHistoricalResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -359,7 +359,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( + TradesHistoricalResponseRateLimitsInner.validateJsonElement( jsonArrayrateLimits.get(i)); } ; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UiKlinesResponse.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UiKlinesResponse.java index 36c55dfac..82ef93cbd 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UiKlinesResponse.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/UiKlinesResponse.java @@ -65,7 +65,7 @@ public class UiKlinesResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_RATE_LIMITS) @jakarta.annotation.Nullable - private List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits; + private List<@Valid AvgPriceResponseRateLimitsInner> rateLimits; public UiKlinesResponse() {} @@ -138,14 +138,12 @@ public void setResult( } public UiKlinesResponse rateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid AvgPriceResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; return this; } - public UiKlinesResponse addRateLimitsItem( - AccountCommissionResponseRateLimitsInner rateLimitsItem) { + public UiKlinesResponse addRateLimitsItem(AvgPriceResponseRateLimitsInner rateLimitsItem) { if (this.rateLimits == null) { this.rateLimits = new ArrayList<>(); } @@ -160,13 +158,12 @@ public UiKlinesResponse addRateLimitsItem( */ @jakarta.annotation.Nullable @Valid - public List<@Valid AccountCommissionResponseRateLimitsInner> getRateLimits() { + public List<@Valid AvgPriceResponseRateLimitsInner> getRateLimits() { return rateLimits; } public void setRateLimits( - @jakarta.annotation.Nullable - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimits) { + @jakarta.annotation.Nullable List<@Valid AvgPriceResponseRateLimitsInner> rateLimits) { this.rateLimits = rateLimits; } @@ -221,7 +218,7 @@ public String toUrlQueryString() { String resultValueAsString = JSON.getGson().toJson(resultValue); valMap.put("result", resultValueAsString); } - List<@Valid AccountCommissionResponseRateLimitsInner> rateLimitsValue = getRateLimits(); + List<@Valid AvgPriceResponseRateLimitsInner> rateLimitsValue = getRateLimits(); if (rateLimitsValue != null) { String rateLimitsValueAsString = JSON.getGson().toJson(rateLimitsValue); valMap.put("rateLimits", rateLimitsValueAsString); @@ -350,8 +347,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `rateLimits` (array) for (int i = 0; i < jsonArrayrateLimits.size(); i++) { - AccountCommissionResponseRateLimitsInner.validateJsonElement( - jsonArrayrateLimits.get(i)); + AvgPriceResponseRateLimitsInner.validateJsonElement(jsonArrayrateLimits.get(i)); } ; } diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingPegPriceType.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingPegPriceType.java index afc0b1651..1e08c646a 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingPegPriceType.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingPegPriceType.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** See [Pegged Orders](/products/spot/faqs/pegged_orders) */ +/** See Pegged Orders */ @JsonAdapter(WorkingPegPriceType.Adapter.class) public enum WorkingPegPriceType { PRIMARY_PEG("PRIMARY_PEG"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingSide.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingSide.java index 2f7a6316a..a998e4577 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingSide.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingSide.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Supported values: [Order Side](/products/spot/enums#side) */ +/** Supported values: Order Side */ @JsonAdapter(WorkingSide.Adapter.class) public enum WorkingSide { BUY("BUY"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingTimeInForce.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingTimeInForce.java index 95e6efb53..1b50918af 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingTimeInForce.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/api/model/WorkingTimeInForce.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Supported values: [Time In Force](/products/spot/enums#timeinforce) */ +/** Supported values: Time In Force */ @JsonAdapter(WorkingTimeInForce.Adapter.class) public enum WorkingTimeInForce { GTC("GTC"), diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/api/DefaultApi.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/api/DefaultApi.java index 1f8726241..a6336d68d 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/api/DefaultApi.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/api/DefaultApi.java @@ -67,7 +67,7 @@ public class DefaultApi { private static final String USER_AGENT = String.format( - "binance-spot/11.0.1 (Java/%s; %s; %s)", + "binance-spot/11.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private StreamConnectionInterface connection; @@ -772,11 +772,12 @@ private void klineValidateBeforeCall(KlineRequest klineRequest) throws ApiExcept * Kline/Candlestick Streams with timezone offset The Kline/Candlestick Stream push updates to * the current klines/candlestick every second in `UTC+8` timezone **Kline/Candlestick * chart intervals:** Supported intervals: See Kline/Candlestick chart intervals **UTC+8 - * timezone offset:** - Kline intervals open and close in the UTC+8 timezone. For example the 1d - * klines will open at the beginning of the UTC+8 day, and close at the end of the UTC+8 day. - - * Note that E (event time), t (start time) and T (close time) in the payload are Unix - * timestamps, which are always interpreted in UTC. Update Speed: 1000ms for `1s`, - * 2000ms for the other intervals + * timezone offset:** - Kline intervals open and close in the `UTC+8` timezone. For + * example the `1d` klines will open at the beginning of the `UTC+8` day, + * and close at the end of the `UTC+8` day. - Note that `E` (event time), + * `t` (start time) and `T` (close time) in the payload are Unix timestamps, + * which are always interpreted in UTC. Update Speed: 1000ms for `1s`, 2000ms for the + * other intervals * * @param klineOffsetRequest (required) * @return KlineOffsetResponse @@ -947,8 +948,8 @@ private void miniTickerValidateBeforeCall(MiniTickerRequest miniTickerRequest) } /** - * WebSocket Partial Book Depth Streams Top **\\<levels\\>** bids and asks, pushed every - * second. Update Speed: 1000ms or 100ms + * Partial Book Depth Streams Top **\\<levels\\>** bids and asks, pushed every second. + * Valid **\\<levels\\>** are 5, 10, or 20. Update Speed: 1000ms or 100ms * * @param partialBookDepthRequest (required) * @return PartialBookDepthResponse @@ -962,8 +963,8 @@ private void miniTickerValidateBeforeCall(MiniTickerRequest miniTickerRequest) * * * @see WebSocket - * Partial Book Depth Streams Documentation + * href="https://developers.binance.com/en/docs/catalog/core-trading-spot-trading/api/ws-streams/~#partial-book-depth">Partial + * Book Depth Streams Documentation */ public StreamBlockingQueueWrapper partialBookDepth( PartialBookDepthRequest partialBookDepthRequest) throws ApiException { @@ -1128,7 +1129,7 @@ private void referencePriceValidateBeforeCall(ReferencePriceRequest referencePri * `<symbol>@ticker` stream. The open time `\"O\"` always * starts on a minute, while the closing time `\"C\"` is the current time of * the update. As such, the effective window might be up to 59999ms wider than - * `<window_size>`. Update Speed: 1000ms + * `<windowSize>`. Update Speed: 1000ms * * @param rollingWindowTickerRequest (required) * @return RollingWindowTickerResponse diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/api/SpotWebSocketStreams.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/api/SpotWebSocketStreams.java index dd9d3c7e1..c8d4ac1fc 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/api/SpotWebSocketStreams.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/api/SpotWebSocketStreams.java @@ -50,7 +50,7 @@ public class SpotWebSocketStreams { private static final String USER_AGENT = String.format( - "binance-spot/11.0.1 (Java/%s; %s; %s)", + "binance-spot/11.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private final StreamConnectionInterface connection; diff --git a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExecutionReport.java b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExecutionReport.java index 16fce9ff9..d5f60d4a2 100644 --- a/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExecutionReport.java +++ b/clients/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/model/ExecutionReport.java @@ -26,6 +26,7 @@ import jakarta.validation.constraints.*; import java.io.IOException; import java.nio.charset.StandardCharsets; +import java.util.Arrays; import java.util.HashSet; import java.util.Map; import java.util.Objects; @@ -33,6 +34,7 @@ import java.util.TreeMap; import java.util.stream.Collectors; import org.hibernate.validator.constraints.*; +import org.openapitools.jackson.nullable.JsonNullable; /** ExecutionReport */ @jakarta.annotation.Generated( @@ -1482,6 +1484,15 @@ public boolean equals(Object o) { && Objects.equals(this.eR, executionReport.eR); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b + || (a != null + && b != null + && a.isPresent() + && b.isPresent() + && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { return Objects.hash( @@ -1542,6 +1553,13 @@ public int hashCode() { eR); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[] {a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/clients/spot/src/test/java/com/binance/connector/client/spot/rest/api/TradeApiTest.java b/clients/spot/src/test/java/com/binance/connector/client/spot/rest/api/TradeApiTest.java index 6ea553282..01231816f 100644 --- a/clients/spot/src/test/java/com/binance/connector/client/spot/rest/api/TradeApiTest.java +++ b/clients/spot/src/test/java/com/binance/connector/client/spot/rest/api/TradeApiTest.java @@ -867,8 +867,8 @@ public void sorOrderTestTest() throws ApiException, CryptoException, IOException Call captorValue = callArgumentCaptor.getValue(); Request actualRequest = captorValue.request(); - assertEquals("timestamp=1736393892000computeCommissionRates=false&symbol=BNBUSDT&side=BUY&quantity=1&type=MARKET", signInputCaptor.getValue()); - assertEquals("af317a0ac951f12999280aa1c3362b23b02460ff5fe5527e86b375a88cc98554", actualRequest.url().queryParameter("signature")); + assertEquals("timestamp=1736393892000symbol=BNBUSDT&side=BUY&quantity=1&type=MARKET", signInputCaptor.getValue()); + assertEquals("84bb7809eacf584b9d7dccae40864b17ca8fcf3de423b05e0a171b8a0c67ed62", actualRequest.url().queryParameter("signature")); assertEquals("/api/v3/sor/order/test", actualRequest.url().encodedPath()); } } diff --git a/clients/staking/CHANGELOG.md b/clients/staking/CHANGELOG.md index 507d58bae..9d2b6af60 100644 --- a/clients/staking/CHANGELOG.md +++ b/clients/staking/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 6.0.2 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 6.0.1 - 2026-08-25 ### Changed (1) diff --git a/clients/staking/docs/rest-api/migration-guide.md b/clients/staking/docs/rest-api/migration-guide.md index e722d62f3..a7809954b 100644 --- a/clients/staking/docs/rest-api/migration-guide.md +++ b/clients/staking/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-staking - 6.0.0 + 6.0.2 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-staking - 6.0.0 + 6.0.2 ``` diff --git a/clients/staking/pom.xml b/clients/staking/pom.xml index 0368f99d4..e6a4290af 100644 --- a/clients/staking/pom.xml +++ b/clients/staking/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-staking staking - 6.0.1 + 6.0.2 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/EthStakingApi.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/EthStakingApi.java index 2745012ed..3c39b543d 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/EthStakingApi.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/EthStakingApi.java @@ -57,7 +57,7 @@ public class EthStakingApi { private static final String USER_AGENT = String.format( - "binance-staking/6.0.1 (Java/%s; %s; %s)", + "binance-staking/6.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/OnChainYieldsApi.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/OnChainYieldsApi.java index 6f8c54241..a238fffdc 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/OnChainYieldsApi.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/OnChainYieldsApi.java @@ -59,7 +59,7 @@ public class OnChainYieldsApi { private static final String USER_AGENT = String.format( - "binance-staking/6.0.1 (Java/%s; %s; %s)", + "binance-staking/6.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/SoftStakingApi.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/SoftStakingApi.java index 775f6ed46..7173a932e 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/SoftStakingApi.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/SoftStakingApi.java @@ -44,7 +44,7 @@ public class SoftStakingApi { private static final String USER_AGENT = String.format( - "binance-staking/6.0.1 (Java/%s; %s; %s)", + "binance-staking/6.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/SolStakingApi.java b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/SolStakingApi.java index e080baa09..73edcd3bd 100644 --- a/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/SolStakingApi.java +++ b/clients/staking/src/main/java/com/binance/connector/client/staking/rest/api/SolStakingApi.java @@ -58,7 +58,7 @@ public class SolStakingApi { private static final String USER_AGENT = String.format( - "binance-staking/6.0.1 (Java/%s; %s; %s)", + "binance-staking/6.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/stocks/CHANGELOG.md b/clients/stocks/CHANGELOG.md index ae2a79b9a..eac1f57ef 100644 --- a/clients/stocks/CHANGELOG.md +++ b/clients/stocks/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.0.1 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 1.0.0 - 2026-08-17 - Initial release diff --git a/clients/stocks/docs/CalendarStreamResponse.md b/clients/stocks/docs/CalendarStreamResponse.md index c8f0032cd..681084307 100644 --- a/clients/stocks/docs/CalendarStreamResponse.md +++ b/clients/stocks/docs/CalendarStreamResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**ELowerCase** | **String** | Event type, always `\"calendar\"`. | [optional] | +|**eLowerCase** | **String** | Event type, always `\"calendar\"`. | [optional] | |**from** | **String** | Previous market phase. | [optional] | |**to** | **String** | New market phase. | [optional] | |**ts** | **Long** | Event timestamp (epoch milliseconds UTC) when the transition was detected. | [optional] | diff --git a/clients/stocks/docs/KlineStreamRequest.md b/clients/stocks/docs/KlineStreamRequest.md index 10008b334..1012bd3db 100644 --- a/clients/stocks/docs/KlineStreamRequest.md +++ b/clients/stocks/docs/KlineStreamRequest.md @@ -7,6 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique WebSocket request ID. | [optional] | |**symbol** | **String** | US-equity ticker (UPPERCASE), e.g. `AAPL`. | [optional] | |**interval** | **String** | Kline interval — `5m` / `1h` / `1d` / `1w` / `1M`. | [optional] | diff --git a/clients/stocks/docs/KlineStreamResponse.md b/clients/stocks/docs/KlineStreamResponse.md index eb904ab07..c5629f919 100644 --- a/clients/stocks/docs/KlineStreamResponse.md +++ b/clients/stocks/docs/KlineStreamResponse.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**ELowerCase** | **String** | Event type, always `\"kline\"`. | [optional] | +|**eLowerCase** | **String** | Event type, always `\"kline\"`. | [optional] | |**E** | **Long** | Event time (epoch milliseconds); server-side system time when the message is pushed. | [optional] | -|**SLowerCase** | **String** | Symbol (UPPERCASE ticker). | [optional] | -|**KLowerCase** | [**KlineStreamResponseK**](KlineStreamResponseK.md) | | [optional] | +|**sLowerCase** | **String** | Symbol (UPPERCASE ticker). | [optional] | +|**kLowerCase** | [**KlineStreamResponseK**](KlineStreamResponseK.md) | | [optional] | diff --git a/clients/stocks/docs/KlineStreamResponseK.md b/clients/stocks/docs/KlineStreamResponseK.md index 47a94007c..2b14df7bb 100644 --- a/clients/stocks/docs/KlineStreamResponseK.md +++ b/clients/stocks/docs/KlineStreamResponseK.md @@ -8,17 +8,17 @@ Candlestick payload. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**TLowerCase** | **Long** | Open time (epoch milliseconds). | [optional] | +|**tLowerCase** | **Long** | Open time (epoch milliseconds). | [optional] | |**ct** | **Long** | Close time (epoch milliseconds). For fixed intervals: `openTime + duration − 1ms`. For `1M`: last day of month at 23:59:59.999 UTC. | [optional] | -|**SLowerCase** | **String** | Symbol (UPPERCASE ticker). | [optional] | -|**ILowerCase** | **String** | Interval — `\"5m\"` / `\"1h\"` / `\"1d\"` / `\"1w\"` / `\"1M\"`. | [optional] | -|**OLowerCase** | **String** | Open price. | [optional] | -|**CLowerCase** | **String** | Close price (latest print within the interval). | [optional] | -|**HLowerCase** | **String** | High price. | [optional] | -|**LLowerCase** | **String** | Low price. | [optional] | -|**VLowerCase** | **String** | Volume (shares), default `\"0\"`. | [optional] | -|**NLowerCase** | **Integer** | Trade count; absent when upstream did not populate. | [optional] | -|**XLowerCase** | **Boolean** | Candle is closed — `true` once the interval has ended. | [optional] | +|**sLowerCase** | **String** | Symbol (UPPERCASE ticker). | [optional] | +|**iLowerCase** | **String** | Interval — `\"5m\"` / `\"1h\"` / `\"1d\"` / `\"1w\"` / `\"1M\"`. | [optional] | +|**oLowerCase** | **String** | Open price. | [optional] | +|**cLowerCase** | **String** | Close price (latest print within the interval). | [optional] | +|**hLowerCase** | **String** | High price. | [optional] | +|**lLowerCase** | **String** | Low price. | [optional] | +|**vLowerCase** | **String** | Volume (shares), default `\"0\"`. | [optional] | +|**nLowerCase** | **Integer** | Trade count; absent when upstream did not populate. | [optional] | +|**xLowerCase** | **Boolean** | Candle is closed — `true` once the interval has ended. | [optional] | |**vw** | **String** | VWAP (volume-weighted average price); absent when upstream did not populate. | [optional] | diff --git a/clients/stocks/docs/MarketStreamsApi.md b/clients/stocks/docs/MarketStreamsApi.md index 62452614e..8bdab5086 100644 --- a/clients/stocks/docs/MarketStreamsApi.md +++ b/clients/stocks/docs/MarketStreamsApi.md @@ -18,7 +18,7 @@ All URIs are relative to *http://localhost* Calendar Stream -Single-stream broadcast of market-phase transitions. One message per transition; no periodic heartbeat payload. Server polls every 5 seconds. +Single-stream broadcast of market-phase transitions. One message per transition; no periodic heartbeat payload. Server polls every 5 seconds. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC. ### Example ```java @@ -76,7 +76,7 @@ No authorization required Kline Stream -Per-symbol candlestick updates. One stream per (symbol, interval) combination. Supported intervals: 5m, 1h, 1d, 1w, 1M. +Per-symbol candlestick updates. One stream per (symbol, interval) combination. Supported intervals: 5m, 1h, 1d, 1w, 1M. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC. ### Example ```java @@ -138,7 +138,7 @@ No authorization required Price Stream -Push-all price snapshot, polled every 3 seconds. One message carries the latest price for every active US-equity symbol. +Push-all price snapshot, polled every 3 seconds. One message carries the latest price for every active US-equity symbol. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC. ### Example ```java @@ -196,7 +196,7 @@ No authorization required Quote Stream -Per-symbol real-time best-bid / best-ask. Each symbol has its own stream. Per-symbol throttle: at most one push per symbol every 200 ms. +Per-symbol real-time best-bid / best-ask. Each symbol has its own stream. Per-symbol throttle: at most one push per symbol every 200 ms. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC. ### Example ```java @@ -258,7 +258,7 @@ No authorization required Tradability Stream -Per-symbol push whenever the tradable direction of a symbol changes. Pushed only when the value actually changes (new value ≠ old value). +Per-symbol push whenever the tradable direction of a symbol changes. Pushed only when the value actually changes (new value ≠ old value). Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC. ### Example ```java @@ -320,7 +320,7 @@ No authorization required Trading Status Stream -Per-symbol trading-status transitions (halts, resumes, SSR, LULD pauses, etc.). Events that do not match a known status/reason rule are not pushed. +Per-symbol trading-status transitions (halts, resumes, SSR, LULD pauses, etc.). Events that do not match a known status/reason rule are not pushed. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC. ### Example ```java diff --git a/clients/stocks/docs/OrderReportStreamRequest.md b/clients/stocks/docs/OrderReportStreamRequest.md index e1943e039..3cf07c613 100644 --- a/clients/stocks/docs/OrderReportStreamRequest.md +++ b/clients/stocks/docs/OrderReportStreamRequest.md @@ -7,6 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique WebSocket request ID. | [optional] | |**listenKey** | **String** | User data listen key obtained from the Listen Key endpoint. | [optional] | diff --git a/clients/stocks/docs/OrderReportStreamResponse.md b/clients/stocks/docs/OrderReportStreamResponse.md index d361a45b5..08e7660dc 100644 --- a/clients/stocks/docs/OrderReportStreamResponse.md +++ b/clients/stocks/docs/OrderReportStreamResponse.md @@ -7,24 +7,24 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**ELowerCase** | **String** | Event type, always `\"orderReport\"`. | [optional] | +|**eLowerCase** | **String** | Event type, always `\"orderReport\"`. | [optional] | |**E** | **Long** | Event time (epoch milliseconds); server push time. | [optional] | -|**XLowerCase** | **String** | Execution type: `\"ORDER_UPDATE\"` (still open) or `\"ORDER_TERMINAL\"` (reached terminal state). | [optional] | -|**ILowerCase** | **String** | Order ID (UUID). | [optional] | +|**xLowerCase** | **String** | Execution type: `\"ORDER_UPDATE\"` (still open) or `\"ORDER_TERMINAL\"` (reached terminal state). | [optional] | +|**iLowerCase** | **String** | Order ID (UUID). | [optional] | |**ai** | **String** | Asset ID (internal identifier). | [optional] | -|**BLowerCase** | **String** | Base asset — the internal asset code with an `EQ_` prefix (e.g. `\"EQ_AAPL\"`), not the bare ticker used in REST responses / order input. Strip the `EQ_` prefix to match a symbol used elsewhere. | [optional] | -|**QLowerCase** | **String** | Quote currency, e.g. `\"USD\"`. | [optional] | +|**bLowerCase** | **String** | Base asset — the internal asset code with an `EQ_` prefix (e.g. `\"EQ_AAPL\"`), not the bare ticker used in REST responses / order input. Strip the `EQ_` prefix to match a symbol used elsewhere. | [optional] | +|**qLowerCase** | **String** | Quote currency, e.g. `\"USD\"`. | [optional] | |**S** | **String** | Order side: `\"buy\"` or `\"sell\"`. Note: lowercase, unlike REST responses. | [optional] | -|**OLowerCase** | **String** | Order type: `\"market\"` / `\"limit\"` / `\"stop\"` / `\"stop_limit\"` / `\"trailing_stop\"`. Note: lowercase. | [optional] | -|**PLowerCase** | **BigDecimal** | Limit price; null for market orders. | [optional] | +|**oLowerCase** | **String** | Order type: `\"market\"` / `\"limit\"` / `\"stop\"` / `\"stop_limit\"` / `\"trailing_stop\"`. Note: lowercase. | [optional] | +|**pLowerCase** | **BigDecimal** | Limit price; null for market orders. | [optional] | |**Q** | **BigDecimal** | Order quantity (shares); `0` when the order was submitted as notional. | [optional] | |**N** | **BigDecimal** | Order notional; set when the order was submitted as notional (market buy), null when submitted as quantity. | [optional] | |**fq** | **BigDecimal** | Filled quantity. | [optional] | |**FN** | **BigDecimal** | Filled notional (= filledQty × filledAvgPrice). | [optional] | |**tc** | **BigDecimal** | Total cost — cumulative buy-in cost including the commission fee. | [optional] | |**Z** | **BigDecimal** | Fill progress percentage (0–100, 2 dp). By notional: `FN / N × 100`. By qty: `fq / Q × 100`. | [optional] | -|**NLowerCase** | **String** | Trading session label, e.g. `\"Regular\"`, `\"24 Hours Trading\"`. | [optional] | -|**SLowerCase** | **String** | Order status, e.g. `\"accepted\"`, `\"partially_filled\"`, `\"filled\"`, `\"canceled\"`. Note: lowercase, unlike REST responses. | [optional] | +|**nLowerCase** | **String** | Trading session label, e.g. `\"Regular\"`, `\"24 Hours Trading\"`. | [optional] | +|**sLowerCase** | **String** | Order status, e.g. `\"accepted\"`, `\"partially_filled\"`, `\"filled\"`, `\"canceled\"`. Note: lowercase, unlike REST responses. | [optional] | |**T** | **Long** | Order create time (epoch milliseconds). | [optional] | |**U** | **Long** | Order update time (epoch milliseconds). | [optional] | diff --git a/clients/stocks/docs/PriceStreamResponse.md b/clients/stocks/docs/PriceStreamResponse.md index 6e75fb899..1b45a0ce6 100644 --- a/clients/stocks/docs/PriceStreamResponse.md +++ b/clients/stocks/docs/PriceStreamResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**ELowerCase** | **String** | Event type, always `\"price\"`. | [optional] | +|**eLowerCase** | **String** | Event type, always `\"price\"`. | [optional] | |**rates** | [**List<PriceStreamResponseRatesInner>**](PriceStreamResponseRatesInner.md) | One entry per symbol. | [optional] | diff --git a/clients/stocks/docs/PriceStreamResponseRatesInner.md b/clients/stocks/docs/PriceStreamResponseRatesInner.md index e3df03761..7fe844200 100644 --- a/clients/stocks/docs/PriceStreamResponseRatesInner.md +++ b/clients/stocks/docs/PriceStreamResponseRatesInner.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**SLowerCase** | **String** | Symbol (UPPERCASE ticker), e.g. `\"AAPL\"`. | [optional] | +|**sLowerCase** | **String** | Symbol (UPPERCASE ticker), e.g. `\"AAPL\"`. | [optional] | |**ac** | **String** | Internal asset code, `EQ_{symbol}`. Reference only; do not use as a trading identifier. | [optional] | -|**PLowerCase** | **String** | Latest price, trailing-zero stripped. | [optional] | -|**TLowerCase** | **Long** | Price time (epoch milliseconds UTC); may be null. | [optional] | +|**pLowerCase** | **String** | Latest price, trailing-zero stripped. | [optional] | +|**tLowerCase** | **Long** | Price time (epoch milliseconds UTC); may be null. | [optional] | |**pc** | **String** | Previous day's RTH close price (reference); absent when unknown. | [optional] | |**tc** | **String** | Today's RTH close price; absent before After-Hours. | [optional] | |**mp** | **String** | Per-symbol market phase: `C` Closed, `ON` Overnight, `PRE` Pre-Market, `O` Market Open, `POST` Post-Market. | [optional] | diff --git a/clients/stocks/docs/QuoteStreamRequest.md b/clients/stocks/docs/QuoteStreamRequest.md index be9d351cf..5aed7a8ac 100644 --- a/clients/stocks/docs/QuoteStreamRequest.md +++ b/clients/stocks/docs/QuoteStreamRequest.md @@ -7,6 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique WebSocket request ID. | [optional] | |**symbol** | **String** | US-equity ticker (UPPERCASE), e.g. `AAPL`. | [optional] | diff --git a/clients/stocks/docs/QuoteStreamResponse.md b/clients/stocks/docs/QuoteStreamResponse.md index 10a43329b..11bd0bdfb 100644 --- a/clients/stocks/docs/QuoteStreamResponse.md +++ b/clients/stocks/docs/QuoteStreamResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**ELowerCase** | **String** | Event type, always `\"quote\"`. | [optional] | +|**eLowerCase** | **String** | Event type, always `\"quote\"`. | [optional] | |**E** | **Long** | Event time — epoch milliseconds when the server pushed the message. | [optional] | -|**SLowerCase** | **String** | Symbol (UPPERCASE ticker), e.g. `\"AAPL\"`. | [optional] | +|**sLowerCase** | **String** | Symbol (UPPERCASE ticker), e.g. `\"AAPL\"`. | [optional] | |**bp** | **String** | Best bid price. | [optional] | |**ap** | **String** | Best ask price. | [optional] | |**bs** | **Integer** | Best bid size (shares). | [optional] | diff --git a/clients/stocks/docs/TradabilityStreamRequest.md b/clients/stocks/docs/TradabilityStreamRequest.md index d68d6bd69..f4068ada5 100644 --- a/clients/stocks/docs/TradabilityStreamRequest.md +++ b/clients/stocks/docs/TradabilityStreamRequest.md @@ -7,6 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique WebSocket request ID. | [optional] | |**symbol** | **String** | US-equity ticker (UPPERCASE), e.g. `AAPL`. | [optional] | diff --git a/clients/stocks/docs/TradabilityStreamResponse.md b/clients/stocks/docs/TradabilityStreamResponse.md index 1379b2932..c2d4c58af 100644 --- a/clients/stocks/docs/TradabilityStreamResponse.md +++ b/clients/stocks/docs/TradabilityStreamResponse.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**ELowerCase** | **String** | Event type, always `\"tradability\"`. | [optional] | +|**eLowerCase** | **String** | Event type, always `\"tradability\"`. | [optional] | |**symbol** | **String** | Symbol (UPPERCASE ticker). | [optional] | |**assetCode** | **String** | Internal asset code `EQ_{symbol}`; reference only. May be null for symbols not yet in the symbol dictionary. | [optional] | |**tradability** | **String** | The new tradability value. `OFFMARKET` and `DELISTING` are protected states — trading-status events will not transition a symbol out of them. | [optional] | -|**TLowerCase** | **Long** | Push time (epoch milliseconds UTC). | [optional] | +|**tLowerCase** | **Long** | Push time (epoch milliseconds UTC). | [optional] | diff --git a/clients/stocks/docs/TradeApi.md b/clients/stocks/docs/TradeApi.md index 4a9e61a8e..afc4adecb 100644 --- a/clients/stocks/docs/TradeApi.md +++ b/clients/stocks/docs/TradeApi.md @@ -427,7 +427,7 @@ No authorization required Place Equity Order (TRADE) -Place a new equity order. Supports all combinations of `LIMIT` / `MARKET` × `BUY` / `SELL`. For `LIMIT BUY` orders the commission fee is automatically computed and reserved by the server at placement time — callers submit `price` and `quantity` only, no `fee` field is required. **Field combination matrix** | Side | OrderType | Required | Forbidden | | ---- | --------- | -------- | --------- | | BUY | LIMIT | `price`, `quantity`, `tradingSession` | `notional` | | BUY | MARKET | `notional` | `price`, `quantity`, `tradingSession` | | SELL | LIMIT | `price`, `quantity`, `tradingSession` | `notional` | | SELL | MARKET | `quantity` | `price`, `notional`, `tradingSession` | **Fractional shares**: when `quantity` has a decimal component, or an order is placed by `notional`, it is treated as a fractional-share order. A fractional-share `GTC` order must be paired with `tradingSession = EXTENDED` or `24H`. Rate limit: 200 requests / min (UID). Weight: 1 Security Type: TRADE +Place a new equity order. Supports all combinations of `LIMIT` / `MARKET` × `BUY` / `SELL`. For `LIMIT BUY` orders the commission fee is automatically computed and reserved by the server at placement time — callers submit `price` and `quantity` only, no `fee` field is required. **Field combination matrix** | Side | OrderType | Required | Forbidden | | ---- | --------- | -------- | --------- | | BUY | LIMIT | `price`, `quantity`, `tradingSession` | `notional` | | BUY | MARKET | `notional` | `price`, `quantity`, `tradingSession` | | SELL | LIMIT | `price`, `quantity`, `tradingSession` | `notional` | | SELL | MARKET | `quantity` | `price`, `notional`, `tradingSession` | **Fractional shares**: when `quantity` has a decimal component, or an order is placed by `notional`, it is treated as a fractional-share order. A fractional-share `GTC` order must be paired with `tradingSession = EXTENDED` or `24H`. Rate limit: 200 requests / min (UID). Weight: 1 Security Type: TRADE ### Example ```java @@ -444,7 +444,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); TradeApi apiInstance = new TradeApi(defaultClient); - String symbol = "AAPL"; // String | US stock ticker, e.g. `AAPL`, `TSLA`. Must be a symbol with tokenization enabled — check via `/market/tokenized-assets`. + String symbol = "AAPL"; // String | US stock ticker, e.g. `AAPL`, `TSLA`. Must be a tradable US-equity symbol — verify via `/sapi/v1/equity/market/exchangeInfo`. Tokenization enablement (verifiable via `/sapi/v1/equity/market/tokenized-assets`) is *not* required; non-tokenized symbols are accepted and settle as traditional underlying-equity trades. The `tokenize` parameter only takes effect on tokenization-enabled symbols and is silently ignored otherwise. Side side = Side.fromValue("BUY"); // Side | `BUY` / `SELL`. OrderType orderType = OrderType.fromValue("MARKET"); // OrderType | `MARKET` / `LIMIT`. String quoteAsset = "USDC"; // String | Quote asset. Defaults to `USDC`; must be within the server's allowed set. @@ -455,7 +455,7 @@ public class Example { TradingSession tradingSession = TradingSession.fromValue("RTH"); // TradingSession | `RTH` / `EXTENDED` / `24H`. **Required** for `LIMIT`; **forbidden** for `MARKET`. WalletType walletType = WalletType.fromValue("CARD"); // WalletType | Payment wallet for `BUY` orders: `CARD` (default) / `MAIN`. `SELL` orders always settle to `CARD`. String clientOrderId = "web_2c9c92b74f1e4a7c8f3b9e1a2d3c4b5a"; // String | Client-supplied order id. Format `^[a-zA-Z0-9-_]{32,36}$`. Auto-generated when omitted. - Boolean tokenize = true; // Boolean | Whether to tokenize the purchased stock asset upon settlement. Default `true`. Set to `false` to receive the underlying equity directly instead of a tokenized asset. + Boolean tokenize = true; // Boolean | Whether to tokenize the purchased stock asset upon settlement. Default `true`. Only takes effect when the symbol is tokenization-enabled (check via `/market/tokenized-assets`); silently ignored for non-tokenized symbols, which always settle as traditional underlying-equity trades. Long recvWindow = 5000L; // Long | The value cannot be greater than `60000`. try { PlaceEquityOrderResponse result = apiInstance.placeEquityOrder(symbol, side, orderType, quoteAsset, price, quantity, notional, timeInForce, tradingSession, walletType, clientOrderId, tokenize, recvWindow); @@ -475,7 +475,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **symbol** | **String**| US stock ticker, e.g. `AAPL`, `TSLA`. Must be a symbol with tokenization enabled — check via `/market/tokenized-assets`. | | +| **symbol** | **String**| US stock ticker, e.g. `AAPL`, `TSLA`. Must be a tradable US-equity symbol — verify via `/sapi/v1/equity/market/exchangeInfo`. Tokenization enablement (verifiable via `/sapi/v1/equity/market/tokenized-assets`) is *not* required; non-tokenized symbols are accepted and settle as traditional underlying-equity trades. The `tokenize` parameter only takes effect on tokenization-enabled symbols and is silently ignored otherwise. | | | **side** | [**Side**](.md)| `BUY` / `SELL`. | [enum: BUY, SELL] | | **orderType** | [**OrderType**](.md)| `MARKET` / `LIMIT`. | [enum: MARKET, LIMIT] | | **quoteAsset** | **String**| Quote asset. Defaults to `USDC`; must be within the server's allowed set. | [optional] | @@ -486,7 +486,7 @@ public class Example { | **tradingSession** | [**TradingSession**](.md)| `RTH` / `EXTENDED` / `24H`. **Required** for `LIMIT`; **forbidden** for `MARKET`. | [optional] [enum: RTH, EXTENDED, 24H] | | **walletType** | [**WalletType**](.md)| Payment wallet for `BUY` orders: `CARD` (default) / `MAIN`. `SELL` orders always settle to `CARD`. | [optional] [enum: CARD, MAIN] | | **clientOrderId** | **String**| Client-supplied order id. Format `^[a-zA-Z0-9-_]{32,36}$`. Auto-generated when omitted. | [optional] | -| **tokenize** | **Boolean**| Whether to tokenize the purchased stock asset upon settlement. Default `true`. Set to `false` to receive the underlying equity directly instead of a tokenized asset. | [optional] | +| **tokenize** | **Boolean**| Whether to tokenize the purchased stock asset upon settlement. Default `true`. Only takes effect when the symbol is tokenization-enabled (check via `/market/tokenized-assets`); silently ignored for non-tokenized symbols, which always settle as traditional underlying-equity trades. | [optional] | | **recvWindow** | **Long**| The value cannot be greater than `60000`. | [optional] | ### Return type diff --git a/clients/stocks/docs/TradingStatusStreamRequest.md b/clients/stocks/docs/TradingStatusStreamRequest.md index bca2bfd5c..141c972fb 100644 --- a/clients/stocks/docs/TradingStatusStreamRequest.md +++ b/clients/stocks/docs/TradingStatusStreamRequest.md @@ -7,6 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique WebSocket request ID. | [optional] | |**symbol** | **String** | US-equity ticker (UPPERCASE), e.g. `AAPL`. | [optional] | diff --git a/clients/stocks/docs/TradingStatusStreamResponse.md b/clients/stocks/docs/TradingStatusStreamResponse.md index 941ed52f0..4a44a84e3 100644 --- a/clients/stocks/docs/TradingStatusStreamResponse.md +++ b/clients/stocks/docs/TradingStatusStreamResponse.md @@ -7,13 +7,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**ELowerCase** | **String** | Event type, always `\"tradingStatus\"`. | [optional] | +|**eLowerCase** | **String** | Event type, always `\"tradingStatus\"`. | [optional] | |**symbol** | **String** | Symbol (UPPERCASE ticker), e.g. `\"AAPL\"`. | [optional] | |**assetCode** | **String** | Internal asset code `EQ_{symbol}`; reference only. | [optional] | |**status** | **String** | Trading status. | [optional] | |**msg** | **String** | Reason code. | [optional] | |**time** | **Long** | Status-effective time (epoch milliseconds UTC). May be in the future. | [optional] | -|**ZLowerCase** | **String** | Tape designation: `C` = CTA (NYSE / AMEX), `N` = UTP (Nasdaq). | [optional] | +|**zLowerCase** | **String** | Tape designation: `C` = CTA (NYSE / AMEX), `N` = UTP (Nasdaq). | [optional] | |**tradability** | **String** | Tradability after the status change: `BUY_SELL` / `BUY` / `SELL` / `NONE`. | [optional] | diff --git a/clients/stocks/docs/rest-api/migration-guide.md b/clients/stocks/docs/rest-api/migration-guide.md index 2d8b07219..4589f98f1 100644 --- a/clients/stocks/docs/rest-api/migration-guide.md +++ b/clients/stocks/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-stocks - 1.0.0 + 1.0.1 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-stocks - 2.0.0 + 1.0.1 ``` diff --git a/clients/stocks/example_websocket_stream.md b/clients/stocks/example_websocket_stream.md index d363d3e31..28fc793b9 100644 --- a/clients/stocks/example_websocket_stream.md +++ b/clients/stocks/example_websocket_stream.md @@ -1,16 +1,16 @@ ## MarketStreams -[calendar](https://developers.binance.com/en/docs/catalog/advanced-trading-stocks-trading/api/ws-streams/market-streams#calendar-stream) - calendarStream - [CalendarStreamExample.java:31](/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/CalendarStreamExample.java#L31) +[calendar](https://developers.binance.com/en/docs/catalog/advanced-trading-stocks-trading/api/ws-streams/market-streams#calendar-stream) - calendarStream - [CalendarStreamExample.java:32](/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/CalendarStreamExample.java#L32) -[@kline_](https://developers.binance.com/en/docs/catalog/advanced-trading-stocks-trading/api/ws-streams/market-streams#kline-stream) - klineStream - [KlineStreamExample.java:32](/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/KlineStreamExample.java#L32) +[@kline_](https://developers.binance.com/en/docs/catalog/advanced-trading-stocks-trading/api/ws-streams/market-streams#kline-stream) - klineStream - [KlineStreamExample.java:33](/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/KlineStreamExample.java#L33) -[price](https://developers.binance.com/en/docs/catalog/advanced-trading-stocks-trading/api/ws-streams/market-streams#price-stream) - priceStream - [PriceStreamExample.java:31](/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/PriceStreamExample.java#L31) +[price](https://developers.binance.com/en/docs/catalog/advanced-trading-stocks-trading/api/ws-streams/market-streams#price-stream) - priceStream - [PriceStreamExample.java:32](/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/PriceStreamExample.java#L32) -[@quote](https://developers.binance.com/en/docs/catalog/advanced-trading-stocks-trading/api/ws-streams/market-streams#quote-stream) - quoteStream - [QuoteStreamExample.java:32](/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/QuoteStreamExample.java#L32) +[@quote](https://developers.binance.com/en/docs/catalog/advanced-trading-stocks-trading/api/ws-streams/market-streams#quote-stream) - quoteStream - [QuoteStreamExample.java:33](/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/QuoteStreamExample.java#L33) -[@tradability](https://developers.binance.com/en/docs/catalog/advanced-trading-stocks-trading/api/ws-streams/market-streams#tradability-stream) - tradabilityStream - [TradabilityStreamExample.java:32](/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/TradabilityStreamExample.java#L32) +[@tradability](https://developers.binance.com/en/docs/catalog/advanced-trading-stocks-trading/api/ws-streams/market-streams#tradability-stream) - tradabilityStream - [TradabilityStreamExample.java:33](/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/TradabilityStreamExample.java#L33) -[@tradingStatus](https://developers.binance.com/en/docs/catalog/advanced-trading-stocks-trading/api/ws-streams/market-streams#trading-status-stream) - tradingStatusStream - [TradingStatusStreamExample.java:32](/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/TradingStatusStreamExample.java#L32) +[@tradingStatus](https://developers.binance.com/en/docs/catalog/advanced-trading-stocks-trading/api/ws-streams/market-streams#trading-status-stream) - tradingStatusStream - [TradingStatusStreamExample.java:33](/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/TradingStatusStreamExample.java#L33) ## UserStreams diff --git a/clients/stocks/pom.xml b/clients/stocks/pom.xml index 9333ef870..5521c2bb0 100644 --- a/clients/stocks/pom.xml +++ b/clients/stocks/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-stocks stocks - 1.0.0 + 1.0.1 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/AccountApi.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/AccountApi.java index 0aae5cfdd..58fe7ffd4 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/AccountApi.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/AccountApi.java @@ -42,7 +42,7 @@ public class AccountApi { private static final String USER_AGENT = String.format( - "binance-stocks/1.0.0 (Java/%s; %s; %s)", + "binance-stocks/1.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/MarketDataApi.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/MarketDataApi.java index 945b2ebf7..dde96908a 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/MarketDataApi.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/MarketDataApi.java @@ -44,7 +44,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-stocks/1.0.0 (Java/%s; %s; %s)", + "binance-stocks/1.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/StocksRestApi.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/StocksRestApi.java index 8edc5e780..1bfca042a 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/StocksRestApi.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/StocksRestApi.java @@ -515,8 +515,13 @@ public ApiResponse equityTradeHistory( * paired with `tradingSession = EXTENDED` or `24H`. Rate limit: 200 * requests / min (UID). Weight: 1 Security Type: TRADE * - * @param symbol US stock ticker, e.g. `AAPL`, `TSLA`. Must be a symbol with - * tokenization enabled — check via `/market/tokenized-assets`. (required) + * @param symbol US stock ticker, e.g. `AAPL`, `TSLA`. Must be a tradable + * US-equity symbol — verify via `/sapi/v1/equity/market/exchangeInfo`. + * Tokenization enablement (verifiable via + * `/sapi/v1/equity/market/tokenized-assets`) is *not* required; non-tokenized + * symbols are accepted and settle as traditional underlying-equity trades. The + * `tokenize` parameter only takes effect on tokenization-enabled symbols and is + * silently ignored otherwise. (required) * @param side `BUY` / `SELL`. (required) * @param orderType `MARKET` / `LIMIT`. (required) * @param quoteAsset Quote asset. Defaults to `USDC`; must be within the server's @@ -537,8 +542,9 @@ public ApiResponse equityTradeHistory( * @param clientOrderId Client-supplied order id. Format `^[a-zA-Z0-9-_]{32,36}$`. * Auto-generated when omitted. (optional) * @param tokenize Whether to tokenize the purchased stock asset upon settlement. Default - * `true`. Set to `false` to receive the underlying equity directly - * instead of a tokenized asset. (optional) + * `true`. Only takes effect when the symbol is tokenization-enabled (check via + * `/market/tokenized-assets`); silently ignored for non-tokenized symbols, which + * always settle as traditional underlying-equity trades. (optional) * @param recvWindow The value cannot be greater than `60000`. (optional) * @return ApiResponse<PlaceEquityOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/TokenizedApi.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/TokenizedApi.java index 535b3039a..d07f9975b 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/TokenizedApi.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/TokenizedApi.java @@ -46,7 +46,7 @@ public class TokenizedApi { private static final String USER_AGENT = String.format( - "binance-stocks/1.0.0 (Java/%s; %s; %s)", + "binance-stocks/1.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/TradeApi.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/TradeApi.java index 41d90ed88..fbfa42bf9 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/TradeApi.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/TradeApi.java @@ -53,7 +53,7 @@ public class TradeApi { private static final String USER_AGENT = String.format( - "binance-stocks/1.0.0 (Java/%s; %s; %s)", + "binance-stocks/1.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -1130,8 +1130,13 @@ public ApiResponse equityTradeHistory( /** * Build call for placeEquityOrder * - * @param symbol US stock ticker, e.g. `AAPL`, `TSLA`. Must be a symbol with - * tokenization enabled — check via `/market/tokenized-assets`. (required) + * @param symbol US stock ticker, e.g. `AAPL`, `TSLA`. Must be a tradable + * US-equity symbol — verify via `/sapi/v1/equity/market/exchangeInfo`. + * Tokenization enablement (verifiable via + * `/sapi/v1/equity/market/tokenized-assets`) is *not* required; non-tokenized + * symbols are accepted and settle as traditional underlying-equity trades. The + * `tokenize` parameter only takes effect on tokenization-enabled symbols and is + * silently ignored otherwise. (required) * @param side `BUY` / `SELL`. (required) * @param orderType `MARKET` / `LIMIT`. (required) * @param quoteAsset Quote asset. Defaults to `USDC`; must be within the server's @@ -1152,8 +1157,9 @@ public ApiResponse equityTradeHistory( * @param clientOrderId Client-supplied order id. Format `^[a-zA-Z0-9-_]{32,36}$`. * Auto-generated when omitted. (optional) * @param tokenize Whether to tokenize the purchased stock asset upon settlement. Default - * `true`. Set to `false` to receive the underlying equity directly - * instead of a tokenized asset. (optional) + * `true`. Only takes effect when the symbol is tokenization-enabled (check via + * `/market/tokenized-assets`); silently ignored for non-tokenized symbols, which + * always settle as traditional underlying-equity trades. (optional) * @param recvWindow The value cannot be greater than `60000`. (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1396,8 +1402,13 @@ private okhttp3.Call placeEquityOrderValidateBeforeCall( * paired with `tradingSession = EXTENDED` or `24H`. Rate limit: 200 * requests / min (UID). Weight: 1 Security Type: TRADE * - * @param symbol US stock ticker, e.g. `AAPL`, `TSLA`. Must be a symbol with - * tokenization enabled — check via `/market/tokenized-assets`. (required) + * @param symbol US stock ticker, e.g. `AAPL`, `TSLA`. Must be a tradable + * US-equity symbol — verify via `/sapi/v1/equity/market/exchangeInfo`. + * Tokenization enablement (verifiable via + * `/sapi/v1/equity/market/tokenized-assets`) is *not* required; non-tokenized + * symbols are accepted and settle as traditional underlying-equity trades. The + * `tokenize` parameter only takes effect on tokenization-enabled symbols and is + * silently ignored otherwise. (required) * @param side `BUY` / `SELL`. (required) * @param orderType `MARKET` / `LIMIT`. (required) * @param quoteAsset Quote asset. Defaults to `USDC`; must be within the server's @@ -1418,8 +1429,9 @@ private okhttp3.Call placeEquityOrderValidateBeforeCall( * @param clientOrderId Client-supplied order id. Format `^[a-zA-Z0-9-_]{32,36}$`. * Auto-generated when omitted. (optional) * @param tokenize Whether to tokenize the purchased stock asset upon settlement. Default - * `true`. Set to `false` to receive the underlying equity directly - * instead of a tokenized asset. (optional) + * `true`. Only takes effect when the symbol is tokenization-enabled (check via + * `/market/tokenized-assets`); silently ignored for non-tokenized symbols, which + * always settle as traditional underlying-equity trades. (optional) * @param recvWindow The value cannot be greater than `60000`. (optional) * @return ApiResponse<PlaceEquityOrderResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/UserDataStreamsApi.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/UserDataStreamsApi.java index 8893eef6c..e56b4893c 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/UserDataStreamsApi.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/rest/api/UserDataStreamsApi.java @@ -42,7 +42,7 @@ public class UserDataStreamsApi { private static final String USER_AGENT = String.format( - "binance-stocks/1.0.0 (Java/%s; %s; %s)", + "binance-stocks/1.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/api/MarketStreamsApi.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/api/MarketStreamsApi.java index 1b25dc5c3..afe577f25 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/api/MarketStreamsApi.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/api/MarketStreamsApi.java @@ -47,7 +47,7 @@ public class MarketStreamsApi { private static final String USER_AGENT = String.format( - "binance-stocks/1.0.0 (Java/%s; %s; %s)", + "binance-stocks/1.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private StreamConnectionInterface connection; @@ -75,7 +75,8 @@ public StreamConnectionInterface getConnection() { /** * Calendar Stream Single-stream broadcast of market-phase transitions. One message per - * transition; no periodic heartbeat payload. Server polls every 5 seconds. + * transition; no periodic heartbeat payload. Server polls every 5 seconds. Also reachable via + * the SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC. * * @return CalendarStreamResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -123,7 +124,8 @@ private void calendarStreamValidateBeforeCall() throws ApiException {} /** * Kline Stream Per-symbol candlestick updates. One stream per (symbol, interval) combination. - * Supported intervals: 5m, 1h, 1d, 1w, 1M. + * Supported intervals: 5m, 1h, 1d, 1w, 1M. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — + * see Subscribing via RPC. * * @param klineStreamRequest (required) * @return KlineStreamResponse @@ -156,6 +158,11 @@ public StreamBlockingQueue klineStreamRaw(KlineStreamRequest klineStream String methodName = "/@kline_" .substring(1) + .replace( + "", + klineStreamRequest.getId() != null + ? klineStreamRequest.getId().toString() + : "") .replace( "", klineStreamRequest.getSymbol() != null @@ -206,7 +213,8 @@ private void klineStreamValidateBeforeCall(KlineStreamRequest klineStreamRequest /** * Price Stream Push-all price snapshot, polled every 3 seconds. One message carries the latest - * price for every active US-equity symbol. + * price for every active US-equity symbol. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — + * see Subscribing via RPC. * * @return PriceStreamResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -254,7 +262,8 @@ private void priceStreamValidateBeforeCall() throws ApiException {} /** * Quote Stream Per-symbol real-time best-bid / best-ask. Each symbol has its own stream. - * Per-symbol throttle: at most one push per symbol every 200 ms. + * Per-symbol throttle: at most one push per symbol every 200 ms. Also reachable via the + * SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC. * * @param quoteStreamRequest (required) * @return QuoteStreamResponse @@ -287,6 +296,11 @@ public StreamBlockingQueue quoteStreamRaw(QuoteStreamRequest quoteStream String methodName = "/@quote" .substring(1) + .replace( + "", + quoteStreamRequest.getId() != null + ? quoteStreamRequest.getId().toString() + : "") .replace( "", quoteStreamRequest.getSymbol() != null @@ -332,7 +346,8 @@ private void quoteStreamValidateBeforeCall(QuoteStreamRequest quoteStreamRequest /** * Tradability Stream Per-symbol push whenever the tradable direction of a symbol changes. - * Pushed only when the value actually changes (new value ≠ old value). + * Pushed only when the value actually changes (new value ≠ old value). Also reachable via the + * SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC. * * @param tradabilityStreamRequest (required) * @return TradabilityStreamResponse @@ -366,6 +381,11 @@ public StreamBlockingQueue tradabilityStreamRaw( String methodName = "/@tradability" .substring(1) + .replace( + "", + tradabilityStreamRequest.getId() != null + ? tradabilityStreamRequest.getId().toString() + : "") .replace( "", tradabilityStreamRequest.getSymbol() != null @@ -411,7 +431,8 @@ private void tradabilityStreamValidateBeforeCall( /** * Trading Status Stream Per-symbol trading-status transitions (halts, resumes, SSR, LULD - * pauses, etc.). Events that do not match a known status/reason rule are not pushed. + * pauses, etc.). Events that do not match a known status/reason rule are not pushed. Also + * reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC. * * @param tradingStatusStreamRequest (required) * @return TradingStatusStreamResponse @@ -445,6 +466,11 @@ public StreamBlockingQueue tradingStatusStreamRaw( String methodName = "/@tradingStatus" .substring(1) + .replace( + "", + tradingStatusStreamRequest.getId() != null + ? tradingStatusStreamRequest.getId().toString() + : "") .replace( "", tradingStatusStreamRequest.getSymbol() != null diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/api/StocksWebSocketStreams.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/api/StocksWebSocketStreams.java index d5d4a919d..2905119be 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/api/StocksWebSocketStreams.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/api/StocksWebSocketStreams.java @@ -25,7 +25,7 @@ public class StocksWebSocketStreams { private static final String USER_AGENT = String.format( - "binance-stocks/1.0.0 (Java/%s; %s; %s)", + "binance-stocks/1.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private final StreamConnectionInterface connection; diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/api/UserStreamsApi.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/api/UserStreamsApi.java index f24994ab3..7e4d443f0 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/api/UserStreamsApi.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/api/UserStreamsApi.java @@ -39,7 +39,7 @@ public class UserStreamsApi { private static final String USER_AGENT = String.format( - "binance-stocks/1.0.0 (Java/%s; %s; %s)", + "binance-stocks/1.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private StreamConnectionInterface connection; @@ -103,6 +103,11 @@ public StreamBlockingQueue orderReportStreamRaw( String methodName = "/@orderReport" .substring(1) + .replace( + "", + orderReportStreamRequest.getId() != null + ? orderReportStreamRequest.getId().toString() + : "") .replace( "", orderReportStreamRequest.getListenKey() != null diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/CalendarStreamResponse.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/CalendarStreamResponse.java index 64a557e25..2822c9aa2 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/CalendarStreamResponse.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/CalendarStreamResponse.java @@ -43,7 +43,7 @@ public class CalendarStreamResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) @jakarta.annotation.Nullable - private String ELowerCase; + private String eLowerCase; public static final String SERIALIZED_NAME_FROM = "from"; @@ -65,23 +65,23 @@ public class CalendarStreamResponse extends BaseDTO { public CalendarStreamResponse() {} - public CalendarStreamResponse ELowerCase(@jakarta.annotation.Nullable String ELowerCase) { - this.ELowerCase = ELowerCase; + public CalendarStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; return this; } /** * Event type, always `\"calendar\"`. * - * @return ELowerCase + * @return eLowerCase */ @jakarta.annotation.Nullable - public String getELowerCase() { - return ELowerCase; + public String geteLowerCase() { + return eLowerCase; } - public void setELowerCase(@jakarta.annotation.Nullable String ELowerCase) { - this.ELowerCase = ELowerCase; + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; } public CalendarStreamResponse from(@jakarta.annotation.Nullable String from) { @@ -150,7 +150,7 @@ public boolean equals(Object o) { return false; } CalendarStreamResponse calendarStreamResponse = (CalendarStreamResponse) o; - return Objects.equals(this.ELowerCase, calendarStreamResponse.ELowerCase) + return Objects.equals(this.eLowerCase, calendarStreamResponse.eLowerCase) && Objects.equals(this.from, calendarStreamResponse.from) && Objects.equals(this.to, calendarStreamResponse.to) && Objects.equals(this.ts, calendarStreamResponse.ts); @@ -158,14 +158,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(ELowerCase, from, to, ts); + return Objects.hash(eLowerCase, from, to, ts); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CalendarStreamResponse {\n"); - sb.append(" ELowerCase: ").append(toIndentedString(ELowerCase)).append("\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); sb.append(" from: ").append(toIndentedString(from)).append("\n"); sb.append(" to: ").append(toIndentedString(to)).append("\n"); sb.append(" ts: ").append(toIndentedString(ts)).append("\n"); @@ -177,10 +177,10 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - String ELowerCaseValue = getELowerCase(); - if (ELowerCaseValue != null) { - String ELowerCaseValueAsString = ELowerCaseValue.toString(); - valMap.put("ELowerCase", ELowerCaseValueAsString); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); } String fromValue = getFrom(); if (fromValue != null) { @@ -208,9 +208,9 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - Object ELowerCaseValue = getELowerCase(); - if (ELowerCaseValue != null) { - valMap.put("ELowerCase", ELowerCaseValue); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); } Object fromValue = getFrom(); if (fromValue != null) { diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/KlineStreamRequest.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/KlineStreamRequest.java index 128828c55..9c85f856a 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/KlineStreamRequest.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/KlineStreamRequest.java @@ -39,6 +39,12 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0") public class KlineStreamRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -53,6 +59,25 @@ public class KlineStreamRequest extends BaseDTO { public KlineStreamRequest() {} + public KlineStreamRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public KlineStreamRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; @@ -101,19 +126,21 @@ public boolean equals(Object o) { return false; } KlineStreamRequest klineStreamRequest = (KlineStreamRequest) o; - return Objects.equals(this.symbol, klineStreamRequest.symbol) + return Objects.equals(this.id, klineStreamRequest.id) + && Objects.equals(this.symbol, klineStreamRequest.symbol) && Objects.equals(this.interval, klineStreamRequest.interval); } @Override public int hashCode() { - return Objects.hash(symbol, interval); + return Objects.hash(id, symbol, interval); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class KlineStreamRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); sb.append("}"); @@ -124,6 +151,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -145,6 +177,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -179,6 +215,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); openapiFields.add("interval"); @@ -216,6 +253,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/KlineStreamResponse.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/KlineStreamResponse.java index 1741e4412..839156cb5 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/KlineStreamResponse.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/KlineStreamResponse.java @@ -44,7 +44,7 @@ public class KlineStreamResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) @jakarta.annotation.Nullable - private String ELowerCase; + private String eLowerCase; public static final String SERIALIZED_NAME_E = "E"; @@ -56,33 +56,33 @@ public class KlineStreamResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) @jakarta.annotation.Nullable - private String SLowerCase; + private String sLowerCase; public static final String SERIALIZED_NAME_K_LOWER_CASE = "k"; @SerializedName(SERIALIZED_NAME_K_LOWER_CASE) @jakarta.annotation.Nullable - private KlineStreamResponseK KLowerCase; + private KlineStreamResponseK kLowerCase; public KlineStreamResponse() {} - public KlineStreamResponse ELowerCase(@jakarta.annotation.Nullable String ELowerCase) { - this.ELowerCase = ELowerCase; + public KlineStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; return this; } /** * Event type, always `\"kline\"`. * - * @return ELowerCase + * @return eLowerCase */ @jakarta.annotation.Nullable - public String getELowerCase() { - return ELowerCase; + public String geteLowerCase() { + return eLowerCase; } - public void setELowerCase(@jakarta.annotation.Nullable String ELowerCase) { - this.ELowerCase = ELowerCase; + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; } public KlineStreamResponse E(@jakarta.annotation.Nullable Long E) { @@ -104,44 +104,44 @@ public void setE(@jakarta.annotation.Nullable Long E) { this.E = E; } - public KlineStreamResponse SLowerCase(@jakarta.annotation.Nullable String SLowerCase) { - this.SLowerCase = SLowerCase; + public KlineStreamResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; return this; } /** * Symbol (UPPERCASE ticker). * - * @return SLowerCase + * @return sLowerCase */ @jakarta.annotation.Nullable - public String getSLowerCase() { - return SLowerCase; + public String getsLowerCase() { + return sLowerCase; } - public void setSLowerCase(@jakarta.annotation.Nullable String SLowerCase) { - this.SLowerCase = SLowerCase; + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; } - public KlineStreamResponse KLowerCase( - @jakarta.annotation.Nullable KlineStreamResponseK KLowerCase) { - this.KLowerCase = KLowerCase; + public KlineStreamResponse kLowerCase( + @jakarta.annotation.Nullable KlineStreamResponseK kLowerCase) { + this.kLowerCase = kLowerCase; return this; } /** - * Get KLowerCase + * Get kLowerCase * - * @return KLowerCase + * @return kLowerCase */ @jakarta.annotation.Nullable @Valid - public KlineStreamResponseK getKLowerCase() { - return KLowerCase; + public KlineStreamResponseK getkLowerCase() { + return kLowerCase; } - public void setKLowerCase(@jakarta.annotation.Nullable KlineStreamResponseK KLowerCase) { - this.KLowerCase = KLowerCase; + public void setkLowerCase(@jakarta.annotation.Nullable KlineStreamResponseK kLowerCase) { + this.kLowerCase = kLowerCase; } @Override @@ -153,25 +153,25 @@ public boolean equals(Object o) { return false; } KlineStreamResponse klineStreamResponse = (KlineStreamResponse) o; - return Objects.equals(this.ELowerCase, klineStreamResponse.ELowerCase) + return Objects.equals(this.eLowerCase, klineStreamResponse.eLowerCase) && Objects.equals(this.E, klineStreamResponse.E) - && Objects.equals(this.SLowerCase, klineStreamResponse.SLowerCase) - && Objects.equals(this.KLowerCase, klineStreamResponse.KLowerCase); + && Objects.equals(this.sLowerCase, klineStreamResponse.sLowerCase) + && Objects.equals(this.kLowerCase, klineStreamResponse.kLowerCase); } @Override public int hashCode() { - return Objects.hash(ELowerCase, E, SLowerCase, KLowerCase); + return Objects.hash(eLowerCase, E, sLowerCase, kLowerCase); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class KlineStreamResponse {\n"); - sb.append(" ELowerCase: ").append(toIndentedString(ELowerCase)).append("\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" SLowerCase: ").append(toIndentedString(SLowerCase)).append("\n"); - sb.append(" KLowerCase: ").append(toIndentedString(KLowerCase)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" kLowerCase: ").append(toIndentedString(kLowerCase)).append("\n"); sb.append("}"); return sb.toString(); } @@ -180,25 +180,25 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - String ELowerCaseValue = getELowerCase(); - if (ELowerCaseValue != null) { - String ELowerCaseValueAsString = ELowerCaseValue.toString(); - valMap.put("ELowerCase", ELowerCaseValueAsString); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); } Long EValue = getE(); if (EValue != null) { String EValueAsString = EValue.toString(); valMap.put("E", EValueAsString); } - String SLowerCaseValue = getSLowerCase(); - if (SLowerCaseValue != null) { - String SLowerCaseValueAsString = SLowerCaseValue.toString(); - valMap.put("SLowerCase", SLowerCaseValueAsString); + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); } - KlineStreamResponseK KLowerCaseValue = getKLowerCase(); - if (KLowerCaseValue != null) { - String KLowerCaseValueAsString = JSON.getGson().toJson(KLowerCaseValue); - valMap.put("KLowerCase", KLowerCaseValueAsString); + KlineStreamResponseK kLowerCaseValue = getkLowerCase(); + if (kLowerCaseValue != null) { + String kLowerCaseValueAsString = JSON.getGson().toJson(kLowerCaseValue); + valMap.put("kLowerCase", kLowerCaseValueAsString); } valMap.put("timestamp", getTimestamp()); @@ -211,21 +211,21 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - Object ELowerCaseValue = getELowerCase(); - if (ELowerCaseValue != null) { - valMap.put("ELowerCase", ELowerCaseValue); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); } Object EValue = getE(); if (EValue != null) { valMap.put("E", EValue); } - Object SLowerCaseValue = getSLowerCase(); - if (SLowerCaseValue != null) { - valMap.put("SLowerCase", SLowerCaseValue); + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); } - Object KLowerCaseValue = getKLowerCase(); - if (KLowerCaseValue != null) { - valMap.put("KLowerCase", KLowerCaseValue); + Object kLowerCaseValue = getkLowerCase(); + if (kLowerCaseValue != null) { + valMap.put("kLowerCase", kLowerCaseValue); } valMap.put("timestamp", getTimestamp()); diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/KlineStreamResponseK.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/KlineStreamResponseK.java index decf890b6..0bfa6b165 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/KlineStreamResponseK.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/KlineStreamResponseK.java @@ -45,7 +45,7 @@ public class KlineStreamResponseK extends BaseDTO { @SerializedName(SERIALIZED_NAME_T_LOWER_CASE) @jakarta.annotation.Nullable - private Long TLowerCase; + private Long tLowerCase; public static final String SERIALIZED_NAME_CT = "ct"; @@ -57,55 +57,55 @@ public class KlineStreamResponseK extends BaseDTO { @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) @jakarta.annotation.Nullable - private String SLowerCase; + private String sLowerCase; public static final String SERIALIZED_NAME_I_LOWER_CASE = "i"; @SerializedName(SERIALIZED_NAME_I_LOWER_CASE) @jakarta.annotation.Nullable - private String ILowerCase; + private String iLowerCase; public static final String SERIALIZED_NAME_O_LOWER_CASE = "o"; @SerializedName(SERIALIZED_NAME_O_LOWER_CASE) @jakarta.annotation.Nullable - private String OLowerCase; + private String oLowerCase; public static final String SERIALIZED_NAME_C_LOWER_CASE = "c"; @SerializedName(SERIALIZED_NAME_C_LOWER_CASE) @jakarta.annotation.Nullable - private String CLowerCase; + private String cLowerCase; public static final String SERIALIZED_NAME_H_LOWER_CASE = "h"; @SerializedName(SERIALIZED_NAME_H_LOWER_CASE) @jakarta.annotation.Nullable - private String HLowerCase; + private String hLowerCase; public static final String SERIALIZED_NAME_L_LOWER_CASE = "l"; @SerializedName(SERIALIZED_NAME_L_LOWER_CASE) @jakarta.annotation.Nullable - private String LLowerCase; + private String lLowerCase; public static final String SERIALIZED_NAME_V_LOWER_CASE = "v"; @SerializedName(SERIALIZED_NAME_V_LOWER_CASE) @jakarta.annotation.Nullable - private String VLowerCase; + private String vLowerCase; public static final String SERIALIZED_NAME_N_LOWER_CASE = "n"; @SerializedName(SERIALIZED_NAME_N_LOWER_CASE) @jakarta.annotation.Nullable - private Integer NLowerCase; + private Integer nLowerCase; public static final String SERIALIZED_NAME_X_LOWER_CASE = "x"; @SerializedName(SERIALIZED_NAME_X_LOWER_CASE) @jakarta.annotation.Nullable - private Boolean XLowerCase; + private Boolean xLowerCase; public static final String SERIALIZED_NAME_VW = "vw"; @@ -115,23 +115,23 @@ public class KlineStreamResponseK extends BaseDTO { public KlineStreamResponseK() {} - public KlineStreamResponseK TLowerCase(@jakarta.annotation.Nullable Long TLowerCase) { - this.TLowerCase = TLowerCase; + public KlineStreamResponseK tLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { + this.tLowerCase = tLowerCase; return this; } /** * Open time (epoch milliseconds). * - * @return TLowerCase + * @return tLowerCase */ @jakarta.annotation.Nullable - public Long getTLowerCase() { - return TLowerCase; + public Long gettLowerCase() { + return tLowerCase; } - public void setTLowerCase(@jakarta.annotation.Nullable Long TLowerCase) { - this.TLowerCase = TLowerCase; + public void settLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { + this.tLowerCase = tLowerCase; } public KlineStreamResponseK ct(@jakarta.annotation.Nullable Long ct) { @@ -154,27 +154,27 @@ public void setCt(@jakarta.annotation.Nullable Long ct) { this.ct = ct; } - public KlineStreamResponseK SLowerCase(@jakarta.annotation.Nullable String SLowerCase) { - this.SLowerCase = SLowerCase; + public KlineStreamResponseK sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; return this; } /** * Symbol (UPPERCASE ticker). * - * @return SLowerCase + * @return sLowerCase */ @jakarta.annotation.Nullable - public String getSLowerCase() { - return SLowerCase; + public String getsLowerCase() { + return sLowerCase; } - public void setSLowerCase(@jakarta.annotation.Nullable String SLowerCase) { - this.SLowerCase = SLowerCase; + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; } - public KlineStreamResponseK ILowerCase(@jakarta.annotation.Nullable String ILowerCase) { - this.ILowerCase = ILowerCase; + public KlineStreamResponseK iLowerCase(@jakarta.annotation.Nullable String iLowerCase) { + this.iLowerCase = iLowerCase; return this; } @@ -182,148 +182,148 @@ public KlineStreamResponseK ILowerCase(@jakarta.annotation.Nullable String ILowe * Interval — `\"5m\"` / `\"1h\"` / * `\"1d\"` / `\"1w\"` / `\"1M\"`. * - * @return ILowerCase + * @return iLowerCase */ @jakarta.annotation.Nullable - public String getILowerCase() { - return ILowerCase; + public String getiLowerCase() { + return iLowerCase; } - public void setILowerCase(@jakarta.annotation.Nullable String ILowerCase) { - this.ILowerCase = ILowerCase; + public void setiLowerCase(@jakarta.annotation.Nullable String iLowerCase) { + this.iLowerCase = iLowerCase; } - public KlineStreamResponseK OLowerCase(@jakarta.annotation.Nullable String OLowerCase) { - this.OLowerCase = OLowerCase; + public KlineStreamResponseK oLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; return this; } /** * Open price. * - * @return OLowerCase + * @return oLowerCase */ @jakarta.annotation.Nullable - public String getOLowerCase() { - return OLowerCase; + public String getoLowerCase() { + return oLowerCase; } - public void setOLowerCase(@jakarta.annotation.Nullable String OLowerCase) { - this.OLowerCase = OLowerCase; + public void setoLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; } - public KlineStreamResponseK CLowerCase(@jakarta.annotation.Nullable String CLowerCase) { - this.CLowerCase = CLowerCase; + public KlineStreamResponseK cLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; return this; } /** * Close price (latest print within the interval). * - * @return CLowerCase + * @return cLowerCase */ @jakarta.annotation.Nullable - public String getCLowerCase() { - return CLowerCase; + public String getcLowerCase() { + return cLowerCase; } - public void setCLowerCase(@jakarta.annotation.Nullable String CLowerCase) { - this.CLowerCase = CLowerCase; + public void setcLowerCase(@jakarta.annotation.Nullable String cLowerCase) { + this.cLowerCase = cLowerCase; } - public KlineStreamResponseK HLowerCase(@jakarta.annotation.Nullable String HLowerCase) { - this.HLowerCase = HLowerCase; + public KlineStreamResponseK hLowerCase(@jakarta.annotation.Nullable String hLowerCase) { + this.hLowerCase = hLowerCase; return this; } /** * High price. * - * @return HLowerCase + * @return hLowerCase */ @jakarta.annotation.Nullable - public String getHLowerCase() { - return HLowerCase; + public String gethLowerCase() { + return hLowerCase; } - public void setHLowerCase(@jakarta.annotation.Nullable String HLowerCase) { - this.HLowerCase = HLowerCase; + public void sethLowerCase(@jakarta.annotation.Nullable String hLowerCase) { + this.hLowerCase = hLowerCase; } - public KlineStreamResponseK LLowerCase(@jakarta.annotation.Nullable String LLowerCase) { - this.LLowerCase = LLowerCase; + public KlineStreamResponseK lLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; return this; } /** * Low price. * - * @return LLowerCase + * @return lLowerCase */ @jakarta.annotation.Nullable - public String getLLowerCase() { - return LLowerCase; + public String getlLowerCase() { + return lLowerCase; } - public void setLLowerCase(@jakarta.annotation.Nullable String LLowerCase) { - this.LLowerCase = LLowerCase; + public void setlLowerCase(@jakarta.annotation.Nullable String lLowerCase) { + this.lLowerCase = lLowerCase; } - public KlineStreamResponseK VLowerCase(@jakarta.annotation.Nullable String VLowerCase) { - this.VLowerCase = VLowerCase; + public KlineStreamResponseK vLowerCase(@jakarta.annotation.Nullable String vLowerCase) { + this.vLowerCase = vLowerCase; return this; } /** * Volume (shares), default `\"0\"`. * - * @return VLowerCase + * @return vLowerCase */ @jakarta.annotation.Nullable - public String getVLowerCase() { - return VLowerCase; + public String getvLowerCase() { + return vLowerCase; } - public void setVLowerCase(@jakarta.annotation.Nullable String VLowerCase) { - this.VLowerCase = VLowerCase; + public void setvLowerCase(@jakarta.annotation.Nullable String vLowerCase) { + this.vLowerCase = vLowerCase; } - public KlineStreamResponseK NLowerCase(@jakarta.annotation.Nullable Integer NLowerCase) { - this.NLowerCase = NLowerCase; + public KlineStreamResponseK nLowerCase(@jakarta.annotation.Nullable Integer nLowerCase) { + this.nLowerCase = nLowerCase; return this; } /** * Trade count; absent when upstream did not populate. * - * @return NLowerCase + * @return nLowerCase */ @jakarta.annotation.Nullable - public Integer getNLowerCase() { - return NLowerCase; + public Integer getnLowerCase() { + return nLowerCase; } - public void setNLowerCase(@jakarta.annotation.Nullable Integer NLowerCase) { - this.NLowerCase = NLowerCase; + public void setnLowerCase(@jakarta.annotation.Nullable Integer nLowerCase) { + this.nLowerCase = nLowerCase; } - public KlineStreamResponseK XLowerCase(@jakarta.annotation.Nullable Boolean XLowerCase) { - this.XLowerCase = XLowerCase; + public KlineStreamResponseK xLowerCase(@jakarta.annotation.Nullable Boolean xLowerCase) { + this.xLowerCase = xLowerCase; return this; } /** * Candle is closed — `true` once the interval has ended. * - * @return XLowerCase + * @return xLowerCase */ @jakarta.annotation.Nullable - public Boolean getXLowerCase() { - return XLowerCase; + public Boolean getxLowerCase() { + return xLowerCase; } - public void setXLowerCase(@jakarta.annotation.Nullable Boolean XLowerCase) { - this.XLowerCase = XLowerCase; + public void setxLowerCase(@jakarta.annotation.Nullable Boolean xLowerCase) { + this.xLowerCase = xLowerCase; } public KlineStreamResponseK vw(@jakarta.annotation.Nullable String vw) { @@ -354,17 +354,17 @@ public boolean equals(Object o) { return false; } KlineStreamResponseK klineStreamResponseK = (KlineStreamResponseK) o; - return Objects.equals(this.TLowerCase, klineStreamResponseK.TLowerCase) + return Objects.equals(this.tLowerCase, klineStreamResponseK.tLowerCase) && Objects.equals(this.ct, klineStreamResponseK.ct) - && Objects.equals(this.SLowerCase, klineStreamResponseK.SLowerCase) - && Objects.equals(this.ILowerCase, klineStreamResponseK.ILowerCase) - && Objects.equals(this.OLowerCase, klineStreamResponseK.OLowerCase) - && Objects.equals(this.CLowerCase, klineStreamResponseK.CLowerCase) - && Objects.equals(this.HLowerCase, klineStreamResponseK.HLowerCase) - && Objects.equals(this.LLowerCase, klineStreamResponseK.LLowerCase) - && Objects.equals(this.VLowerCase, klineStreamResponseK.VLowerCase) - && Objects.equals(this.NLowerCase, klineStreamResponseK.NLowerCase) - && Objects.equals(this.XLowerCase, klineStreamResponseK.XLowerCase) + && Objects.equals(this.sLowerCase, klineStreamResponseK.sLowerCase) + && Objects.equals(this.iLowerCase, klineStreamResponseK.iLowerCase) + && Objects.equals(this.oLowerCase, klineStreamResponseK.oLowerCase) + && Objects.equals(this.cLowerCase, klineStreamResponseK.cLowerCase) + && Objects.equals(this.hLowerCase, klineStreamResponseK.hLowerCase) + && Objects.equals(this.lLowerCase, klineStreamResponseK.lLowerCase) + && Objects.equals(this.vLowerCase, klineStreamResponseK.vLowerCase) + && Objects.equals(this.nLowerCase, klineStreamResponseK.nLowerCase) + && Objects.equals(this.xLowerCase, klineStreamResponseK.xLowerCase) && Objects.equals(this.vw, klineStreamResponseK.vw); } @@ -380,17 +380,17 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { return Objects.hash( - TLowerCase, + tLowerCase, ct, - SLowerCase, - ILowerCase, - OLowerCase, - CLowerCase, - HLowerCase, - LLowerCase, - VLowerCase, - NLowerCase, - XLowerCase, + sLowerCase, + iLowerCase, + oLowerCase, + cLowerCase, + hLowerCase, + lLowerCase, + vLowerCase, + nLowerCase, + xLowerCase, vw); } @@ -405,17 +405,17 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class KlineStreamResponseK {\n"); - sb.append(" TLowerCase: ").append(toIndentedString(TLowerCase)).append("\n"); + sb.append(" tLowerCase: ").append(toIndentedString(tLowerCase)).append("\n"); sb.append(" ct: ").append(toIndentedString(ct)).append("\n"); - sb.append(" SLowerCase: ").append(toIndentedString(SLowerCase)).append("\n"); - sb.append(" ILowerCase: ").append(toIndentedString(ILowerCase)).append("\n"); - sb.append(" OLowerCase: ").append(toIndentedString(OLowerCase)).append("\n"); - sb.append(" CLowerCase: ").append(toIndentedString(CLowerCase)).append("\n"); - sb.append(" HLowerCase: ").append(toIndentedString(HLowerCase)).append("\n"); - sb.append(" LLowerCase: ").append(toIndentedString(LLowerCase)).append("\n"); - sb.append(" VLowerCase: ").append(toIndentedString(VLowerCase)).append("\n"); - sb.append(" NLowerCase: ").append(toIndentedString(NLowerCase)).append("\n"); - sb.append(" XLowerCase: ").append(toIndentedString(XLowerCase)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); + sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); + sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); + sb.append(" cLowerCase: ").append(toIndentedString(cLowerCase)).append("\n"); + sb.append(" hLowerCase: ").append(toIndentedString(hLowerCase)).append("\n"); + sb.append(" lLowerCase: ").append(toIndentedString(lLowerCase)).append("\n"); + sb.append(" vLowerCase: ").append(toIndentedString(vLowerCase)).append("\n"); + sb.append(" nLowerCase: ").append(toIndentedString(nLowerCase)).append("\n"); + sb.append(" xLowerCase: ").append(toIndentedString(xLowerCase)).append("\n"); sb.append(" vw: ").append(toIndentedString(vw)).append("\n"); sb.append("}"); return sb.toString(); @@ -425,60 +425,60 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - Long TLowerCaseValue = getTLowerCase(); - if (TLowerCaseValue != null) { - String TLowerCaseValueAsString = TLowerCaseValue.toString(); - valMap.put("TLowerCase", TLowerCaseValueAsString); + Long tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + String tLowerCaseValueAsString = tLowerCaseValue.toString(); + valMap.put("tLowerCase", tLowerCaseValueAsString); } Long ctValue = getCt(); if (ctValue != null) { String ctValueAsString = ctValue.toString(); valMap.put("ct", ctValueAsString); } - String SLowerCaseValue = getSLowerCase(); - if (SLowerCaseValue != null) { - String SLowerCaseValueAsString = SLowerCaseValue.toString(); - valMap.put("SLowerCase", SLowerCaseValueAsString); - } - String ILowerCaseValue = getILowerCase(); - if (ILowerCaseValue != null) { - String ILowerCaseValueAsString = ILowerCaseValue.toString(); - valMap.put("ILowerCase", ILowerCaseValueAsString); - } - String OLowerCaseValue = getOLowerCase(); - if (OLowerCaseValue != null) { - String OLowerCaseValueAsString = OLowerCaseValue.toString(); - valMap.put("OLowerCase", OLowerCaseValueAsString); - } - String CLowerCaseValue = getCLowerCase(); - if (CLowerCaseValue != null) { - String CLowerCaseValueAsString = CLowerCaseValue.toString(); - valMap.put("CLowerCase", CLowerCaseValueAsString); - } - String HLowerCaseValue = getHLowerCase(); - if (HLowerCaseValue != null) { - String HLowerCaseValueAsString = HLowerCaseValue.toString(); - valMap.put("HLowerCase", HLowerCaseValueAsString); - } - String LLowerCaseValue = getLLowerCase(); - if (LLowerCaseValue != null) { - String LLowerCaseValueAsString = LLowerCaseValue.toString(); - valMap.put("LLowerCase", LLowerCaseValueAsString); - } - String VLowerCaseValue = getVLowerCase(); - if (VLowerCaseValue != null) { - String VLowerCaseValueAsString = VLowerCaseValue.toString(); - valMap.put("VLowerCase", VLowerCaseValueAsString); - } - Integer NLowerCaseValue = getNLowerCase(); - if (NLowerCaseValue != null) { - String NLowerCaseValueAsString = NLowerCaseValue.toString(); - valMap.put("NLowerCase", NLowerCaseValueAsString); - } - Boolean XLowerCaseValue = getXLowerCase(); - if (XLowerCaseValue != null) { - String XLowerCaseValueAsString = XLowerCaseValue.toString(); - valMap.put("XLowerCase", XLowerCaseValueAsString); + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); + } + String iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + String iLowerCaseValueAsString = iLowerCaseValue.toString(); + valMap.put("iLowerCase", iLowerCaseValueAsString); + } + String oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + String oLowerCaseValueAsString = oLowerCaseValue.toString(); + valMap.put("oLowerCase", oLowerCaseValueAsString); + } + String cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + String cLowerCaseValueAsString = cLowerCaseValue.toString(); + valMap.put("cLowerCase", cLowerCaseValueAsString); + } + String hLowerCaseValue = gethLowerCase(); + if (hLowerCaseValue != null) { + String hLowerCaseValueAsString = hLowerCaseValue.toString(); + valMap.put("hLowerCase", hLowerCaseValueAsString); + } + String lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + String lLowerCaseValueAsString = lLowerCaseValue.toString(); + valMap.put("lLowerCase", lLowerCaseValueAsString); + } + String vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + String vLowerCaseValueAsString = vLowerCaseValue.toString(); + valMap.put("vLowerCase", vLowerCaseValueAsString); + } + Integer nLowerCaseValue = getnLowerCase(); + if (nLowerCaseValue != null) { + String nLowerCaseValueAsString = nLowerCaseValue.toString(); + valMap.put("nLowerCase", nLowerCaseValueAsString); + } + Boolean xLowerCaseValue = getxLowerCase(); + if (xLowerCaseValue != null) { + String xLowerCaseValueAsString = xLowerCaseValue.toString(); + valMap.put("xLowerCase", xLowerCaseValueAsString); } String vwValue = getVw(); if (vwValue != null) { @@ -496,49 +496,49 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - Object TLowerCaseValue = getTLowerCase(); - if (TLowerCaseValue != null) { - valMap.put("TLowerCase", TLowerCaseValue); + Object tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + valMap.put("tLowerCase", tLowerCaseValue); } Object ctValue = getCt(); if (ctValue != null) { valMap.put("ct", ctValue); } - Object SLowerCaseValue = getSLowerCase(); - if (SLowerCaseValue != null) { - valMap.put("SLowerCase", SLowerCaseValue); + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); } - Object ILowerCaseValue = getILowerCase(); - if (ILowerCaseValue != null) { - valMap.put("ILowerCase", ILowerCaseValue); + Object iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + valMap.put("iLowerCase", iLowerCaseValue); } - Object OLowerCaseValue = getOLowerCase(); - if (OLowerCaseValue != null) { - valMap.put("OLowerCase", OLowerCaseValue); + Object oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + valMap.put("oLowerCase", oLowerCaseValue); } - Object CLowerCaseValue = getCLowerCase(); - if (CLowerCaseValue != null) { - valMap.put("CLowerCase", CLowerCaseValue); + Object cLowerCaseValue = getcLowerCase(); + if (cLowerCaseValue != null) { + valMap.put("cLowerCase", cLowerCaseValue); } - Object HLowerCaseValue = getHLowerCase(); - if (HLowerCaseValue != null) { - valMap.put("HLowerCase", HLowerCaseValue); + Object hLowerCaseValue = gethLowerCase(); + if (hLowerCaseValue != null) { + valMap.put("hLowerCase", hLowerCaseValue); } - Object LLowerCaseValue = getLLowerCase(); - if (LLowerCaseValue != null) { - valMap.put("LLowerCase", LLowerCaseValue); + Object lLowerCaseValue = getlLowerCase(); + if (lLowerCaseValue != null) { + valMap.put("lLowerCase", lLowerCaseValue); } - Object VLowerCaseValue = getVLowerCase(); - if (VLowerCaseValue != null) { - valMap.put("VLowerCase", VLowerCaseValue); + Object vLowerCaseValue = getvLowerCase(); + if (vLowerCaseValue != null) { + valMap.put("vLowerCase", vLowerCaseValue); } - Object NLowerCaseValue = getNLowerCase(); - if (NLowerCaseValue != null) { - valMap.put("NLowerCase", NLowerCaseValue); + Object nLowerCaseValue = getnLowerCase(); + if (nLowerCaseValue != null) { + valMap.put("nLowerCase", nLowerCaseValue); } - Object XLowerCaseValue = getXLowerCase(); - if (XLowerCaseValue != null) { - valMap.put("XLowerCase", XLowerCaseValue); + Object xLowerCaseValue = getxLowerCase(); + if (xLowerCaseValue != null) { + valMap.put("xLowerCase", xLowerCaseValue); } Object vwValue = getVw(); if (vwValue != null) { diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/OrderReportStreamRequest.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/OrderReportStreamRequest.java index 597fd7c54..9a600ad18 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/OrderReportStreamRequest.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/OrderReportStreamRequest.java @@ -39,6 +39,12 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0") public class OrderReportStreamRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_LISTEN_KEY = "listenKey"; @SerializedName(SERIALIZED_NAME_LISTEN_KEY) @@ -47,6 +53,25 @@ public class OrderReportStreamRequest extends BaseDTO { public OrderReportStreamRequest() {} + public OrderReportStreamRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public OrderReportStreamRequest listenKey(@jakarta.annotation.Nullable String listenKey) { this.listenKey = listenKey; return this; @@ -75,18 +100,20 @@ public boolean equals(Object o) { return false; } OrderReportStreamRequest orderReportStreamRequest = (OrderReportStreamRequest) o; - return Objects.equals(this.listenKey, orderReportStreamRequest.listenKey); + return Objects.equals(this.id, orderReportStreamRequest.id) + && Objects.equals(this.listenKey, orderReportStreamRequest.listenKey); } @Override public int hashCode() { - return Objects.hash(listenKey); + return Objects.hash(id, listenKey); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderReportStreamRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" listenKey: ").append(toIndentedString(listenKey)).append("\n"); sb.append("}"); return sb.toString(); @@ -96,6 +123,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String listenKeyValue = getListenKey(); if (listenKeyValue != null) { String listenKeyValueAsString = listenKeyValue.toString(); @@ -112,6 +144,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object listenKeyValue = getListenKey(); if (listenKeyValue != null) { valMap.put("listenKey", listenKeyValue); @@ -142,6 +178,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("listenKey"); // a set of required properties/fields (JSON key names) @@ -178,6 +215,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if ((jsonObj.get("listenKey") != null && !jsonObj.get("listenKey").isJsonNull()) && !jsonObj.get("listenKey").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/OrderReportStreamResponse.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/OrderReportStreamResponse.java index 06364946e..b77a123eb 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/OrderReportStreamResponse.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/OrderReportStreamResponse.java @@ -47,7 +47,7 @@ public class OrderReportStreamResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) @jakarta.annotation.Nullable - private String ELowerCase; + private String eLowerCase; public static final String SERIALIZED_NAME_E = "E"; @@ -59,13 +59,13 @@ public class OrderReportStreamResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_X_LOWER_CASE) @jakarta.annotation.Nullable - private String XLowerCase; + private String xLowerCase; public static final String SERIALIZED_NAME_I_LOWER_CASE = "i"; @SerializedName(SERIALIZED_NAME_I_LOWER_CASE) @jakarta.annotation.Nullable - private String ILowerCase; + private String iLowerCase; public static final String SERIALIZED_NAME_AI = "ai"; @@ -77,13 +77,13 @@ public class OrderReportStreamResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_B_LOWER_CASE) @jakarta.annotation.Nullable - private String BLowerCase; + private String bLowerCase; public static final String SERIALIZED_NAME_Q_LOWER_CASE = "q"; @SerializedName(SERIALIZED_NAME_Q_LOWER_CASE) @jakarta.annotation.Nullable - private String QLowerCase; + private String qLowerCase; public static final String SERIALIZED_NAME_S = "S"; @@ -95,13 +95,13 @@ public class OrderReportStreamResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_O_LOWER_CASE) @jakarta.annotation.Nullable - private String OLowerCase; + private String oLowerCase; public static final String SERIALIZED_NAME_P_LOWER_CASE = "p"; @SerializedName(SERIALIZED_NAME_P_LOWER_CASE) @jakarta.annotation.Nullable - private BigDecimal PLowerCase; + private BigDecimal pLowerCase; public static final String SERIALIZED_NAME_Q = "Q"; @@ -143,13 +143,13 @@ public class OrderReportStreamResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_N_LOWER_CASE) @jakarta.annotation.Nullable - private String NLowerCase; + private String nLowerCase; public static final String SERIALIZED_NAME_S_LOWER_CASE = "s"; @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) @jakarta.annotation.Nullable - private String SLowerCase; + private String sLowerCase; public static final String SERIALIZED_NAME_T = "T"; @@ -165,23 +165,23 @@ public class OrderReportStreamResponse extends BaseDTO { public OrderReportStreamResponse() {} - public OrderReportStreamResponse ELowerCase(@jakarta.annotation.Nullable String ELowerCase) { - this.ELowerCase = ELowerCase; + public OrderReportStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; return this; } /** * Event type, always `\"orderReport\"`. * - * @return ELowerCase + * @return eLowerCase */ @jakarta.annotation.Nullable - public String getELowerCase() { - return ELowerCase; + public String geteLowerCase() { + return eLowerCase; } - public void setELowerCase(@jakarta.annotation.Nullable String ELowerCase) { - this.ELowerCase = ELowerCase; + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; } public OrderReportStreamResponse E(@jakarta.annotation.Nullable Long E) { @@ -203,8 +203,8 @@ public void setE(@jakarta.annotation.Nullable Long E) { this.E = E; } - public OrderReportStreamResponse XLowerCase(@jakarta.annotation.Nullable String XLowerCase) { - this.XLowerCase = XLowerCase; + public OrderReportStreamResponse xLowerCase(@jakarta.annotation.Nullable String xLowerCase) { + this.xLowerCase = xLowerCase; return this; } @@ -212,34 +212,34 @@ public OrderReportStreamResponse XLowerCase(@jakarta.annotation.Nullable String * Execution type: `\"ORDER_UPDATE\"` (still open) or * `\"ORDER_TERMINAL\"` (reached terminal state). * - * @return XLowerCase + * @return xLowerCase */ @jakarta.annotation.Nullable - public String getXLowerCase() { - return XLowerCase; + public String getxLowerCase() { + return xLowerCase; } - public void setXLowerCase(@jakarta.annotation.Nullable String XLowerCase) { - this.XLowerCase = XLowerCase; + public void setxLowerCase(@jakarta.annotation.Nullable String xLowerCase) { + this.xLowerCase = xLowerCase; } - public OrderReportStreamResponse ILowerCase(@jakarta.annotation.Nullable String ILowerCase) { - this.ILowerCase = ILowerCase; + public OrderReportStreamResponse iLowerCase(@jakarta.annotation.Nullable String iLowerCase) { + this.iLowerCase = iLowerCase; return this; } /** * Order ID (UUID). * - * @return ILowerCase + * @return iLowerCase */ @jakarta.annotation.Nullable - public String getILowerCase() { - return ILowerCase; + public String getiLowerCase() { + return iLowerCase; } - public void setILowerCase(@jakarta.annotation.Nullable String ILowerCase) { - this.ILowerCase = ILowerCase; + public void setiLowerCase(@jakarta.annotation.Nullable String iLowerCase) { + this.iLowerCase = iLowerCase; } public OrderReportStreamResponse ai(@jakarta.annotation.Nullable String ai) { @@ -261,8 +261,8 @@ public void setAi(@jakarta.annotation.Nullable String ai) { this.ai = ai; } - public OrderReportStreamResponse BLowerCase(@jakarta.annotation.Nullable String BLowerCase) { - this.BLowerCase = BLowerCase; + public OrderReportStreamResponse bLowerCase(@jakarta.annotation.Nullable String bLowerCase) { + this.bLowerCase = bLowerCase; return this; } @@ -271,34 +271,34 @@ public OrderReportStreamResponse BLowerCase(@jakarta.annotation.Nullable String * `\"EQ_AAPL\"`), not the bare ticker used in REST responses / order input. * Strip the `EQ_` prefix to match a symbol used elsewhere. * - * @return BLowerCase + * @return bLowerCase */ @jakarta.annotation.Nullable - public String getBLowerCase() { - return BLowerCase; + public String getbLowerCase() { + return bLowerCase; } - public void setBLowerCase(@jakarta.annotation.Nullable String BLowerCase) { - this.BLowerCase = BLowerCase; + public void setbLowerCase(@jakarta.annotation.Nullable String bLowerCase) { + this.bLowerCase = bLowerCase; } - public OrderReportStreamResponse QLowerCase(@jakarta.annotation.Nullable String QLowerCase) { - this.QLowerCase = QLowerCase; + public OrderReportStreamResponse qLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; return this; } /** * Quote currency, e.g. `\"USD\"`. * - * @return QLowerCase + * @return qLowerCase */ @jakarta.annotation.Nullable - public String getQLowerCase() { - return QLowerCase; + public String getqLowerCase() { + return qLowerCase; } - public void setQLowerCase(@jakarta.annotation.Nullable String QLowerCase) { - this.QLowerCase = QLowerCase; + public void setqLowerCase(@jakarta.annotation.Nullable String qLowerCase) { + this.qLowerCase = qLowerCase; } public OrderReportStreamResponse S(@jakarta.annotation.Nullable String S) { @@ -321,8 +321,8 @@ public void setS(@jakarta.annotation.Nullable String S) { this.S = S; } - public OrderReportStreamResponse OLowerCase(@jakarta.annotation.Nullable String OLowerCase) { - this.OLowerCase = OLowerCase; + public OrderReportStreamResponse oLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; return this; } @@ -331,36 +331,36 @@ public OrderReportStreamResponse OLowerCase(@jakarta.annotation.Nullable String * `\"stop\"` / `\"stop_limit\"` / * `\"trailing_stop\"`. Note: lowercase. * - * @return OLowerCase + * @return oLowerCase */ @jakarta.annotation.Nullable - public String getOLowerCase() { - return OLowerCase; + public String getoLowerCase() { + return oLowerCase; } - public void setOLowerCase(@jakarta.annotation.Nullable String OLowerCase) { - this.OLowerCase = OLowerCase; + public void setoLowerCase(@jakarta.annotation.Nullable String oLowerCase) { + this.oLowerCase = oLowerCase; } - public OrderReportStreamResponse PLowerCase( - @jakarta.annotation.Nullable BigDecimal PLowerCase) { - this.PLowerCase = PLowerCase; + public OrderReportStreamResponse pLowerCase( + @jakarta.annotation.Nullable BigDecimal pLowerCase) { + this.pLowerCase = pLowerCase; return this; } /** * Limit price; null for market orders. * - * @return PLowerCase + * @return pLowerCase */ @jakarta.annotation.Nullable @Valid - public BigDecimal getPLowerCase() { - return PLowerCase; + public BigDecimal getpLowerCase() { + return pLowerCase; } - public void setPLowerCase(@jakarta.annotation.Nullable BigDecimal PLowerCase) { - this.PLowerCase = PLowerCase; + public void setpLowerCase(@jakarta.annotation.Nullable BigDecimal pLowerCase) { + this.pLowerCase = pLowerCase; } public OrderReportStreamResponse Q(@jakarta.annotation.Nullable BigDecimal Q) { @@ -485,8 +485,8 @@ public void setZ(@jakarta.annotation.Nullable BigDecimal Z) { this.Z = Z; } - public OrderReportStreamResponse NLowerCase(@jakarta.annotation.Nullable String NLowerCase) { - this.NLowerCase = NLowerCase; + public OrderReportStreamResponse nLowerCase(@jakarta.annotation.Nullable String nLowerCase) { + this.nLowerCase = nLowerCase; return this; } @@ -494,19 +494,19 @@ public OrderReportStreamResponse NLowerCase(@jakarta.annotation.Nullable String * Trading session label, e.g. `\"Regular\"`, `\"24 Hours * Trading\"`. * - * @return NLowerCase + * @return nLowerCase */ @jakarta.annotation.Nullable - public String getNLowerCase() { - return NLowerCase; + public String getnLowerCase() { + return nLowerCase; } - public void setNLowerCase(@jakarta.annotation.Nullable String NLowerCase) { - this.NLowerCase = NLowerCase; + public void setnLowerCase(@jakarta.annotation.Nullable String nLowerCase) { + this.nLowerCase = nLowerCase; } - public OrderReportStreamResponse SLowerCase(@jakarta.annotation.Nullable String SLowerCase) { - this.SLowerCase = SLowerCase; + public OrderReportStreamResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; return this; } @@ -515,15 +515,15 @@ public OrderReportStreamResponse SLowerCase(@jakarta.annotation.Nullable String * `\"partially_filled\"`, `\"filled\"`, * `\"canceled\"`. Note: lowercase, unlike REST responses. * - * @return SLowerCase + * @return sLowerCase */ @jakarta.annotation.Nullable - public String getSLowerCase() { - return SLowerCase; + public String getsLowerCase() { + return sLowerCase; } - public void setSLowerCase(@jakarta.annotation.Nullable String SLowerCase) { - this.SLowerCase = SLowerCase; + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; } public OrderReportStreamResponse T(@jakarta.annotation.Nullable Long T) { @@ -573,24 +573,24 @@ public boolean equals(Object o) { return false; } OrderReportStreamResponse orderReportStreamResponse = (OrderReportStreamResponse) o; - return Objects.equals(this.ELowerCase, orderReportStreamResponse.ELowerCase) + return Objects.equals(this.eLowerCase, orderReportStreamResponse.eLowerCase) && Objects.equals(this.E, orderReportStreamResponse.E) - && Objects.equals(this.XLowerCase, orderReportStreamResponse.XLowerCase) - && Objects.equals(this.ILowerCase, orderReportStreamResponse.ILowerCase) + && Objects.equals(this.xLowerCase, orderReportStreamResponse.xLowerCase) + && Objects.equals(this.iLowerCase, orderReportStreamResponse.iLowerCase) && Objects.equals(this.ai, orderReportStreamResponse.ai) - && Objects.equals(this.BLowerCase, orderReportStreamResponse.BLowerCase) - && Objects.equals(this.QLowerCase, orderReportStreamResponse.QLowerCase) + && Objects.equals(this.bLowerCase, orderReportStreamResponse.bLowerCase) + && Objects.equals(this.qLowerCase, orderReportStreamResponse.qLowerCase) && Objects.equals(this.S, orderReportStreamResponse.S) - && Objects.equals(this.OLowerCase, orderReportStreamResponse.OLowerCase) - && Objects.equals(this.PLowerCase, orderReportStreamResponse.PLowerCase) + && Objects.equals(this.oLowerCase, orderReportStreamResponse.oLowerCase) + && Objects.equals(this.pLowerCase, orderReportStreamResponse.pLowerCase) && Objects.equals(this.Q, orderReportStreamResponse.Q) && Objects.equals(this.N, orderReportStreamResponse.N) && Objects.equals(this.fq, orderReportStreamResponse.fq) && Objects.equals(this.FN, orderReportStreamResponse.FN) && Objects.equals(this.tc, orderReportStreamResponse.tc) && Objects.equals(this.Z, orderReportStreamResponse.Z) - && Objects.equals(this.NLowerCase, orderReportStreamResponse.NLowerCase) - && Objects.equals(this.SLowerCase, orderReportStreamResponse.SLowerCase) + && Objects.equals(this.nLowerCase, orderReportStreamResponse.nLowerCase) + && Objects.equals(this.sLowerCase, orderReportStreamResponse.sLowerCase) && Objects.equals(this.T, orderReportStreamResponse.T) && Objects.equals(this.U, orderReportStreamResponse.U); } @@ -607,24 +607,24 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { return Objects.hash( - ELowerCase, + eLowerCase, E, - XLowerCase, - ILowerCase, + xLowerCase, + iLowerCase, ai, - BLowerCase, - QLowerCase, + bLowerCase, + qLowerCase, S, - OLowerCase, - PLowerCase, + oLowerCase, + pLowerCase, Q, N, fq, FN, tc, Z, - NLowerCase, - SLowerCase, + nLowerCase, + sLowerCase, T, U); } @@ -640,24 +640,24 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderReportStreamResponse {\n"); - sb.append(" ELowerCase: ").append(toIndentedString(ELowerCase)).append("\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" XLowerCase: ").append(toIndentedString(XLowerCase)).append("\n"); - sb.append(" ILowerCase: ").append(toIndentedString(ILowerCase)).append("\n"); + sb.append(" xLowerCase: ").append(toIndentedString(xLowerCase)).append("\n"); + sb.append(" iLowerCase: ").append(toIndentedString(iLowerCase)).append("\n"); sb.append(" ai: ").append(toIndentedString(ai)).append("\n"); - sb.append(" BLowerCase: ").append(toIndentedString(BLowerCase)).append("\n"); - sb.append(" QLowerCase: ").append(toIndentedString(QLowerCase)).append("\n"); + sb.append(" bLowerCase: ").append(toIndentedString(bLowerCase)).append("\n"); + sb.append(" qLowerCase: ").append(toIndentedString(qLowerCase)).append("\n"); sb.append(" S: ").append(toIndentedString(S)).append("\n"); - sb.append(" OLowerCase: ").append(toIndentedString(OLowerCase)).append("\n"); - sb.append(" PLowerCase: ").append(toIndentedString(PLowerCase)).append("\n"); + sb.append(" oLowerCase: ").append(toIndentedString(oLowerCase)).append("\n"); + sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); sb.append(" Q: ").append(toIndentedString(Q)).append("\n"); sb.append(" N: ").append(toIndentedString(N)).append("\n"); sb.append(" fq: ").append(toIndentedString(fq)).append("\n"); sb.append(" FN: ").append(toIndentedString(FN)).append("\n"); sb.append(" tc: ").append(toIndentedString(tc)).append("\n"); sb.append(" Z: ").append(toIndentedString(Z)).append("\n"); - sb.append(" NLowerCase: ").append(toIndentedString(NLowerCase)).append("\n"); - sb.append(" SLowerCase: ").append(toIndentedString(SLowerCase)).append("\n"); + sb.append(" nLowerCase: ").append(toIndentedString(nLowerCase)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); sb.append(" T: ").append(toIndentedString(T)).append("\n"); sb.append(" U: ").append(toIndentedString(U)).append("\n"); sb.append("}"); @@ -668,55 +668,55 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - String ELowerCaseValue = getELowerCase(); - if (ELowerCaseValue != null) { - String ELowerCaseValueAsString = ELowerCaseValue.toString(); - valMap.put("ELowerCase", ELowerCaseValueAsString); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); } Long EValue = getE(); if (EValue != null) { String EValueAsString = EValue.toString(); valMap.put("E", EValueAsString); } - String XLowerCaseValue = getXLowerCase(); - if (XLowerCaseValue != null) { - String XLowerCaseValueAsString = XLowerCaseValue.toString(); - valMap.put("XLowerCase", XLowerCaseValueAsString); + String xLowerCaseValue = getxLowerCase(); + if (xLowerCaseValue != null) { + String xLowerCaseValueAsString = xLowerCaseValue.toString(); + valMap.put("xLowerCase", xLowerCaseValueAsString); } - String ILowerCaseValue = getILowerCase(); - if (ILowerCaseValue != null) { - String ILowerCaseValueAsString = ILowerCaseValue.toString(); - valMap.put("ILowerCase", ILowerCaseValueAsString); + String iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + String iLowerCaseValueAsString = iLowerCaseValue.toString(); + valMap.put("iLowerCase", iLowerCaseValueAsString); } String aiValue = getAi(); if (aiValue != null) { String aiValueAsString = aiValue.toString(); valMap.put("ai", aiValueAsString); } - String BLowerCaseValue = getBLowerCase(); - if (BLowerCaseValue != null) { - String BLowerCaseValueAsString = BLowerCaseValue.toString(); - valMap.put("BLowerCase", BLowerCaseValueAsString); + String bLowerCaseValue = getbLowerCase(); + if (bLowerCaseValue != null) { + String bLowerCaseValueAsString = bLowerCaseValue.toString(); + valMap.put("bLowerCase", bLowerCaseValueAsString); } - String QLowerCaseValue = getQLowerCase(); - if (QLowerCaseValue != null) { - String QLowerCaseValueAsString = QLowerCaseValue.toString(); - valMap.put("QLowerCase", QLowerCaseValueAsString); + String qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + String qLowerCaseValueAsString = qLowerCaseValue.toString(); + valMap.put("qLowerCase", qLowerCaseValueAsString); } String SValue = getS(); if (SValue != null) { String SValueAsString = SValue.toString(); valMap.put("S", SValueAsString); } - String OLowerCaseValue = getOLowerCase(); - if (OLowerCaseValue != null) { - String OLowerCaseValueAsString = OLowerCaseValue.toString(); - valMap.put("OLowerCase", OLowerCaseValueAsString); + String oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + String oLowerCaseValueAsString = oLowerCaseValue.toString(); + valMap.put("oLowerCase", oLowerCaseValueAsString); } - BigDecimal PLowerCaseValue = getPLowerCase(); - if (PLowerCaseValue != null) { - String PLowerCaseValueAsString = PLowerCaseValue.toString(); - valMap.put("PLowerCase", PLowerCaseValueAsString); + BigDecimal pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + String pLowerCaseValueAsString = pLowerCaseValue.toString(); + valMap.put("pLowerCase", pLowerCaseValueAsString); } BigDecimal QValue = getQ(); if (QValue != null) { @@ -748,15 +748,15 @@ public String toUrlQueryString() { String ZValueAsString = ZValue.toString(); valMap.put("Z", ZValueAsString); } - String NLowerCaseValue = getNLowerCase(); - if (NLowerCaseValue != null) { - String NLowerCaseValueAsString = NLowerCaseValue.toString(); - valMap.put("NLowerCase", NLowerCaseValueAsString); + String nLowerCaseValue = getnLowerCase(); + if (nLowerCaseValue != null) { + String nLowerCaseValueAsString = nLowerCaseValue.toString(); + valMap.put("nLowerCase", nLowerCaseValueAsString); } - String SLowerCaseValue = getSLowerCase(); - if (SLowerCaseValue != null) { - String SLowerCaseValueAsString = SLowerCaseValue.toString(); - valMap.put("SLowerCase", SLowerCaseValueAsString); + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); } Long TValue = getT(); if (TValue != null) { @@ -779,45 +779,45 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - Object ELowerCaseValue = getELowerCase(); - if (ELowerCaseValue != null) { - valMap.put("ELowerCase", ELowerCaseValue); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); } Object EValue = getE(); if (EValue != null) { valMap.put("E", EValue); } - Object XLowerCaseValue = getXLowerCase(); - if (XLowerCaseValue != null) { - valMap.put("XLowerCase", XLowerCaseValue); + Object xLowerCaseValue = getxLowerCase(); + if (xLowerCaseValue != null) { + valMap.put("xLowerCase", xLowerCaseValue); } - Object ILowerCaseValue = getILowerCase(); - if (ILowerCaseValue != null) { - valMap.put("ILowerCase", ILowerCaseValue); + Object iLowerCaseValue = getiLowerCase(); + if (iLowerCaseValue != null) { + valMap.put("iLowerCase", iLowerCaseValue); } Object aiValue = getAi(); if (aiValue != null) { valMap.put("ai", aiValue); } - Object BLowerCaseValue = getBLowerCase(); - if (BLowerCaseValue != null) { - valMap.put("BLowerCase", BLowerCaseValue); + Object bLowerCaseValue = getbLowerCase(); + if (bLowerCaseValue != null) { + valMap.put("bLowerCase", bLowerCaseValue); } - Object QLowerCaseValue = getQLowerCase(); - if (QLowerCaseValue != null) { - valMap.put("QLowerCase", QLowerCaseValue); + Object qLowerCaseValue = getqLowerCase(); + if (qLowerCaseValue != null) { + valMap.put("qLowerCase", qLowerCaseValue); } Object SValue = getS(); if (SValue != null) { valMap.put("S", SValue); } - Object OLowerCaseValue = getOLowerCase(); - if (OLowerCaseValue != null) { - valMap.put("OLowerCase", OLowerCaseValue); + Object oLowerCaseValue = getoLowerCase(); + if (oLowerCaseValue != null) { + valMap.put("oLowerCase", oLowerCaseValue); } - Object PLowerCaseValue = getPLowerCase(); - if (PLowerCaseValue != null) { - valMap.put("PLowerCase", PLowerCaseValue); + Object pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + valMap.put("pLowerCase", pLowerCaseValue); } Object QValue = getQ(); if (QValue != null) { @@ -843,13 +843,13 @@ public Map toMap() { if (ZValue != null) { valMap.put("Z", ZValue); } - Object NLowerCaseValue = getNLowerCase(); - if (NLowerCaseValue != null) { - valMap.put("NLowerCase", NLowerCaseValue); + Object nLowerCaseValue = getnLowerCase(); + if (nLowerCaseValue != null) { + valMap.put("nLowerCase", nLowerCaseValue); } - Object SLowerCaseValue = getSLowerCase(); - if (SLowerCaseValue != null) { - valMap.put("SLowerCase", SLowerCaseValue); + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); } Object TValue = getT(); if (TValue != null) { diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/PriceStreamResponse.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/PriceStreamResponse.java index 581e8e3b5..f2cdd9938 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/PriceStreamResponse.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/PriceStreamResponse.java @@ -47,7 +47,7 @@ public class PriceStreamResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) @jakarta.annotation.Nullable - private String ELowerCase; + private String eLowerCase; public static final String SERIALIZED_NAME_RATES = "rates"; @@ -57,23 +57,23 @@ public class PriceStreamResponse extends BaseDTO { public PriceStreamResponse() {} - public PriceStreamResponse ELowerCase(@jakarta.annotation.Nullable String ELowerCase) { - this.ELowerCase = ELowerCase; + public PriceStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; return this; } /** * Event type, always `\"price\"`. * - * @return ELowerCase + * @return eLowerCase */ @jakarta.annotation.Nullable - public String getELowerCase() { - return ELowerCase; + public String geteLowerCase() { + return eLowerCase; } - public void setELowerCase(@jakarta.annotation.Nullable String ELowerCase) { - this.ELowerCase = ELowerCase; + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; } public PriceStreamResponse rates( @@ -115,20 +115,20 @@ public boolean equals(Object o) { return false; } PriceStreamResponse priceStreamResponse = (PriceStreamResponse) o; - return Objects.equals(this.ELowerCase, priceStreamResponse.ELowerCase) + return Objects.equals(this.eLowerCase, priceStreamResponse.eLowerCase) && Objects.equals(this.rates, priceStreamResponse.rates); } @Override public int hashCode() { - return Objects.hash(ELowerCase, rates); + return Objects.hash(eLowerCase, rates); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PriceStreamResponse {\n"); - sb.append(" ELowerCase: ").append(toIndentedString(ELowerCase)).append("\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); sb.append(" rates: ").append(toIndentedString(rates)).append("\n"); sb.append("}"); return sb.toString(); @@ -138,10 +138,10 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - String ELowerCaseValue = getELowerCase(); - if (ELowerCaseValue != null) { - String ELowerCaseValueAsString = ELowerCaseValue.toString(); - valMap.put("ELowerCase", ELowerCaseValueAsString); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); } List<@Valid PriceStreamResponseRatesInner> ratesValue = getRates(); if (ratesValue != null) { @@ -159,9 +159,9 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - Object ELowerCaseValue = getELowerCase(); - if (ELowerCaseValue != null) { - valMap.put("ELowerCase", ELowerCaseValue); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); } Object ratesValue = getRates(); if (ratesValue != null) { diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/PriceStreamResponseRatesInner.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/PriceStreamResponseRatesInner.java index 383533b10..1bf950a3d 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/PriceStreamResponseRatesInner.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/PriceStreamResponseRatesInner.java @@ -45,7 +45,7 @@ public class PriceStreamResponseRatesInner extends BaseDTO { @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) @jakarta.annotation.Nullable - private String SLowerCase; + private String sLowerCase; public static final String SERIALIZED_NAME_AC = "ac"; @@ -57,13 +57,13 @@ public class PriceStreamResponseRatesInner extends BaseDTO { @SerializedName(SERIALIZED_NAME_P_LOWER_CASE) @jakarta.annotation.Nullable - private String PLowerCase; + private String pLowerCase; public static final String SERIALIZED_NAME_T_LOWER_CASE = "t"; @SerializedName(SERIALIZED_NAME_T_LOWER_CASE) @jakarta.annotation.Nullable - private Long TLowerCase; + private Long tLowerCase; public static final String SERIALIZED_NAME_PC = "pc"; @@ -85,24 +85,24 @@ public class PriceStreamResponseRatesInner extends BaseDTO { public PriceStreamResponseRatesInner() {} - public PriceStreamResponseRatesInner SLowerCase( - @jakarta.annotation.Nullable String SLowerCase) { - this.SLowerCase = SLowerCase; + public PriceStreamResponseRatesInner sLowerCase( + @jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; return this; } /** * Symbol (UPPERCASE ticker), e.g. `\"AAPL\"`. * - * @return SLowerCase + * @return sLowerCase */ @jakarta.annotation.Nullable - public String getSLowerCase() { - return SLowerCase; + public String getsLowerCase() { + return sLowerCase; } - public void setSLowerCase(@jakarta.annotation.Nullable String SLowerCase) { - this.SLowerCase = SLowerCase; + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; } public PriceStreamResponseRatesInner ac(@jakarta.annotation.Nullable String ac) { @@ -125,43 +125,43 @@ public void setAc(@jakarta.annotation.Nullable String ac) { this.ac = ac; } - public PriceStreamResponseRatesInner PLowerCase( - @jakarta.annotation.Nullable String PLowerCase) { - this.PLowerCase = PLowerCase; + public PriceStreamResponseRatesInner pLowerCase( + @jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; return this; } /** * Latest price, trailing-zero stripped. * - * @return PLowerCase + * @return pLowerCase */ @jakarta.annotation.Nullable - public String getPLowerCase() { - return PLowerCase; + public String getpLowerCase() { + return pLowerCase; } - public void setPLowerCase(@jakarta.annotation.Nullable String PLowerCase) { - this.PLowerCase = PLowerCase; + public void setpLowerCase(@jakarta.annotation.Nullable String pLowerCase) { + this.pLowerCase = pLowerCase; } - public PriceStreamResponseRatesInner TLowerCase(@jakarta.annotation.Nullable Long TLowerCase) { - this.TLowerCase = TLowerCase; + public PriceStreamResponseRatesInner tLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { + this.tLowerCase = tLowerCase; return this; } /** * Price time (epoch milliseconds UTC); may be null. * - * @return TLowerCase + * @return tLowerCase */ @jakarta.annotation.Nullable - public Long getTLowerCase() { - return TLowerCase; + public Long gettLowerCase() { + return tLowerCase; } - public void setTLowerCase(@jakarta.annotation.Nullable Long TLowerCase) { - this.TLowerCase = TLowerCase; + public void settLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { + this.tLowerCase = tLowerCase; } public PriceStreamResponseRatesInner pc(@jakarta.annotation.Nullable String pc) { @@ -232,10 +232,10 @@ public boolean equals(Object o) { } PriceStreamResponseRatesInner priceStreamResponseRatesInner = (PriceStreamResponseRatesInner) o; - return Objects.equals(this.SLowerCase, priceStreamResponseRatesInner.SLowerCase) + return Objects.equals(this.sLowerCase, priceStreamResponseRatesInner.sLowerCase) && Objects.equals(this.ac, priceStreamResponseRatesInner.ac) - && Objects.equals(this.PLowerCase, priceStreamResponseRatesInner.PLowerCase) - && Objects.equals(this.TLowerCase, priceStreamResponseRatesInner.TLowerCase) + && Objects.equals(this.pLowerCase, priceStreamResponseRatesInner.pLowerCase) + && Objects.equals(this.tLowerCase, priceStreamResponseRatesInner.tLowerCase) && Objects.equals(this.pc, priceStreamResponseRatesInner.pc) && Objects.equals(this.tc, priceStreamResponseRatesInner.tc) && Objects.equals(this.mp, priceStreamResponseRatesInner.mp); @@ -252,7 +252,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(SLowerCase, ac, PLowerCase, TLowerCase, pc, tc, mp); + return Objects.hash(sLowerCase, ac, pLowerCase, tLowerCase, pc, tc, mp); } private static int hashCodeNullable(JsonNullable a) { @@ -266,10 +266,10 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PriceStreamResponseRatesInner {\n"); - sb.append(" SLowerCase: ").append(toIndentedString(SLowerCase)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); sb.append(" ac: ").append(toIndentedString(ac)).append("\n"); - sb.append(" PLowerCase: ").append(toIndentedString(PLowerCase)).append("\n"); - sb.append(" TLowerCase: ").append(toIndentedString(TLowerCase)).append("\n"); + sb.append(" pLowerCase: ").append(toIndentedString(pLowerCase)).append("\n"); + sb.append(" tLowerCase: ").append(toIndentedString(tLowerCase)).append("\n"); sb.append(" pc: ").append(toIndentedString(pc)).append("\n"); sb.append(" tc: ").append(toIndentedString(tc)).append("\n"); sb.append(" mp: ").append(toIndentedString(mp)).append("\n"); @@ -281,25 +281,25 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - String SLowerCaseValue = getSLowerCase(); - if (SLowerCaseValue != null) { - String SLowerCaseValueAsString = SLowerCaseValue.toString(); - valMap.put("SLowerCase", SLowerCaseValueAsString); + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); } String acValue = getAc(); if (acValue != null) { String acValueAsString = acValue.toString(); valMap.put("ac", acValueAsString); } - String PLowerCaseValue = getPLowerCase(); - if (PLowerCaseValue != null) { - String PLowerCaseValueAsString = PLowerCaseValue.toString(); - valMap.put("PLowerCase", PLowerCaseValueAsString); + String pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + String pLowerCaseValueAsString = pLowerCaseValue.toString(); + valMap.put("pLowerCase", pLowerCaseValueAsString); } - Long TLowerCaseValue = getTLowerCase(); - if (TLowerCaseValue != null) { - String TLowerCaseValueAsString = TLowerCaseValue.toString(); - valMap.put("TLowerCase", TLowerCaseValueAsString); + Long tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + String tLowerCaseValueAsString = tLowerCaseValue.toString(); + valMap.put("tLowerCase", tLowerCaseValueAsString); } String pcValue = getPc(); if (pcValue != null) { @@ -327,21 +327,21 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - Object SLowerCaseValue = getSLowerCase(); - if (SLowerCaseValue != null) { - valMap.put("SLowerCase", SLowerCaseValue); + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); } Object acValue = getAc(); if (acValue != null) { valMap.put("ac", acValue); } - Object PLowerCaseValue = getPLowerCase(); - if (PLowerCaseValue != null) { - valMap.put("PLowerCase", PLowerCaseValue); + Object pLowerCaseValue = getpLowerCase(); + if (pLowerCaseValue != null) { + valMap.put("pLowerCase", pLowerCaseValue); } - Object TLowerCaseValue = getTLowerCase(); - if (TLowerCaseValue != null) { - valMap.put("TLowerCase", TLowerCaseValue); + Object tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + valMap.put("tLowerCase", tLowerCaseValue); } Object pcValue = getPc(); if (pcValue != null) { diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/QuoteStreamRequest.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/QuoteStreamRequest.java index 24a632947..45aca18da 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/QuoteStreamRequest.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/QuoteStreamRequest.java @@ -39,6 +39,12 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0") public class QuoteStreamRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -47,6 +53,25 @@ public class QuoteStreamRequest extends BaseDTO { public QuoteStreamRequest() {} + public QuoteStreamRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public QuoteStreamRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; @@ -75,18 +100,20 @@ public boolean equals(Object o) { return false; } QuoteStreamRequest quoteStreamRequest = (QuoteStreamRequest) o; - return Objects.equals(this.symbol, quoteStreamRequest.symbol); + return Objects.equals(this.id, quoteStreamRequest.id) + && Objects.equals(this.symbol, quoteStreamRequest.symbol); } @Override public int hashCode() { - return Objects.hash(symbol); + return Objects.hash(id, symbol); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class QuoteStreamRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append("}"); return sb.toString(); @@ -96,6 +123,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -112,6 +144,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -142,6 +178,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); // a set of required properties/fields (JSON key names) @@ -178,6 +215,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/QuoteStreamResponse.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/QuoteStreamResponse.java index 895fc61ee..da4070593 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/QuoteStreamResponse.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/QuoteStreamResponse.java @@ -45,7 +45,7 @@ public class QuoteStreamResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) @jakarta.annotation.Nullable - private String ELowerCase; + private String eLowerCase; public static final String SERIALIZED_NAME_E = "E"; @@ -57,7 +57,7 @@ public class QuoteStreamResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_S_LOWER_CASE) @jakarta.annotation.Nullable - private String SLowerCase; + private String sLowerCase; public static final String SERIALIZED_NAME_BP = "bp"; @@ -91,23 +91,23 @@ public class QuoteStreamResponse extends BaseDTO { public QuoteStreamResponse() {} - public QuoteStreamResponse ELowerCase(@jakarta.annotation.Nullable String ELowerCase) { - this.ELowerCase = ELowerCase; + public QuoteStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; return this; } /** * Event type, always `\"quote\"`. * - * @return ELowerCase + * @return eLowerCase */ @jakarta.annotation.Nullable - public String getELowerCase() { - return ELowerCase; + public String geteLowerCase() { + return eLowerCase; } - public void setELowerCase(@jakarta.annotation.Nullable String ELowerCase) { - this.ELowerCase = ELowerCase; + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; } public QuoteStreamResponse E(@jakarta.annotation.Nullable Long E) { @@ -129,23 +129,23 @@ public void setE(@jakarta.annotation.Nullable Long E) { this.E = E; } - public QuoteStreamResponse SLowerCase(@jakarta.annotation.Nullable String SLowerCase) { - this.SLowerCase = SLowerCase; + public QuoteStreamResponse sLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; return this; } /** * Symbol (UPPERCASE ticker), e.g. `\"AAPL\"`. * - * @return SLowerCase + * @return sLowerCase */ @jakarta.annotation.Nullable - public String getSLowerCase() { - return SLowerCase; + public String getsLowerCase() { + return sLowerCase; } - public void setSLowerCase(@jakarta.annotation.Nullable String SLowerCase) { - this.SLowerCase = SLowerCase; + public void setsLowerCase(@jakarta.annotation.Nullable String sLowerCase) { + this.sLowerCase = sLowerCase; } public QuoteStreamResponse bp(@jakarta.annotation.Nullable String bp) { @@ -252,9 +252,9 @@ public boolean equals(Object o) { return false; } QuoteStreamResponse quoteStreamResponse = (QuoteStreamResponse) o; - return Objects.equals(this.ELowerCase, quoteStreamResponse.ELowerCase) + return Objects.equals(this.eLowerCase, quoteStreamResponse.eLowerCase) && Objects.equals(this.E, quoteStreamResponse.E) - && Objects.equals(this.SLowerCase, quoteStreamResponse.SLowerCase) + && Objects.equals(this.sLowerCase, quoteStreamResponse.sLowerCase) && Objects.equals(this.bp, quoteStreamResponse.bp) && Objects.equals(this.ap, quoteStreamResponse.ap) && Objects.equals(this.bs, quoteStreamResponse.bs) @@ -273,7 +273,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(ELowerCase, E, SLowerCase, bp, ap, bs, as, T); + return Objects.hash(eLowerCase, E, sLowerCase, bp, ap, bs, as, T); } private static int hashCodeNullable(JsonNullable a) { @@ -287,9 +287,9 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class QuoteStreamResponse {\n"); - sb.append(" ELowerCase: ").append(toIndentedString(ELowerCase)).append("\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); sb.append(" E: ").append(toIndentedString(E)).append("\n"); - sb.append(" SLowerCase: ").append(toIndentedString(SLowerCase)).append("\n"); + sb.append(" sLowerCase: ").append(toIndentedString(sLowerCase)).append("\n"); sb.append(" bp: ").append(toIndentedString(bp)).append("\n"); sb.append(" ap: ").append(toIndentedString(ap)).append("\n"); sb.append(" bs: ").append(toIndentedString(bs)).append("\n"); @@ -303,20 +303,20 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - String ELowerCaseValue = getELowerCase(); - if (ELowerCaseValue != null) { - String ELowerCaseValueAsString = ELowerCaseValue.toString(); - valMap.put("ELowerCase", ELowerCaseValueAsString); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); } Long EValue = getE(); if (EValue != null) { String EValueAsString = EValue.toString(); valMap.put("E", EValueAsString); } - String SLowerCaseValue = getSLowerCase(); - if (SLowerCaseValue != null) { - String SLowerCaseValueAsString = SLowerCaseValue.toString(); - valMap.put("SLowerCase", SLowerCaseValueAsString); + String sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + String sLowerCaseValueAsString = sLowerCaseValue.toString(); + valMap.put("sLowerCase", sLowerCaseValueAsString); } String bpValue = getBp(); if (bpValue != null) { @@ -354,17 +354,17 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - Object ELowerCaseValue = getELowerCase(); - if (ELowerCaseValue != null) { - valMap.put("ELowerCase", ELowerCaseValue); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); } Object EValue = getE(); if (EValue != null) { valMap.put("E", EValue); } - Object SLowerCaseValue = getSLowerCase(); - if (SLowerCaseValue != null) { - valMap.put("SLowerCase", SLowerCaseValue); + Object sLowerCaseValue = getsLowerCase(); + if (sLowerCaseValue != null) { + valMap.put("sLowerCase", sLowerCaseValue); } Object bpValue = getBp(); if (bpValue != null) { diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/TradabilityStreamRequest.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/TradabilityStreamRequest.java index 0d749462a..3bce7a471 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/TradabilityStreamRequest.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/TradabilityStreamRequest.java @@ -39,6 +39,12 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0") public class TradabilityStreamRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -47,6 +53,25 @@ public class TradabilityStreamRequest extends BaseDTO { public TradabilityStreamRequest() {} + public TradabilityStreamRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public TradabilityStreamRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; @@ -75,18 +100,20 @@ public boolean equals(Object o) { return false; } TradabilityStreamRequest tradabilityStreamRequest = (TradabilityStreamRequest) o; - return Objects.equals(this.symbol, tradabilityStreamRequest.symbol); + return Objects.equals(this.id, tradabilityStreamRequest.id) + && Objects.equals(this.symbol, tradabilityStreamRequest.symbol); } @Override public int hashCode() { - return Objects.hash(symbol); + return Objects.hash(id, symbol); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TradabilityStreamRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append("}"); return sb.toString(); @@ -96,6 +123,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -112,6 +144,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -142,6 +178,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); // a set of required properties/fields (JSON key names) @@ -178,6 +215,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/TradabilityStreamResponse.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/TradabilityStreamResponse.java index 5b7253bee..f4b9191c2 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/TradabilityStreamResponse.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/TradabilityStreamResponse.java @@ -45,7 +45,7 @@ public class TradabilityStreamResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) @jakarta.annotation.Nullable - private String ELowerCase; + private String eLowerCase; public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -69,27 +69,27 @@ public class TradabilityStreamResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_T_LOWER_CASE) @jakarta.annotation.Nullable - private Long TLowerCase; + private Long tLowerCase; public TradabilityStreamResponse() {} - public TradabilityStreamResponse ELowerCase(@jakarta.annotation.Nullable String ELowerCase) { - this.ELowerCase = ELowerCase; + public TradabilityStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; return this; } /** * Event type, always `\"tradability\"`. * - * @return ELowerCase + * @return eLowerCase */ @jakarta.annotation.Nullable - public String getELowerCase() { - return ELowerCase; + public String geteLowerCase() { + return eLowerCase; } - public void setELowerCase(@jakarta.annotation.Nullable String ELowerCase) { - this.ELowerCase = ELowerCase; + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; } public TradabilityStreamResponse symbol(@jakarta.annotation.Nullable String symbol) { @@ -151,23 +151,23 @@ public void setTradability(@jakarta.annotation.Nullable String tradability) { this.tradability = tradability; } - public TradabilityStreamResponse TLowerCase(@jakarta.annotation.Nullable Long TLowerCase) { - this.TLowerCase = TLowerCase; + public TradabilityStreamResponse tLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { + this.tLowerCase = tLowerCase; return this; } /** * Push time (epoch milliseconds UTC). * - * @return TLowerCase + * @return tLowerCase */ @jakarta.annotation.Nullable - public Long getTLowerCase() { - return TLowerCase; + public Long gettLowerCase() { + return tLowerCase; } - public void setTLowerCase(@jakarta.annotation.Nullable Long TLowerCase) { - this.TLowerCase = TLowerCase; + public void settLowerCase(@jakarta.annotation.Nullable Long tLowerCase) { + this.tLowerCase = tLowerCase; } @Override @@ -179,11 +179,11 @@ public boolean equals(Object o) { return false; } TradabilityStreamResponse tradabilityStreamResponse = (TradabilityStreamResponse) o; - return Objects.equals(this.ELowerCase, tradabilityStreamResponse.ELowerCase) + return Objects.equals(this.eLowerCase, tradabilityStreamResponse.eLowerCase) && Objects.equals(this.symbol, tradabilityStreamResponse.symbol) && Objects.equals(this.assetCode, tradabilityStreamResponse.assetCode) && Objects.equals(this.tradability, tradabilityStreamResponse.tradability) - && Objects.equals(this.TLowerCase, tradabilityStreamResponse.TLowerCase); + && Objects.equals(this.tLowerCase, tradabilityStreamResponse.tLowerCase); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -197,7 +197,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(ELowerCase, symbol, assetCode, tradability, TLowerCase); + return Objects.hash(eLowerCase, symbol, assetCode, tradability, tLowerCase); } private static int hashCodeNullable(JsonNullable a) { @@ -211,11 +211,11 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TradabilityStreamResponse {\n"); - sb.append(" ELowerCase: ").append(toIndentedString(ELowerCase)).append("\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" assetCode: ").append(toIndentedString(assetCode)).append("\n"); sb.append(" tradability: ").append(toIndentedString(tradability)).append("\n"); - sb.append(" TLowerCase: ").append(toIndentedString(TLowerCase)).append("\n"); + sb.append(" tLowerCase: ").append(toIndentedString(tLowerCase)).append("\n"); sb.append("}"); return sb.toString(); } @@ -224,10 +224,10 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - String ELowerCaseValue = getELowerCase(); - if (ELowerCaseValue != null) { - String ELowerCaseValueAsString = ELowerCaseValue.toString(); - valMap.put("ELowerCase", ELowerCaseValueAsString); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); } String symbolValue = getSymbol(); if (symbolValue != null) { @@ -244,10 +244,10 @@ public String toUrlQueryString() { String tradabilityValueAsString = tradabilityValue.toString(); valMap.put("tradability", tradabilityValueAsString); } - Long TLowerCaseValue = getTLowerCase(); - if (TLowerCaseValue != null) { - String TLowerCaseValueAsString = TLowerCaseValue.toString(); - valMap.put("TLowerCase", TLowerCaseValueAsString); + Long tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + String tLowerCaseValueAsString = tLowerCaseValue.toString(); + valMap.put("tLowerCase", tLowerCaseValueAsString); } valMap.put("timestamp", getTimestamp()); @@ -260,9 +260,9 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - Object ELowerCaseValue = getELowerCase(); - if (ELowerCaseValue != null) { - valMap.put("ELowerCase", ELowerCaseValue); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); } Object symbolValue = getSymbol(); if (symbolValue != null) { @@ -276,9 +276,9 @@ public Map toMap() { if (tradabilityValue != null) { valMap.put("tradability", tradabilityValue); } - Object TLowerCaseValue = getTLowerCase(); - if (TLowerCaseValue != null) { - valMap.put("TLowerCase", TLowerCaseValue); + Object tLowerCaseValue = gettLowerCase(); + if (tLowerCaseValue != null) { + valMap.put("tLowerCase", tLowerCaseValue); } valMap.put("timestamp", getTimestamp()); diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/TradingStatusStreamRequest.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/TradingStatusStreamRequest.java index 200d1e41e..bb3f096e4 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/TradingStatusStreamRequest.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/TradingStatusStreamRequest.java @@ -39,6 +39,12 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.22.0") public class TradingStatusStreamRequest extends BaseDTO { + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @jakarta.annotation.Nullable + private String id; + public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @SerializedName(SERIALIZED_NAME_SYMBOL) @@ -47,6 +53,25 @@ public class TradingStatusStreamRequest extends BaseDTO { public TradingStatusStreamRequest() {} + public TradingStatusStreamRequest id(@jakarta.annotation.Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique WebSocket request ID. + * + * @return id + */ + @jakarta.annotation.Nullable + public String getId() { + return id; + } + + public void setId(@jakarta.annotation.Nullable String id) { + this.id = id; + } + public TradingStatusStreamRequest symbol(@jakarta.annotation.Nullable String symbol) { this.symbol = symbol; return this; @@ -75,18 +100,20 @@ public boolean equals(Object o) { return false; } TradingStatusStreamRequest tradingStatusStreamRequest = (TradingStatusStreamRequest) o; - return Objects.equals(this.symbol, tradingStatusStreamRequest.symbol); + return Objects.equals(this.id, tradingStatusStreamRequest.id) + && Objects.equals(this.symbol, tradingStatusStreamRequest.symbol); } @Override public int hashCode() { - return Objects.hash(symbol); + return Objects.hash(id, symbol); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TradingStatusStreamRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append("}"); return sb.toString(); @@ -96,6 +123,11 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + String idValue = getId(); + if (idValue != null) { + String idValueAsString = idValue.toString(); + valMap.put("id", idValueAsString); + } String symbolValue = getSymbol(); if (symbolValue != null) { String symbolValueAsString = symbolValue.toString(); @@ -112,6 +144,10 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); + Object idValue = getId(); + if (idValue != null) { + valMap.put("id", idValue); + } Object symbolValue = getSymbol(); if (symbolValue != null) { valMap.put("symbol", symbolValue); @@ -142,6 +178,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("symbol"); // a set of required properties/fields (JSON key names) @@ -178,6 +215,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `id` to be a primitive type in the JSON string but" + + " got `%s`", + jsonObj.get("id").toString())); + } if ((jsonObj.get("symbol") != null && !jsonObj.get("symbol").isJsonNull()) && !jsonObj.get("symbol").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/TradingStatusStreamResponse.java b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/TradingStatusStreamResponse.java index 7debeb459..511723dca 100644 --- a/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/TradingStatusStreamResponse.java +++ b/clients/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/model/TradingStatusStreamResponse.java @@ -43,7 +43,7 @@ public class TradingStatusStreamResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_E_LOWER_CASE) @jakarta.annotation.Nullable - private String ELowerCase; + private String eLowerCase; public static final String SERIALIZED_NAME_SYMBOL = "symbol"; @@ -79,7 +79,7 @@ public class TradingStatusStreamResponse extends BaseDTO { @SerializedName(SERIALIZED_NAME_Z_LOWER_CASE) @jakarta.annotation.Nullable - private String ZLowerCase; + private String zLowerCase; public static final String SERIALIZED_NAME_TRADABILITY = "tradability"; @@ -89,23 +89,23 @@ public class TradingStatusStreamResponse extends BaseDTO { public TradingStatusStreamResponse() {} - public TradingStatusStreamResponse ELowerCase(@jakarta.annotation.Nullable String ELowerCase) { - this.ELowerCase = ELowerCase; + public TradingStatusStreamResponse eLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; return this; } /** * Event type, always `\"tradingStatus\"`. * - * @return ELowerCase + * @return eLowerCase */ @jakarta.annotation.Nullable - public String getELowerCase() { - return ELowerCase; + public String geteLowerCase() { + return eLowerCase; } - public void setELowerCase(@jakarta.annotation.Nullable String ELowerCase) { - this.ELowerCase = ELowerCase; + public void seteLowerCase(@jakarta.annotation.Nullable String eLowerCase) { + this.eLowerCase = eLowerCase; } public TradingStatusStreamResponse symbol(@jakarta.annotation.Nullable String symbol) { @@ -203,23 +203,23 @@ public void setTime(@jakarta.annotation.Nullable Long time) { this.time = time; } - public TradingStatusStreamResponse ZLowerCase(@jakarta.annotation.Nullable String ZLowerCase) { - this.ZLowerCase = ZLowerCase; + public TradingStatusStreamResponse zLowerCase(@jakarta.annotation.Nullable String zLowerCase) { + this.zLowerCase = zLowerCase; return this; } /** * Tape designation: `C` = CTA (NYSE / AMEX), `N` = UTP (Nasdaq). * - * @return ZLowerCase + * @return zLowerCase */ @jakarta.annotation.Nullable - public String getZLowerCase() { - return ZLowerCase; + public String getzLowerCase() { + return zLowerCase; } - public void setZLowerCase(@jakarta.annotation.Nullable String ZLowerCase) { - this.ZLowerCase = ZLowerCase; + public void setzLowerCase(@jakarta.annotation.Nullable String zLowerCase) { + this.zLowerCase = zLowerCase; } public TradingStatusStreamResponse tradability( @@ -252,33 +252,33 @@ public boolean equals(Object o) { return false; } TradingStatusStreamResponse tradingStatusStreamResponse = (TradingStatusStreamResponse) o; - return Objects.equals(this.ELowerCase, tradingStatusStreamResponse.ELowerCase) + return Objects.equals(this.eLowerCase, tradingStatusStreamResponse.eLowerCase) && Objects.equals(this.symbol, tradingStatusStreamResponse.symbol) && Objects.equals(this.assetCode, tradingStatusStreamResponse.assetCode) && Objects.equals(this.status, tradingStatusStreamResponse.status) && Objects.equals(this.msg, tradingStatusStreamResponse.msg) && Objects.equals(this.time, tradingStatusStreamResponse.time) - && Objects.equals(this.ZLowerCase, tradingStatusStreamResponse.ZLowerCase) + && Objects.equals(this.zLowerCase, tradingStatusStreamResponse.zLowerCase) && Objects.equals(this.tradability, tradingStatusStreamResponse.tradability); } @Override public int hashCode() { return Objects.hash( - ELowerCase, symbol, assetCode, status, msg, time, ZLowerCase, tradability); + eLowerCase, symbol, assetCode, status, msg, time, zLowerCase, tradability); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TradingStatusStreamResponse {\n"); - sb.append(" ELowerCase: ").append(toIndentedString(ELowerCase)).append("\n"); + sb.append(" eLowerCase: ").append(toIndentedString(eLowerCase)).append("\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" assetCode: ").append(toIndentedString(assetCode)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" msg: ").append(toIndentedString(msg)).append("\n"); sb.append(" time: ").append(toIndentedString(time)).append("\n"); - sb.append(" ZLowerCase: ").append(toIndentedString(ZLowerCase)).append("\n"); + sb.append(" zLowerCase: ").append(toIndentedString(zLowerCase)).append("\n"); sb.append(" tradability: ").append(toIndentedString(tradability)).append("\n"); sb.append("}"); return sb.toString(); @@ -288,10 +288,10 @@ public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - String ELowerCaseValue = getELowerCase(); - if (ELowerCaseValue != null) { - String ELowerCaseValueAsString = ELowerCaseValue.toString(); - valMap.put("ELowerCase", ELowerCaseValueAsString); + String eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + String eLowerCaseValueAsString = eLowerCaseValue.toString(); + valMap.put("eLowerCase", eLowerCaseValueAsString); } String symbolValue = getSymbol(); if (symbolValue != null) { @@ -318,10 +318,10 @@ public String toUrlQueryString() { String timeValueAsString = timeValue.toString(); valMap.put("time", timeValueAsString); } - String ZLowerCaseValue = getZLowerCase(); - if (ZLowerCaseValue != null) { - String ZLowerCaseValueAsString = ZLowerCaseValue.toString(); - valMap.put("ZLowerCase", ZLowerCaseValueAsString); + String zLowerCaseValue = getzLowerCase(); + if (zLowerCaseValue != null) { + String zLowerCaseValueAsString = zLowerCaseValue.toString(); + valMap.put("zLowerCase", zLowerCaseValueAsString); } String tradabilityValue = getTradability(); if (tradabilityValue != null) { @@ -339,9 +339,9 @@ public String toUrlQueryString() { public Map toMap() { Map valMap = new TreeMap(); valMap.put("apiKey", getApiKey()); - Object ELowerCaseValue = getELowerCase(); - if (ELowerCaseValue != null) { - valMap.put("ELowerCase", ELowerCaseValue); + Object eLowerCaseValue = geteLowerCase(); + if (eLowerCaseValue != null) { + valMap.put("eLowerCase", eLowerCaseValue); } Object symbolValue = getSymbol(); if (symbolValue != null) { @@ -363,9 +363,9 @@ public Map toMap() { if (timeValue != null) { valMap.put("time", timeValue); } - Object ZLowerCaseValue = getZLowerCase(); - if (ZLowerCaseValue != null) { - valMap.put("ZLowerCase", ZLowerCaseValue); + Object zLowerCaseValue = getzLowerCase(); + if (zLowerCaseValue != null) { + valMap.put("zLowerCase", zLowerCaseValue); } Object tradabilityValue = getTradability(); if (tradabilityValue != null) { diff --git a/clients/sub-account/CHANGELOG.md b/clients/sub-account/CHANGELOG.md index e624ec1cf..cc16403ed 100644 --- a/clients/sub-account/CHANGELOG.md +++ b/clients/sub-account/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 8.0.1 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 8.0.0 - 2026-08-25 ### Changed (5) diff --git a/clients/sub-account/docs/AccountManagementApi.md b/clients/sub-account/docs/AccountManagementApi.md index 62b5e7ca8..84d2324b5 100644 --- a/clients/sub-account/docs/AccountManagementApi.md +++ b/clients/sub-account/docs/AccountManagementApi.md @@ -288,7 +288,7 @@ public class Example { AccountManagementApi apiInstance = new AccountManagementApi(defaultClient); String email = "123@test.com"; // String | - Long futuresType = 1L; // Long | 1:USDT-margined Futures,2: Coin-margined Futures + Long futuresType = 1L; // Long | 1: USDT-margined Futures,2: Coin-margined Futures Long recvWindow = 5000L; // Long | try { GetFuturesPositionRiskOfSubAccountV2Response result = apiInstance.getFuturesPositionRiskOfSubAccountV2(email, futuresType, recvWindow); @@ -309,7 +309,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **email** | **String**| | | -| **futuresType** | **Long**| 1:USDT-margined Futures,2: Coin-margined Futures | | +| **futuresType** | **Long**| 1: USDT-margined Futures,2: Coin-margined Futures | | | **recvWindow** | **Long**| | [optional] | ### Return type diff --git a/clients/sub-account/docs/AssetManagementApi.md b/clients/sub-account/docs/AssetManagementApi.md index cba071dcc..8513dfbe1 100644 --- a/clients/sub-account/docs/AssetManagementApi.md +++ b/clients/sub-account/docs/AssetManagementApi.md @@ -179,7 +179,7 @@ public class Example { AssetManagementApi apiInstance = new AssetManagementApi(defaultClient); String email = "123@test.com"; // String | - Long futuresType = 1L; // Long | 1:USDT-margined Futures,2: Coin-margined Futures + Long futuresType = 1L; // Long | 1: USDT-margined Futures,2: Coin-margined Futures Long recvWindow = 5000L; // Long | try { GetDetailOnSubAccountsFuturesAccountV2Response result = apiInstance.getDetailOnSubAccountsFuturesAccountV2(email, futuresType, recvWindow); @@ -200,7 +200,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **email** | **String**| | | -| **futuresType** | **Long**| 1:USDT-margined Futures,2: Coin-margined Futures | | +| **futuresType** | **Long**| 1: USDT-margined Futures,2: Coin-margined Futures | | | **recvWindow** | **Long**| | [optional] | ### Return type @@ -598,7 +598,7 @@ public class Example { defaultClient.setBasePath("https://api.binance.com"); AssetManagementApi apiInstance = new AssetManagementApi(defaultClient); - Long futuresType = 1L; // Long | 1:USDT-margined Futures,2: Coin-margined Futures + Long futuresType = 1L; // Long | 1: USDT-margined Futures,2: Coin-margined Futures Long page = 1L; // Long | Long limit = 10L; // Long | Long recvWindow = 5000L; // Long | @@ -620,7 +620,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **futuresType** | **Long**| 1:USDT-margined Futures,2: Coin-margined Futures | | +| **futuresType** | **Long**| 1: USDT-margined Futures,2: Coin-margined Futures | | | **page** | **Long**| | [optional] | | **limit** | **Long**| | [optional] | | **recvWindow** | **Long**| | [optional] | @@ -981,7 +981,7 @@ public class Example { AssetManagementApi apiInstance = new AssetManagementApi(defaultClient); String email = "123@test.com"; // String | - Long futuresType = 1L; // Long | 1:USDT-margined Futures,2: Coin-margined Futures + Long futuresType = 1L; // Long | 1: USDT-margined Futures,2: Coin-margined Futures Long startTime = 1623319461670L; // Long | Cannot be earlier than 1 month ago Long endTime = 1641782889000L; // Long | Long page = 1L; // Long | @@ -1006,7 +1006,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **email** | **String**| | | -| **futuresType** | **Long**| 1:USDT-margined Futures,2: Coin-margined Futures | | +| **futuresType** | **Long**| 1: USDT-margined Futures,2: Coin-margined Futures | | | **startTime** | **Long**| Cannot be earlier than 1 month ago | [optional] | | **endTime** | **Long**| | [optional] | | **page** | **Long**| | [optional] | diff --git a/clients/sub-account/docs/FuturesTransferForSubAccountRequest.md b/clients/sub-account/docs/FuturesTransferForSubAccountRequest.md index 70aabdf45..747d88592 100644 --- a/clients/sub-account/docs/FuturesTransferForSubAccountRequest.md +++ b/clients/sub-account/docs/FuturesTransferForSubAccountRequest.md @@ -10,7 +10,7 @@ |**email** | **String** | | | |**asset** | **String** | The asset being transferred | | |**amount** | **Double** | The amount to be transferred | | -|**type** | **Long** | 1: transfer from subaccount's spot account to its USDT-margined futures account 2: transfer from subaccount's USDT-margined futures account to its spot account 3: transfer from subaccount's spot account to its COIN-margined futures account 4:transfer from subaccount's COIN-margined futures account to its spot account | | +|**type** | **Long** | 1: transfer from subaccount's spot account to its USDT-margined futures account 2: transfer from subaccount's USDT-margined futures account to its spot account 3: transfer from subaccount's spot account to its COIN-margined futures account 4: transfer from subaccount's COIN-margined futures account to its spot account | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/sub-account/docs/ManagedSubAccountApi.md b/clients/sub-account/docs/ManagedSubAccountApi.md index c47ebb7e8..0f8966a76 100644 --- a/clients/sub-account/docs/ManagedSubAccountApi.md +++ b/clients/sub-account/docs/ManagedSubAccountApi.md @@ -487,7 +487,7 @@ No authorization required Query Managed Sub Account Transfer Log For Investor Master Account (USER_DATA) -Query Managed Sub Account Transfer Log For Investor Master Account Investor can use this api to query managed sub account transfer log. This endpoint is available for investor of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team. Please refer to [link](https://www.binance.com/en/support/faq/how-to-get-started-with-managed-sub-account-functions-and-frequently-asked-questions-0594748722704383a7c369046e489459) Weight(IP): 1 Security Type: USER_DATA +Query Managed Sub Account Transfer Log For Investor Master Account Investor can use this api to query managed sub account transfer log. This endpoint is available for investor of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team. Please refer to link Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -561,7 +561,7 @@ No authorization required Query Managed Sub Account Transfer Log For Trading Team Master Account (USER_DATA) -Query Managed Sub Account Transfer Log For Trading Team Master Account Trading team can use this api to query managed sub account transfer log. This endpoint is available for trading team of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team. Please refer to [link](https://www.binance.com/en/support/faq/how-to-get-started-with-managed-sub-account-functions-and-frequently-asked-questions-0594748722704383a7c369046e489459) Weight(UID): 60 Security Type: USER_DATA +Query Managed Sub Account Transfer Log For Trading Team Master Account Trading team can use this api to query managed sub account transfer log. This endpoint is available for trading team of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team. Please refer to link Weight(UID): 60 Security Type: USER_DATA ### Example ```java diff --git a/clients/sub-account/docs/SubAccountFuturesAssetTransferRequest.md b/clients/sub-account/docs/SubAccountFuturesAssetTransferRequest.md index a4edd8d3f..c78a11075 100644 --- a/clients/sub-account/docs/SubAccountFuturesAssetTransferRequest.md +++ b/clients/sub-account/docs/SubAccountFuturesAssetTransferRequest.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**fromEmail** | **String** | Sender email | | |**toEmail** | **String** | Recipient email | | -|**futuresType** | **Long** | 1:USDT-margined Futures,2: Coin-margined Futures | | +|**futuresType** | **Long** | 1: USDT-margined Futures,2: Coin-margined Futures | | |**asset** | **String** | | | |**amount** | **Double** | | | |**recvWindow** | **Long** | | [optional] | diff --git a/clients/sub-account/docs/rest-api/migration-guide.md b/clients/sub-account/docs/rest-api/migration-guide.md index 8461bc35c..922f97a8f 100644 --- a/clients/sub-account/docs/rest-api/migration-guide.md +++ b/clients/sub-account/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-sub-account - 8.0.0 + 8.0.1 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-sub-account - 8.0.0 + 8.0.1 ``` diff --git a/clients/sub-account/example_rest.md b/clients/sub-account/example_rest.md index 62dcd00ef..74634e11b 100644 --- a/clients/sub-account/example_rest.md +++ b/clients/sub-account/example_rest.md @@ -96,9 +96,9 @@ [GET /sapi/v1/managed-subaccount/accountSnapshot](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-snapshot) - queryManagedSubAccountSnapshot - [QueryManagedSubAccountSnapshotExample.java:40](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountSnapshotExample.java#L40) -[GET /sapi/v1/managed-subaccount/queryTransLogForInvestor](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-transfer-log-master-account-investor) - queryManagedSubAccountTransferLogMasterAccountInvestor - [QueryManagedSubAccountTransferLogMasterAccountInvestorExample.java:43](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountInvestorExample.java#L43) +[GET /sapi/v1/managed-subaccount/queryTransLogForInvestor](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-transfer-log-master-account-investor) - queryManagedSubAccountTransferLogMasterAccountInvestor - [QueryManagedSubAccountTransferLogMasterAccountInvestorExample.java:41](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountInvestorExample.java#L41) -[GET /sapi/v1/managed-subaccount/queryTransLogForTradeParent](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-transfer-log-master-account-trading) - queryManagedSubAccountTransferLogMasterAccountTrading - [QueryManagedSubAccountTransferLogMasterAccountTradingExample.java:43](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountTradingExample.java#L43) +[GET /sapi/v1/managed-subaccount/queryTransLogForTradeParent](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-transfer-log-master-account-trading) - queryManagedSubAccountTransferLogMasterAccountTrading - [QueryManagedSubAccountTransferLogMasterAccountTradingExample.java:41](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountTradingExample.java#L41) [GET /sapi/v1/managed-subaccount/query-trans-log](https://developers.binance.com/en/docs/catalog/vip-and-institutional-sub-account/api/rest-api/managed-sub-account#query-managed-sub-account-transfer-log-sub-account-trading) - queryManagedSubAccountTransferLogSubAccountTrading - [QueryManagedSubAccountTransferLogSubAccountTradingExample.java:38](/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogSubAccountTradingExample.java#L38) diff --git a/clients/sub-account/pom.xml b/clients/sub-account/pom.xml index c98bf9614..55f2a8c8b 100644 --- a/clients/sub-account/pom.xml +++ b/clients/sub-account/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-sub-account sub-account - 8.0.0 + 8.0.1 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/AccountManagementApi.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/AccountManagementApi.java index f1f4f99b4..2c15465b3 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/AccountManagementApi.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/AccountManagementApi.java @@ -53,7 +53,7 @@ public class AccountManagementApi { private static final String USER_AGENT = String.format( - "binance-sub-account/8.0.0 (Java/%s; %s; %s)", + "binance-sub-account/8.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -682,7 +682,7 @@ private okhttp3.Call getFuturesPositionRiskOfSubAccountValidateBeforeCall( * Build call for getFuturesPositionRiskOfSubAccountV2 * * @param email (required) - * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) + * @param futuresType 1: USDT-margined Futures,2: Coin-margined Futures (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -809,7 +809,7 @@ private okhttp3.Call getFuturesPositionRiskOfSubAccountV2ValidateBeforeCall( * Position-Risk of Sub-account V2 Weight(IP): 1 Security Type: USER_DATA * * @param email (required) - * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) + * @param futuresType 1: USDT-margined Futures,2: Coin-margined Futures (required) * @param recvWindow (optional) * @return ApiResponse<GetFuturesPositionRiskOfSubAccountV2Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/ApiManagementApi.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/ApiManagementApi.java index 5e4ad8876..6999da06b 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/ApiManagementApi.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/ApiManagementApi.java @@ -51,7 +51,7 @@ public class ApiManagementApi { private static final String USER_AGENT = String.format( - "binance-sub-account/8.0.0 (Java/%s; %s; %s)", + "binance-sub-account/8.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/AssetManagementApi.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/AssetManagementApi.java index a5da40cba..a736922f7 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/AssetManagementApi.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/AssetManagementApi.java @@ -75,7 +75,7 @@ public class AssetManagementApi { private static final String USER_AGENT = String.format( - "binance-sub-account/8.0.0 (Java/%s; %s; %s)", + "binance-sub-account/8.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -430,7 +430,7 @@ private okhttp3.Call getDetailOnSubAccountsFuturesAccountValidateBeforeCall( * Build call for getDetailOnSubAccountsFuturesAccountV2 * * @param email (required) - * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) + * @param futuresType 1: USDT-margined Futures,2: Coin-margined Futures (required) * @param recvWindow (optional) * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -557,7 +557,7 @@ private okhttp3.Call getDetailOnSubAccountsFuturesAccountV2ValidateBeforeCall( * Detail on Sub-account's Futures Account Weight(IP): 1 Security Type: USER_DATA * * @param email (required) - * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) + * @param futuresType 1: USDT-margined Futures,2: Coin-margined Futures (required) * @param recvWindow (optional) * @return ApiResponse<GetDetailOnSubAccountsFuturesAccountV2Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -1563,7 +1563,7 @@ private okhttp3.Call getSummaryOfSubAccountsFuturesAccountValidateBeforeCall( /** * Build call for getSummaryOfSubAccountsFuturesAccountV2 * - * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) + * @param futuresType 1: USDT-margined Futures,2: Coin-margined Futures (required) * @param page (optional) * @param limit (optional) * @param recvWindow (optional) @@ -1697,7 +1697,7 @@ private okhttp3.Call getSummaryOfSubAccountsFuturesAccountV2ValidateBeforeCall( * Get Summary of Sub-account's Futures Account V2 (For Master Account) (USER_DATA) Get * Summary of Sub-account's Futures Account Weight(IP): 10 Security Type: USER_DATA * - * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) + * @param futuresType 1: USDT-margined Futures,2: Coin-margined Futures (required) * @param page (optional) * @param limit (optional) * @param recvWindow (optional) @@ -2498,7 +2498,7 @@ private okhttp3.Call querySubAccountAssetsAssetManagementValidateBeforeCall( * Build call for querySubAccountFuturesAssetTransferHistory * * @param email (required) - * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) + * @param futuresType 1: USDT-margined Futures,2: Coin-margined Futures (required) * @param startTime Cannot be earlier than 1 month ago (optional) * @param endTime (optional) * @param page (optional) @@ -2666,7 +2666,7 @@ private okhttp3.Call querySubAccountFuturesAssetTransferHistoryValidateBeforeCal * Sub-account Futures Asset Transfer History Weight(IP): 1 Security Type: USER_DATA * * @param email (required) - * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) + * @param futuresType 1: USDT-margined Futures,2: Coin-margined Futures (required) * @param startTime Cannot be earlier than 1 month ago (optional) * @param endTime (optional) * @param page (optional) diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/ManagedSubAccountApi.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/ManagedSubAccountApi.java index 6a474747a..d091c3a40 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/ManagedSubAccountApi.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/ManagedSubAccountApi.java @@ -58,7 +58,7 @@ public class ManagedSubAccountApi { private static final String USER_AGENT = String.format( - "binance-sub-account/8.0.0 (Java/%s; %s; %s)", + "binance-sub-account/8.0.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -1447,9 +1447,7 @@ private okhttp3.Call queryManagedSubAccountTransferLogMasterAccountInvestorValid * managed sub account transfer log. This endpoint is available for investor of Managed * Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in * asset allocation and account application, while delegating trades to a professional trading - * team. Please refer to - * [link](https://www.binance.com/en/support/faq/how-to-get-started-with-managed-sub-account-functions-and-frequently-asked-questions-0594748722704383a7c369046e489459) - * Weight(IP): 1 Security Type: USER_DATA + * team. Please refer to link Weight(IP): 1 Security Type: USER_DATA * * @param email (required) * @param startTime Start Time (required) @@ -1680,9 +1678,7 @@ private okhttp3.Call queryManagedSubAccountTransferLogMasterAccountTradingValida * api to query managed sub account transfer log. This endpoint is available for trading team of * Managed Sub-Account. A Managed Sub-Account is an account type for investors who value * flexibility in asset allocation and account application, while delegating trades to a - * professional trading team. Please refer to - * [link](https://www.binance.com/en/support/faq/how-to-get-started-with-managed-sub-account-functions-and-frequently-asked-questions-0594748722704383a7c369046e489459) - * Weight(UID): 60 Security Type: USER_DATA + * professional trading team. Please refer to link Weight(UID): 60 Security Type: USER_DATA * * @param email (required) * @param startTime Start Time (required) diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/SubAccountRestApi.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/SubAccountRestApi.java index ddc34c5f1..0b1c3bc59 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/SubAccountRestApi.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/api/SubAccountRestApi.java @@ -196,7 +196,7 @@ public ApiResponse enableOptionsForSubAccoun * Position-Risk of Sub-account V2 Weight(IP): 1 Security Type: USER_DATA * * @param email (required) - * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) + * @param futuresType 1: USDT-margined Futures,2: Coin-margined Futures (required) * @param recvWindow (optional) * @return ApiResponse<GetFuturesPositionRiskOfSubAccountV2Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -562,7 +562,7 @@ public ApiResponse futuresTransferForSubAc * Detail on Sub-account's Futures Account Weight(IP): 1 Security Type: USER_DATA * * @param email (required) - * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) + * @param futuresType 1: USDT-margined Futures,2: Coin-margined Futures (required) * @param recvWindow (optional) * @return ApiResponse<GetDetailOnSubAccountsFuturesAccountV2Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -775,7 +775,7 @@ public ApiResponse getSubAccountDepositHist * Get Summary of Sub-account's Futures Account V2 (For Master Account) (USER_DATA) Get * Summary of Sub-account's Futures Account Weight(IP): 10 Security Type: USER_DATA * - * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) + * @param futuresType 1: USDT-margined Futures,2: Coin-margined Futures (required) * @param page (optional) * @param limit (optional) * @param recvWindow (optional) @@ -941,7 +941,7 @@ public ApiResponse querySubAccountAssets( * Sub-account Futures Asset Transfer History Weight(IP): 1 Security Type: USER_DATA * * @param email (required) - * @param futuresType 1:USDT-margined Futures,2: Coin-margined Futures (required) + * @param futuresType 1: USDT-margined Futures,2: Coin-margined Futures (required) * @param startTime Cannot be earlier than 1 month ago (optional) * @param endTime (optional) * @param page (optional) @@ -1471,9 +1471,7 @@ public ApiResponse queryManagedSubAccoun * managed sub account transfer log. This endpoint is available for investor of Managed * Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in * asset allocation and account application, while delegating trades to a professional trading - * team. Please refer to - * [link](https://www.binance.com/en/support/faq/how-to-get-started-with-managed-sub-account-functions-and-frequently-asked-questions-0594748722704383a7c369046e489459) - * Weight(IP): 1 Security Type: USER_DATA + * team. Please refer to link Weight(IP): 1 Security Type: USER_DATA * * @param email (required) * @param startTime Start Time (required) @@ -1518,9 +1516,7 @@ public ApiResponse queryManagedSubAccoun * api to query managed sub account transfer log. This endpoint is available for trading team of * Managed Sub-Account. A Managed Sub-Account is an account type for investors who value * flexibility in asset allocation and account application, while delegating trades to a - * professional trading team. Please refer to - * [link](https://www.binance.com/en/support/faq/how-to-get-started-with-managed-sub-account-functions-and-frequently-asked-questions-0594748722704383a7c369046e489459) - * Weight(UID): 60 Security Type: USER_DATA + * professional trading team. Please refer to link Weight(UID): 60 Security Type: USER_DATA * * @param email (required) * @param startTime Start Time (required) diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/FuturesTransferForSubAccountRequest.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/FuturesTransferForSubAccountRequest.java index a48cb1000..939012b1d 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/FuturesTransferForSubAccountRequest.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/FuturesTransferForSubAccountRequest.java @@ -138,7 +138,7 @@ public FuturesTransferForSubAccountRequest type(@jakarta.annotation.Nonnull Long /** * 1: transfer from subaccount's spot account to its USDT-margined futures account 2: * transfer from subaccount's USDT-margined futures account to its spot account 3: transfer - * from subaccount's spot account to its COIN-margined futures account 4:transfer from + * from subaccount's spot account to its COIN-margined futures account 4: transfer from * subaccount's COIN-margined futures account to its spot account * * @return type diff --git a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/SubAccountFuturesAssetTransferRequest.java b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/SubAccountFuturesAssetTransferRequest.java index 8196344ce..9c0f7dcc6 100644 --- a/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/SubAccountFuturesAssetTransferRequest.java +++ b/clients/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/model/SubAccountFuturesAssetTransferRequest.java @@ -124,7 +124,7 @@ public SubAccountFuturesAssetTransferRequest futuresType( } /** - * 1:USDT-margined Futures,2: Coin-margined Futures + * 1: USDT-margined Futures,2: Coin-margined Futures * * @return futuresType */ diff --git a/clients/vip-loan/CHANGELOG.md b/clients/vip-loan/CHANGELOG.md index 227816843..eb73becbf 100644 --- a/clients/vip-loan/CHANGELOG.md +++ b/clients/vip-loan/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 4.0.2 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 4.0.1 - 2026-08-25 ### Changed (1) diff --git a/clients/vip-loan/docs/rest-api/migration-guide.md b/clients/vip-loan/docs/rest-api/migration-guide.md index 8f89d92b3..485186357 100644 --- a/clients/vip-loan/docs/rest-api/migration-guide.md +++ b/clients/vip-loan/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-vip-loan - 4.0.0 + 4.0.2 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-vip-loan - 4.0.0 + 4.0.2 ``` diff --git a/clients/vip-loan/pom.xml b/clients/vip-loan/pom.xml index c3017695d..75100b624 100644 --- a/clients/vip-loan/pom.xml +++ b/clients/vip-loan/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-vip-loan vip-loan - 4.0.1 + 4.0.2 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/MarketDataApi.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/MarketDataApi.java index 6f90410d2..b7e5800f2 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/MarketDataApi.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/MarketDataApi.java @@ -46,7 +46,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-vip-loan/4.0.1 (Java/%s; %s; %s)", + "binance-vip-loan/4.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/TradeApi.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/TradeApi.java index 8df93e687..38128e602 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/TradeApi.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/TradeApi.java @@ -51,7 +51,7 @@ public class TradeApi { private static final String USER_AGENT = String.format( - "binance-vip-loan/4.0.1 (Java/%s; %s; %s)", + "binance-vip-loan/4.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/UserInformationApi.java b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/UserInformationApi.java index 81e89339e..44cab6279 100644 --- a/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/UserInformationApi.java +++ b/clients/vip-loan/src/main/java/com/binance/connector/client/vip_loan/rest/api/UserInformationApi.java @@ -46,7 +46,7 @@ public class UserInformationApi { private static final String USER_AGENT = String.format( - "binance-vip-loan/4.0.1 (Java/%s; %s; %s)", + "binance-vip-loan/4.0.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/w3w-prediction/CHANGELOG.md b/clients/w3w-prediction/CHANGELOG.md index f575e2dae..0a704b87e 100644 --- a/clients/w3w-prediction/CHANGELOG.md +++ b/clients/w3w-prediction/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2.1.2 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 2.1.1 - 2026-08-25 ### Changed (1) diff --git a/clients/w3w-prediction/docs/MarketDataApi.md b/clients/w3w-prediction/docs/MarketDataApi.md index 1c9d8bd18..6f120a7fd 100644 --- a/clients/w3w-prediction/docs/MarketDataApi.md +++ b/clients/w3w-prediction/docs/MarketDataApi.md @@ -18,7 +18,7 @@ All URIs are relative to *https://api.binance.com* Get Market Detail -Get full details for a specific prediction market topic, including variant data and timeline. Weight(IP): 200 +Get full details for a specific prediction market topic, including variant data and timeline. Weight(IP): 1 ### Example ```java @@ -80,7 +80,7 @@ No authorization required List Prediction Categories -Get all available prediction market categories (L1 and L2). Weight(IP): 200 +Get all available prediction market categories (L1 and L2). Weight(IP): 1 ### Example ```java @@ -138,7 +138,7 @@ No authorization required List Prediction Markets -Get a paginated list of prediction market topics, with optional category and sort filters. Weight(IP): 200 +Get a paginated list of prediction market topics, with optional category and sort filters. Weight(IP): 1 ### Example ```java @@ -210,7 +210,7 @@ No authorization required Market Search -Semantic search for prediction market topics by keyword. Weight(IP): 200 +Semantic search for prediction market topics by keyword. Weight(IP): 1 ### Example ```java @@ -274,7 +274,7 @@ No authorization required Query Last Trade Price -Get the most recent trade price for a prediction market. Weight(IP): 200 +Get the most recent trade price for a prediction market. Weight(IP): 1 ### Example ```java @@ -336,7 +336,7 @@ No authorization required Query Order Book -Get the current order book (bids and asks) for a specific prediction market outcome token. Weight(IP): 200 +Get the current order book (bids and asks) for a specific prediction market outcome token. Weight(IP): 1 ### Example ```java diff --git a/clients/w3w-prediction/docs/PlaceOrderRequest.md b/clients/w3w-prediction/docs/PlaceOrderRequest.md index 537fe1ca2..23d53b74c 100644 --- a/clients/w3w-prediction/docs/PlaceOrderRequest.md +++ b/clients/w3w-prediction/docs/PlaceOrderRequest.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**walletAddress** | **String** | User's prediction wallet address | | +|**walletAddress** | **String** | User's prediction wallet address. Must be a valid address owned by the calling UID — a well-formed address not owned by the UID and a malformed (non-address) value both return the same generic `-3026`. An empty string instead returns `-1102` naming the field. | | |**walletId** | **String** | Wallet ID | | |**quoteId** | **String** | Quote ID obtained from `Get Quote` | | |**timeInForce** | **String** | Must match `orderType`: `FOK` for `MARKET`, `GTC` for `LIMIT` | | |**accountType** | **AccountType** | | | |**orderType** | **OrderType** | | | |**slippageBps** | **Integer** | Slippage tolerance in basis points. Range 1–10000 | | -|**priceLimit** | **String** | Limit price. Required when `orderType=LIMIT`. Must be > 0 | [optional] | +|**priceLimit** | **String** | Limit price. Required when `orderType=LIMIT`, must be > 0. Omitting it when `orderType=LIMIT` returns a generic `-3026` (no field name in the message). | [optional] | |**fundingSource** | **FundingSource** | | [optional] | |**fundTransferAmount** | **String** | Auto-transfer amount before order (wei). Must be > 0 if provided | [optional] | diff --git a/clients/w3w-prediction/docs/PositionApi.md b/clients/w3w-prediction/docs/PositionApi.md index 5c6aca687..b27944c0f 100644 --- a/clients/w3w-prediction/docs/PositionApi.md +++ b/clients/w3w-prediction/docs/PositionApi.md @@ -17,7 +17,7 @@ All URIs are relative to *https://api.binance.com* Get Position by Token (PREDICTION_TRADE) -Get the authenticated user's position detail for a specific prediction token. Weight(IP): 200 Security Type: PREDICTION_TRADE +Get the authenticated user's position detail for a specific prediction token. Weight(IP): 1 Security Type: PREDICTION_TRADE ### Example ```java @@ -83,7 +83,7 @@ No authorization required Query PnL (PREDICTION_TRADE) -Query profit and loss records for the authenticated user's prediction positions. When `tokenId` is provided, returns a single record in `pnl`; otherwise returns a list in `pnlList`. Weight(IP): 200 Security Type: PREDICTION_TRADE +Query profit and loss records for the authenticated user's prediction positions. When `tokenId` is provided, returns a single record in `pnl`; otherwise returns a list in `pnlList`. Weight(IP): 1 Security Type: PREDICTION_TRADE ### Example ```java @@ -155,7 +155,7 @@ No authorization required Query Positions (PREDICTION_TRADE) -Get the authenticated user's prediction token positions with portfolio summary and tab-based filtering. Weight(IP): 200 Security Type: PREDICTION_TRADE +Get the authenticated user's prediction token positions with portfolio summary and tab-based filtering. Weight(IP): 1 Security Type: PREDICTION_TRADE ### Example ```java @@ -225,7 +225,7 @@ No authorization required Query Positions by Filter (PREDICTION_TRADE) -Get prediction positions filtered by wallet address and/or market topic ID. Both parameters are optional. Weight(IP): 200 Security Type: PREDICTION_TRADE +Get prediction positions filtered by wallet address and/or market topic ID. Both parameters are optional. Weight(IP): 1 Security Type: PREDICTION_TRADE ### Example ```java @@ -291,7 +291,7 @@ No authorization required Query Settled Position History (PREDICTION_TRADE) -Get the authenticated user's settled (resolved) prediction position history with optional filters. Weight(IP): 200 Security Type: PREDICTION_TRADE +Get the authenticated user's settled (resolved) prediction position history with optional filters. Weight(IP): 1 Security Type: PREDICTION_TRADE ### Example ```java diff --git a/clients/w3w-prediction/docs/RedeemApi.md b/clients/w3w-prediction/docs/RedeemApi.md index e604b3df8..37ba6ff7d 100644 --- a/clients/w3w-prediction/docs/RedeemApi.md +++ b/clients/w3w-prediction/docs/RedeemApi.md @@ -14,7 +14,7 @@ All URIs are relative to *https://api.binance.com* Batch Redeem (PREDICTION_TRADE) -Redeem one or more settled prediction tokens on-chain to claim winnings. Requires SAS authorization. Weight(IP): 200 Security Type: PREDICTION_TRADE +Redeem one or more settled prediction tokens on-chain to claim winnings. Requires SAS authorization. Weight(IP): 1 Security Type: PREDICTION_TRADE ### Example ```java @@ -76,7 +76,7 @@ No authorization required Get Redeem Status (PREDICTION_TRADE) -Query the on-chain transaction status of a previously submitted redeem request. Weight(IP): 200 Security Type: PREDICTION_TRADE Response Notes: - Status values: | Value | Description | | ----------- | -------------------------------------------- | | `PENDING` | Transaction submitted, awaiting confirmation | | `CONFIRMED` | Transaction confirmed on-chain | | `FAILED` | Transaction failed | | `NOT_FOUND` | Transaction hash not found | +Query the on-chain transaction status of a previously submitted redeem request. Weight(IP): 1 Security Type: PREDICTION_TRADE Response Notes: - Status values: | Value | Description | | ----------- | -------------------------------------------- | | `PENDING` | Transaction submitted, awaiting confirmation | | `CONFIRMED` | Transaction confirmed on-chain | | `FAILED` | Transaction failed | | `NOT_FOUND` | Transaction hash not found | ### Example ```java diff --git a/clients/w3w-prediction/docs/TradeApi.md b/clients/w3w-prediction/docs/TradeApi.md index 610b387ad..37ce30a82 100644 --- a/clients/w3w-prediction/docs/TradeApi.md +++ b/clients/w3w-prediction/docs/TradeApi.md @@ -17,7 +17,7 @@ All URIs are relative to *https://api.binance.com* Batch Cancel Orders (PREDICTION_TRADE) -Cancel one or more active prediction orders in a single request. Requires SAS authorization. **Known Issue — Bracket Encoding Incompatibility:** This endpoint uses indexed bracket notation (`cancelInfoList[0].orderId`). Binance SAPI signature verification runs over the **raw, unencoded** canonical string. However, mainstream HTTP libraries (Python `requests`, Java `HttpURLConnection`/`URI`, Go `net/url`, Node.js `url`) automatically percent-encode `[` → `%5B` and `]` → `%5D`, producing a signature mismatch with error `-1022 Signature for this request is not valid`. Postman is unaffected because it does not encode keys. **Workarounds** (use low-level HTTP APIs that do not normalize URLs): - **Python:** use `http.client` (stdlib) and hand-build the body string. - **Java:** use `HttpURLConnection` and write the raw body bytes directly. - **Go:** use `strings.NewReader` with a hand-built body instead of `url.Values.Encode()`. Weight(IP): 200 Security Type: PREDICTION_TRADE Notes: - Use dot notation for nested list fields: `cancelInfoList[0].orderId`, `cancelInfoList[1].orderId`, etc. - `vendor` does not need to be supplied. The server automatically sets the correct vendor (`predict_fun`) for every item in the batch. +Cancel one or more active prediction orders in a single request. Requires SAS authorization. **Known Issue — Bracket Encoding Incompatibility:** This endpoint uses indexed bracket notation (`cancelInfoList[0].orderId`). Binance SAPI signature verification runs over the **raw, unencoded** canonical string. However, mainstream HTTP libraries (Python `requests`, Java `HttpURLConnection`/`URI`, Go `net/url`, Node.js `url`) automatically percent-encode `[` → `%5B` and `]` → `%5D`, producing a signature mismatch with error `-1022 Signature for this request is not valid`. Postman is unaffected because it does not encode keys. **Workarounds** (use low-level HTTP APIs that do not normalize URLs): - **Python:** use `http.client` (stdlib) and hand-build the body string. - **Java:** use `HttpURLConnection` and write the raw body bytes directly. - **Go:** use `strings.NewReader` with a hand-built body instead of `url.Values.Encode()`. Weight(IP): 1 Security Type: PREDICTION_TRADE Notes: - Use dot notation for nested list fields: `cancelInfoList[0].orderId`, `cancelInfoList[1].orderId`, etc. - `vendor` does not need to be supplied. The server automatically sets the correct vendor (`predict_fun`) for every item in the batch. ### Example ```java @@ -79,7 +79,7 @@ No authorization required Get Quote (PREDICTION_TRADE) -Get a price quote for a prediction order. The returned `quoteId` must be used in the subsequent Place Order request. Weight(IP): 200 Security Type: PREDICTION_TRADE Response Notes: - `feeAmount` is a string because it is denominated in wei (18 decimals) and may exceed JavaScript's safe integer range. `feeDiscountBps` is also a string to allow fractional basis-point values in the future. `feeRateBps` and `slippageBps` are integers and will never exceed safe integer bounds. - **MARKET order minimum amount:** For `MARKET` orders, `amountIn` must be at least approximately **1.5 USDT** (in wei: `1500000000000000000`). The exact minimum varies by market liquidity. If the amount is too small, the server returns `-9000 Your order amount is too small`. This limit does **not** apply to `LIMIT` orders. +Get a price quote for a prediction order. The returned `quoteId` must be used in the subsequent Place Order request. Weight(IP): 1 Security Type: PREDICTION_TRADE Response Notes: - `feeAmount` is a string because it is denominated in wei (18 decimals) and may exceed JavaScript's safe integer range. `feeDiscountBps` is also a string to allow fractional basis-point values in the future. `feeRateBps` and `slippageBps` are integers and will never exceed safe integer bounds. - **MARKET order minimum amount:** For `MARKET` orders, `amountIn` must be at least approximately **1.5 USDT** (in wei: `1500000000000000000`). The exact minimum varies by market liquidity. If the amount is too small, the server returns `-9000 Your order amount is too small`. This limit does **not** apply to `LIMIT` orders. ### Example ```java @@ -141,7 +141,7 @@ No authorization required Place Order (PREDICTION_TRADE) -Place a prediction order using a previously obtained quote. Requires SAS authorization. Weight(IP): 200 Security Type: PREDICTION_TRADE Notes: - Validation rules: | orderType | timeInForce | priceLimit | | --------- | ------------- | --------------------- | | `MARKET` | Must be `FOK` | Not required | | `LIMIT` | Must be `GTC` | Required, must be > 0 | +Place a prediction order using a previously obtained quote. Requires SAS authorization. Weight(IP): 1 Security Type: PREDICTION_TRADE Notes: - Validation rules: | orderType | timeInForce | priceLimit | | --------- | ------------- | --------------------- | | `MARKET` | Must be `FOK` | Not required | | `LIMIT` | Must be `GTC` | Required, must be > 0 | ### Example ```java @@ -203,7 +203,7 @@ No authorization required Query Active Orders (PREDICTION_TRADE) -Get active (open) prediction orders for the authenticated user. Weight(IP): 200 Security Type: PREDICTION_TRADE +Get active (open) prediction orders for the authenticated user. Weight(IP): 1 Security Type: PREDICTION_TRADE ### Example ```java @@ -277,7 +277,7 @@ No authorization required Query Order History (PREDICTION_TRADE) -Get historical prediction orders (all statuses) for the authenticated user, with optional filters. Weight(IP): 200 Security Type: PREDICTION_TRADE +Get historical prediction orders (all statuses) for the authenticated user, with optional filters. Weight(IP): 1 Security Type: PREDICTION_TRADE ### Example ```java diff --git a/clients/w3w-prediction/docs/TransferApi.md b/clients/w3w-prediction/docs/TransferApi.md index 58acdfc03..16da13c7a 100644 --- a/clients/w3w-prediction/docs/TransferApi.md +++ b/clients/w3w-prediction/docs/TransferApi.md @@ -18,7 +18,7 @@ All URIs are relative to *https://api.binance.com* Apply MM Deposit (PREDICTION_TRADE) -Move funds from the user's bound CeDeFi MPC wallet to their CEX account (SPOT/FUNDING) via a contract escrow + credit flow. The maker wallet is resolved server-side by `userId`; the caller does not pass wallet or signature. Weight(IP): 200 Security Type: PREDICTION_TRADE Notes: - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access. - \"Note on `fromToken` / `toToken`: typically the same symbol (e.g. both `USDT`). When they differ, the backend may attempt a swap, but cross-symbol conversion is not guaranteed for all pairs — prefer using the same symbol.\" +Move funds from the user's bound CeDeFi MPC wallet to their CEX account (SPOT/FUNDING) via a contract escrow + credit flow. The maker wallet is resolved server-side by `userId`; the caller does not pass wallet or signature. Weight(IP): 1 Security Type: PREDICTION_TRADE Notes: - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access. - \"Note on `fromToken` / `toToken`: typically the same symbol (e.g. both `USDT`). When they differ, the backend may attempt a swap, but cross-symbol conversion is not guaranteed for all pairs — prefer using the same symbol.\" ### Example ```java @@ -80,7 +80,7 @@ No authorization required Apply MM Withdraw (PREDICTION_TRADE) -Withdraw funds from the user's CEX account (SPOT/FUNDING) to their bound CeDeFi MPC wallet address. Unlike `v1/capital/withdraw/apply`, the caller does NOT pass `address`; the backend resolves the user's bound CeDeFi MPC wallet address by `userId` and reuses the existing capital withdraw flow with that address as the target. Weight(IP): 200 Security Type: PREDICTION_TRADE Notes: - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access. - walletType Validation: | Value | Behavior | | --------------- | ------------------------------- | | `null` | Allowed — defaults to SPOT | | `0` | Allowed — source = SPOT | | `1` | Allowed — source = FUNDING | | Other (e.g. `99`) | Rejected — returns validation error | - \"Note on field naming: this endpoint uses `walletType` (INT `0`/`1`) for the source CEX account, while Apply MM Deposit uses `accountType` (STRING `SPOT`/`FUNDING`) for the target. The difference is intentional: withdraw reuses the existing `v1/capital/withdraw/apply` flow, which inherits that flow's integer `walletType` field.\" +Withdraw funds from the user's CEX account (SPOT/FUNDING) to their bound CeDeFi MPC wallet address. Unlike `v1/capital/withdraw/apply`, the caller does NOT pass `address`; the backend resolves the user's bound CeDeFi MPC wallet address by `userId` and reuses the existing capital withdraw flow with that address as the target. Weight(IP): 1 Security Type: PREDICTION_TRADE Notes: - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access. - walletType Validation: | Value | Behavior | | --------------- | ------------------------------- | | `null` | Allowed — defaults to SPOT | | `0` | Allowed — source = SPOT | | `1` | Allowed — source = FUNDING | | Other (e.g. `99`) | Rejected — returns validation error | - \"Note on field naming: this endpoint uses `walletType` (INT `0`/`1`) for the source CEX account, while Apply MM Deposit uses `accountType` (STRING `SPOT`/`FUNDING`) for the target. The difference is intentional: withdraw reuses the existing `v1/capital/withdraw/apply` flow, which inherits that flow's integer `walletType` field.\" ### Example ```java @@ -142,7 +142,7 @@ No authorization required Create Inbound Transfer (PREDICTION_TRADE) -Transfer funds from the prediction wallet back to the user's CEX account (SPOT or FUNDING). Requires SAS authorization. ⚠️ **SAS Authorization Required:** This endpoint enforces SAS (Self-Authorization Service) authorization. If SAS is not enabled for the wallet, the request will be rejected with `-31003 SAS authorization required`. Enable SAS for your wallet before calling this endpoint. Weight(IP): 200 Security Type: PREDICTION_TRADE +Transfer funds from the prediction wallet back to the user's CEX account (SPOT or FUNDING). Requires SAS authorization. ⚠️ **SAS Authorization Required:** This endpoint enforces SAS (Self-Authorization Service) authorization. If SAS is not enabled for the wallet, the request will be rejected with `-31003 SAS authorization required`. Enable SAS for your wallet before calling this endpoint. Weight(IP): 1 Security Type: PREDICTION_TRADE ### Example ```java @@ -204,7 +204,7 @@ No authorization required Create Outbound Transfer (PREDICTION_TRADE) -Transfer funds from the user's CEX account (SPOT or FUNDING) into the prediction wallet. Requires SAS authorization. Weight(IP): 200 Security Type: PREDICTION_TRADE +Transfer funds from the user's CEX account (SPOT or FUNDING) into the prediction wallet. Requires SAS authorization. Weight(IP): 1 Security Type: PREDICTION_TRADE ### Example ```java @@ -266,7 +266,7 @@ No authorization required Query Transfer List (PREDICTION_TRADE) -Get the authenticated user's prediction wallet transfer history within a date range. Weight(IP): 200 Security Type: PREDICTION_TRADE +Get the authenticated user's prediction wallet transfer history within a date range. Weight(IP): 1 Security Type: PREDICTION_TRADE ### Example ```java @@ -342,7 +342,7 @@ No authorization required Query Transfer Status (PREDICTION_TRADE) -Query the current status of a prediction wallet transfer by transfer ID. **`status` values:** Terminal states are `COMPLETED` and `FAILED`. Intermediate states are `PROCESSING` and `PENDING`. **Do not** poll for `SUCCESS` — it is not a valid terminal state. Weight(IP): 200 Security Type: PREDICTION_TRADE +Query the current status of a prediction wallet transfer by transfer ID. **`status` values:** Terminal states are `COMPLETED` and `FAILED`. Intermediate states are `PROCESSING` and `PENDING`. **Do not** poll for `SUCCESS` — it is not a valid terminal state. Weight(IP): 1 Security Type: PREDICTION_TRADE ### Example ```java diff --git a/clients/w3w-prediction/docs/WalletApi.md b/clients/w3w-prediction/docs/WalletApi.md index 847f25290..8edef221e 100644 --- a/clients/w3w-prediction/docs/WalletApi.md +++ b/clients/w3w-prediction/docs/WalletApi.md @@ -16,7 +16,7 @@ All URIs are relative to *https://api.binance.com* Get Portfolio (PREDICTION_TRADE) -Get the authenticated user's prediction portfolio overview including active positions count, aggregated PnL, and full position list. Weight(IP): 200 Security Type: PREDICTION_TRADE +Get the authenticated user's prediction portfolio overview including active positions count, aggregated PnL, and full position list. Weight(IP): 1 Security Type: PREDICTION_TRADE ### Example ```java @@ -88,7 +88,7 @@ No authorization required Get Quota Status (PREDICTION_TRADE) -Query the current user's daily trading quota limit and remaining allowance for prediction markets. Weight(IP): 200 Security Type: PREDICTION_TRADE +Query the current user's daily trading quota limit and remaining allowance for prediction markets. Weight(IP): 1 Security Type: PREDICTION_TRADE ### Example ```java @@ -150,7 +150,7 @@ No authorization required List Prediction Wallets (PREDICTION_TRADE) -Get all prediction wallets registered for the authenticated user. Weight(IP): 200 Security Type: PREDICTION_TRADE +Get all prediction wallets registered for the authenticated user. Weight(IP): 1 Security Type: PREDICTION_TRADE ### Example ```java @@ -212,7 +212,7 @@ No authorization required Query Payment Option Balances (PREDICTION_TRADE) -Get available balances for each payment option that can be used for prediction trading. Weight(IP): 200 Security Type: PREDICTION_TRADE +Get available balances for each payment option that can be used for prediction trading. Weight(IP): 1 Security Type: PREDICTION_TRADE ### Example ```java diff --git a/clients/w3w-prediction/example_rest.md b/clients/w3w-prediction/example_rest.md index 2a566699f..1ee7ef700 100644 --- a/clients/w3w-prediction/example_rest.md +++ b/clients/w3w-prediction/example_rest.md @@ -76,7 +76,7 @@ ## Wallet -[GET /sapi/v1/w3w/wallet/prediction/pnl/portfolio](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-portfolio) - getPortfolio - [GetPortfolioExample.java:38](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetPortfolioExample.java#L38) +[GET /sapi/v1/w3w/wallet/prediction/pnl/portfolio](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-portfolio) - getPortfolio - [GetPortfolioExample.java:37](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetPortfolioExample.java#L37) [GET /sapi/v1/w3w/wallet/prediction/quota/limit/status](https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-quota-status) - getQuotaStatus - [GetQuotaStatusExample.java:37](/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetQuotaStatusExample.java#L37) diff --git a/clients/w3w-prediction/pom.xml b/clients/w3w-prediction/pom.xml index 16aa71692..3f332723b 100644 --- a/clients/w3w-prediction/pom.xml +++ b/clients/w3w-prediction/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-w3w-prediction w3w-prediction - 2.1.1 + 2.1.2 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/MarketDataApi.java b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/MarketDataApi.java index c797941a6..436904aff 100644 --- a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/MarketDataApi.java +++ b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/MarketDataApi.java @@ -49,7 +49,7 @@ public class MarketDataApi { private static final String USER_AGENT = String.format( - "binance-w3w-prediction/2.1.1 (Java/%s; %s; %s)", + "binance-w3w-prediction/2.1.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -195,7 +195,7 @@ private okhttp3.Call getMarketDetailValidateBeforeCall(Long marketTopicId) throw /** * Get Market Detail Get full details for a specific prediction market topic, including variant - * data and timeline. Weight(IP): 200 + * data and timeline. Weight(IP): 1 * * @param marketTopicId Market topic ID. Must be > 0 (required) * @return ApiResponse<GetMarketDetailResponse> @@ -323,7 +323,7 @@ private okhttp3.Call listPredictionCategoriesValidateBeforeCall() throws ApiExce /** * List Prediction Categories Get all available prediction market categories (L1 and L2). - * Weight(IP): 200 + * Weight(IP): 1 * * @return ApiResponse<ListPredictionCategoriesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -505,7 +505,7 @@ private okhttp3.Call listPredictionMarketsValidateBeforeCall( /** * List Prediction Markets Get a paginated list of prediction market topics, with optional - * category and sort filters. Weight(IP): 200 + * category and sort filters. Weight(IP): 1 * * @param l1Category Level-1 category filter (optional) * @param l2Category Level-2 category filter (optional) @@ -657,7 +657,7 @@ private okhttp3.Call marketSearchValidateBeforeCall(String query, Integer topK) } /** - * Market Search Semantic search for prediction market topics by keyword. Weight(IP): 200 + * Market Search Semantic search for prediction market topics by keyword. Weight(IP): 1 * * @param query Search keyword. Not blank (required) * @param topK Max number of results to return. Default `20`, range 1–50 (optional) @@ -790,8 +790,7 @@ private okhttp3.Call queryLastTradePriceValidateBeforeCall(Long marketId) throws } /** - * Query Last Trade Price Get the most recent trade price for a prediction market. Weight(IP): - * 200 + * Query Last Trade Price Get the most recent trade price for a prediction market. Weight(IP): 1 * * @param marketId Market ID. Must be > 0 (required) * @return ApiResponse<QueryLastTradePriceResponse> @@ -938,7 +937,7 @@ private okhttp3.Call queryOrderBookValidateBeforeCall( /** * Query Order Book Get the current order book (bids and asks) for a specific prediction market - * outcome token. Weight(IP): 200 + * outcome token. Weight(IP): 1 * * @param vendor Vendor identifier (e.g. `predict_fun`) (required) * @param marketId Market ID. Must be > 0 (required) diff --git a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/OtcApi.java b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/OtcApi.java index a896f30f2..d6b47b0b4 100644 --- a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/OtcApi.java +++ b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/OtcApi.java @@ -59,7 +59,7 @@ public class OtcApi { private static final String USER_AGENT = String.format( - "binance-w3w-prediction/2.1.1 (Java/%s; %s; %s)", + "binance-w3w-prediction/2.1.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/PositionApi.java b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/PositionApi.java index 1d90b0c36..fe8553c10 100644 --- a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/PositionApi.java +++ b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/PositionApi.java @@ -46,7 +46,7 @@ public class PositionApi { private static final String USER_AGENT = String.format( - "binance-w3w-prediction/2.1.1 (Java/%s; %s; %s)", + "binance-w3w-prediction/2.1.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -207,7 +207,7 @@ private okhttp3.Call getPositionByTokenValidateBeforeCall( /** * Get Position by Token (PREDICTION_TRADE) Get the authenticated user's position detail for - * a specific prediction token. Weight(IP): 200 Security Type: PREDICTION_TRADE + * a specific prediction token. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param walletAddress User's prediction wallet address (required) * @param tokenId Prediction outcome token ID (required) @@ -398,7 +398,7 @@ private okhttp3.Call queryPnLValidateBeforeCall( /** * Query PnL (PREDICTION_TRADE) Query profit and loss records for the authenticated user's * prediction positions. When `tokenId` is provided, returns a single record in - * `pnl`; otherwise returns a list in `pnlList`. Weight(IP): 200 Security + * `pnl`; otherwise returns a list in `pnlList`. Weight(IP): 1 Security * Type: PREDICTION_TRADE * * @param walletAddress User's prediction wallet address (required) @@ -578,7 +578,7 @@ private okhttp3.Call queryPositionsValidateBeforeCall( /** * Query Positions (PREDICTION_TRADE) Get the authenticated user's prediction token - * positions with portfolio summary and tab-based filtering. Weight(IP): 200 Security Type: + * positions with portfolio summary and tab-based filtering. Weight(IP): 1 Security Type: * PREDICTION_TRADE * * @param walletAddress User's prediction wallet address (required) @@ -740,7 +740,7 @@ private okhttp3.Call queryPositionsByFilterValidateBeforeCall( /** * Query Positions by Filter (PREDICTION_TRADE) Get prediction positions filtered by wallet - * address and/or market topic ID. Both parameters are optional. Weight(IP): 200 Security Type: + * address and/or market topic ID. Both parameters are optional. Weight(IP): 1 Security Type: * PREDICTION_TRADE * * @param walletAddress User's prediction wallet address (optional) @@ -955,7 +955,7 @@ private okhttp3.Call querySettledPositionHistoryValidateBeforeCall( /** * Query Settled Position History (PREDICTION_TRADE) Get the authenticated user's settled - * (resolved) prediction position history with optional filters. Weight(IP): 200 Security Type: + * (resolved) prediction position history with optional filters. Weight(IP): 1 Security Type: * PREDICTION_TRADE * * @param walletAddress User's prediction wallet address (required) diff --git a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/RedeemApi.java b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/RedeemApi.java index 5c6041242..7b987b564 100644 --- a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/RedeemApi.java +++ b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/RedeemApi.java @@ -46,7 +46,7 @@ public class RedeemApi { private static final String USER_AGENT = String.format( - "binance-w3w-prediction/2.1.1 (Java/%s; %s; %s)", + "binance-w3w-prediction/2.1.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -206,7 +206,7 @@ private okhttp3.Call batchRedeemValidateBeforeCall(BatchRedeemRequest batchRedee /** * Batch Redeem (PREDICTION_TRADE) Redeem one or more settled prediction tokens on-chain to - * claim winnings. Requires SAS authorization. Weight(IP): 200 Security Type: PREDICTION_TRADE + * claim winnings. Requires SAS authorization. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param batchRedeemRequest (required) * @return ApiResponse<BatchRedeemResponse> @@ -354,7 +354,7 @@ private okhttp3.Call getRedeemStatusValidateBeforeCall( /** * Get Redeem Status (PREDICTION_TRADE) Query the on-chain transaction status of a previously - * submitted redeem request. Weight(IP): 200 Security Type: PREDICTION_TRADE Response Notes: - + * submitted redeem request. Weight(IP): 1 Security Type: PREDICTION_TRADE Response Notes: - * Status values: | Value | Description | | ----------- | * -------------------------------------------- | | `PENDING` | Transaction submitted, * awaiting confirmation | | `CONFIRMED` | Transaction confirmed on-chain | | diff --git a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/TradeApi.java b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/TradeApi.java index aa8d8c2f4..bf2d46eb6 100644 --- a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/TradeApi.java +++ b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/TradeApi.java @@ -53,7 +53,7 @@ public class TradeApi { private static final String USER_AGENT = String.format( - "binance-w3w-prediction/2.1.1 (Java/%s; %s; %s)", + "binance-w3w-prediction/2.1.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -222,7 +222,7 @@ private okhttp3.Call batchCancelOrdersValidateBeforeCall( * normalize URLs): - **Python:** use `http.client` (stdlib) and hand-build the body * string. - **Java:** use `HttpURLConnection` and write the raw body bytes directly. * - **Go:** use `strings.NewReader` with a hand-built body instead of - * `url.Values.Encode()`. Weight(IP): 200 Security Type: PREDICTION_TRADE Notes: - Use + * `url.Values.Encode()`. Weight(IP): 1 Security Type: PREDICTION_TRADE Notes: - Use * dot notation for nested list fields: `cancelInfoList[0].orderId`, * `cancelInfoList[1].orderId`, etc. - `vendor` does not need to be * supplied. The server automatically sets the correct vendor (`predict_fun`) for @@ -400,7 +400,7 @@ private okhttp3.Call getQuoteValidateBeforeCall(GetQuoteRequest getQuoteRequest) /** * Get Quote (PREDICTION_TRADE) Get a price quote for a prediction order. The returned - * `quoteId` must be used in the subsequent Place Order request. Weight(IP): 200 + * `quoteId` must be used in the subsequent Place Order request. Weight(IP): 1 * Security Type: PREDICTION_TRADE Response Notes: - `feeAmount` is a string because * it is denominated in wei (18 decimals) and may exceed JavaScript's safe integer range. * `feeDiscountBps` is also a string to allow fractional basis-point values in the @@ -578,8 +578,8 @@ private okhttp3.Call placeOrderValidateBeforeCall(PlaceOrderRequest placeOrderRe /** * Place Order (PREDICTION_TRADE) Place a prediction order using a previously obtained quote. - * Requires SAS authorization. Weight(IP): 200 Security Type: PREDICTION_TRADE Notes: - - * Validation rules: | orderType | timeInForce | priceLimit | | --------- | ------------- | + * Requires SAS authorization. Weight(IP): 1 Security Type: PREDICTION_TRADE Notes: - Validation + * rules: | orderType | timeInForce | priceLimit | | --------- | ------------- | * --------------------- | | `MARKET` | Must be `FOK` | Not required | | * `LIMIT` | Must be `GTC` | Required, must be > 0 | * @@ -774,7 +774,7 @@ private okhttp3.Call queryActiveOrdersValidateBeforeCall( /** * Query Active Orders (PREDICTION_TRADE) Get active (open) prediction orders for the - * authenticated user. Weight(IP): 200 Security Type: PREDICTION_TRADE + * authenticated user. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param walletAddress User's prediction wallet address (required) * @param tradeSide Filter by trade side. Enum: `BUY`, `SELL` (optional) @@ -1016,8 +1016,7 @@ private okhttp3.Call queryOrderHistoryValidateBeforeCall( /** * Query Order History (PREDICTION_TRADE) Get historical prediction orders (all statuses) for - * the authenticated user, with optional filters. Weight(IP): 200 Security Type: - * PREDICTION_TRADE + * the authenticated user, with optional filters. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param walletAddress User's prediction wallet address (required) * @param l1Category Filter by level-1 category (optional) diff --git a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/TransferApi.java b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/TransferApi.java index 8bb56c683..1481b389f 100644 --- a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/TransferApi.java +++ b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/TransferApi.java @@ -53,7 +53,7 @@ public class TransferApi { private static final String USER_AGENT = String.format( - "binance-w3w-prediction/2.1.1 (Java/%s; %s; %s)", + "binance-w3w-prediction/2.1.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -219,7 +219,7 @@ private okhttp3.Call applyMmDepositValidateBeforeCall( * Apply MM Deposit (PREDICTION_TRADE) Move funds from the user's bound CeDeFi MPC wallet to * their CEX account (SPOT/FUNDING) via a contract escrow + credit flow. The maker wallet is * resolved server-side by `userId`; the caller does not pass wallet or signature. - * Weight(IP): 200 Security Type: PREDICTION_TRADE Notes: - Restricted to authorized market + * Weight(IP): 1 Security Type: PREDICTION_TRADE Notes: - Restricted to authorized market * makers. Requests from unauthorized accounts are rejected — contact BD to request access. - * \"Note on `fromToken` / `toToken`: typically the same symbol (e.g. * both `USDT`). When they differ, the backend may attempt a swap, but cross-symbol @@ -382,7 +382,7 @@ private okhttp3.Call applyMmWithdrawValidateBeforeCall( * (SPOT/FUNDING) to their bound CeDeFi MPC wallet address. Unlike * `v1/capital/withdraw/apply`, the caller does NOT pass `address`; the * backend resolves the user's bound CeDeFi MPC wallet address by `userId` and - * reuses the existing capital withdraw flow with that address as the target. Weight(IP): 200 + * reuses the existing capital withdraw flow with that address as the target. Weight(IP): 1 * Security Type: PREDICTION_TRADE Notes: - Restricted to authorized market makers. Requests * from unauthorized accounts are rejected — contact BD to request access. - walletType * Validation: | Value | Behavior | | --------------- | ------------------------------- | | @@ -560,7 +560,7 @@ private okhttp3.Call createInboundTransferValidateBeforeCall( * Authorization Required:** This endpoint enforces SAS (Self-Authorization Service) * authorization. If SAS is not enabled for the wallet, the request will be rejected with * `-31003 SAS authorization required`. Enable SAS for your wallet before calling this - * endpoint. Weight(IP): 200 Security Type: PREDICTION_TRADE + * endpoint. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param createInboundTransferRequest (required) * @return ApiResponse<CreateInboundTransferResponse> @@ -730,7 +730,7 @@ private okhttp3.Call createOutboundTransferValidateBeforeCall( /** * Create Outbound Transfer (PREDICTION_TRADE) Transfer funds from the user's CEX account - * (SPOT or FUNDING) into the prediction wallet. Requires SAS authorization. Weight(IP): 200 + * (SPOT or FUNDING) into the prediction wallet. Requires SAS authorization. Weight(IP): 1 * Security Type: PREDICTION_TRADE * * @param createOutboundTransferRequest (required) @@ -945,7 +945,7 @@ private okhttp3.Call queryTransferListValidateBeforeCall( /** * Query Transfer List (PREDICTION_TRADE) Get the authenticated user's prediction wallet - * transfer history within a date range. Weight(IP): 200 Security Type: PREDICTION_TRADE + * transfer history within a date range. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param walletAddress User's prediction wallet address (required) * @param startDate Start date. Format: `yyyy-MM-dd`. Must be ≤ `endDate` @@ -1116,7 +1116,7 @@ private okhttp3.Call queryTransferStatusValidateBeforeCall(String transferId, Lo * transfer by transfer ID. **`status` values:** Terminal states are * `COMPLETED` and `FAILED`. Intermediate states are `PROCESSING` * and `PENDING`. **Do not** poll for `SUCCESS` — it is not a valid terminal - * state. Weight(IP): 200 Security Type: PREDICTION_TRADE + * state. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param transferId Transfer ID returned from outbound/inbound transfer (required) * @param recvWindow Request validity window in milliseconds (optional) diff --git a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/W3WPredictionRestApi.java b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/W3WPredictionRestApi.java index 501864ad8..543937de9 100644 --- a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/W3WPredictionRestApi.java +++ b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/W3WPredictionRestApi.java @@ -89,7 +89,7 @@ public W3WPredictionRestApi(ApiClient apiClient) { /** * Get Market Detail Get full details for a specific prediction market topic, including variant - * data and timeline. Weight(IP): 200 + * data and timeline. Weight(IP): 1 * * @param marketTopicId Market topic ID. Must be > 0 (required) * @return ApiResponse<GetMarketDetailResponse> @@ -113,7 +113,7 @@ public ApiResponse getMarketDetail(Long marketTopicId) /** * List Prediction Categories Get all available prediction market categories (L1 and L2). - * Weight(IP): 200 + * Weight(IP): 1 * * @return ApiResponse<ListPredictionCategoriesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -136,7 +136,7 @@ public ApiResponse listPredictionCategories() /** * List Prediction Markets Get a paginated list of prediction market topics, with optional - * category and sort filters. Weight(IP): 200 + * category and sort filters. Weight(IP): 1 * * @param l1Category Level-1 category filter (optional) * @param l2Category Level-2 category filter (optional) @@ -172,7 +172,7 @@ public ApiResponse listPredictionMarkets( } /** - * Market Search Semantic search for prediction market topics by keyword. Weight(IP): 200 + * Market Search Semantic search for prediction market topics by keyword. Weight(IP): 1 * * @param query Search keyword. Not blank (required) * @param topK Max number of results to return. Default `20`, range 1–50 (optional) @@ -196,8 +196,7 @@ public ApiResponse marketSearch(String query, Integer topK } /** - * Query Last Trade Price Get the most recent trade price for a prediction market. Weight(IP): - * 200 + * Query Last Trade Price Get the most recent trade price for a prediction market. Weight(IP): 1 * * @param marketId Market ID. Must be > 0 (required) * @return ApiResponse<QueryLastTradePriceResponse> @@ -221,7 +220,7 @@ public ApiResponse queryLastTradePrice(Long marketI /** * Query Order Book Get the current order book (bids and asks) for a specific prediction market - * outcome token. Weight(IP): 200 + * outcome token. Weight(IP): 1 * * @param vendor Vendor identifier (e.g. `predict_fun`) (required) * @param marketId Market ID. Must be > 0 (required) @@ -481,7 +480,7 @@ public ApiResponse removeOtcBlocktrades( /** * Get Position by Token (PREDICTION_TRADE) Get the authenticated user's position detail for - * a specific prediction token. Weight(IP): 200 Security Type: PREDICTION_TRADE + * a specific prediction token. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param walletAddress User's prediction wallet address (required) * @param tokenId Prediction outcome token ID (required) @@ -508,7 +507,7 @@ public ApiResponse getPositionByToken( /** * Query PnL (PREDICTION_TRADE) Query profit and loss records for the authenticated user's * prediction positions. When `tokenId` is provided, returns a single record in - * `pnl`; otherwise returns a list in `pnlList`. Weight(IP): 200 Security + * `pnl`; otherwise returns a list in `pnlList`. Weight(IP): 1 Security * Type: PREDICTION_TRADE * * @param walletAddress User's prediction wallet address (required) @@ -545,7 +544,7 @@ public ApiResponse queryPnL( /** * Query Positions (PREDICTION_TRADE) Get the authenticated user's prediction token - * positions with portfolio summary and tab-based filtering. Weight(IP): 200 Security Type: + * positions with portfolio summary and tab-based filtering. Weight(IP): 1 Security Type: * PREDICTION_TRADE * * @param walletAddress User's prediction wallet address (required) @@ -576,7 +575,7 @@ public ApiResponse queryPositions( /** * Query Positions by Filter (PREDICTION_TRADE) Get prediction positions filtered by wallet - * address and/or market topic ID. Both parameters are optional. Weight(IP): 200 Security Type: + * address and/or market topic ID. Both parameters are optional. Weight(IP): 1 Security Type: * PREDICTION_TRADE * * @param walletAddress User's prediction wallet address (optional) @@ -603,7 +602,7 @@ public ApiResponse queryPositionsByFilter( /** * Query Settled Position History (PREDICTION_TRADE) Get the authenticated user's settled - * (resolved) prediction position history with optional filters. Weight(IP): 200 Security Type: + * (resolved) prediction position history with optional filters. Weight(IP): 1 Security Type: * PREDICTION_TRADE * * @param walletAddress User's prediction wallet address (required) @@ -646,7 +645,7 @@ public ApiResponse querySettledPositionHist /** * Batch Redeem (PREDICTION_TRADE) Redeem one or more settled prediction tokens on-chain to - * claim winnings. Requires SAS authorization. Weight(IP): 200 Security Type: PREDICTION_TRADE + * claim winnings. Requires SAS authorization. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param batchRedeemRequest (required) * @return ApiResponse<BatchRedeemResponse> @@ -670,7 +669,7 @@ public ApiResponse batchRedeem(BatchRedeemRequest batchRede /** * Get Redeem Status (PREDICTION_TRADE) Query the on-chain transaction status of a previously - * submitted redeem request. Weight(IP): 200 Security Type: PREDICTION_TRADE Response Notes: - + * submitted redeem request. Weight(IP): 1 Security Type: PREDICTION_TRADE Response Notes: - * Status values: | Value | Description | | ----------- | * -------------------------------------------- | | `PENDING` | Transaction submitted, * awaiting confirmation | | `CONFIRMED` | Transaction confirmed on-chain | | @@ -713,7 +712,7 @@ public ApiResponse getRedeemStatus( * normalize URLs): - **Python:** use `http.client` (stdlib) and hand-build the body * string. - **Java:** use `HttpURLConnection` and write the raw body bytes directly. * - **Go:** use `strings.NewReader` with a hand-built body instead of - * `url.Values.Encode()`. Weight(IP): 200 Security Type: PREDICTION_TRADE Notes: - Use + * `url.Values.Encode()`. Weight(IP): 1 Security Type: PREDICTION_TRADE Notes: - Use * dot notation for nested list fields: `cancelInfoList[0].orderId`, * `cancelInfoList[1].orderId`, etc. - `vendor` does not need to be * supplied. The server automatically sets the correct vendor (`predict_fun`) for @@ -741,7 +740,7 @@ public ApiResponse batchCancelOrders( /** * Get Quote (PREDICTION_TRADE) Get a price quote for a prediction order. The returned - * `quoteId` must be used in the subsequent Place Order request. Weight(IP): 200 + * `quoteId` must be used in the subsequent Place Order request. Weight(IP): 1 * Security Type: PREDICTION_TRADE Response Notes: - `feeAmount` is a string because * it is denominated in wei (18 decimals) and may exceed JavaScript's safe integer range. * `feeDiscountBps` is also a string to allow fractional basis-point values in the @@ -774,8 +773,8 @@ public ApiResponse getQuote(GetQuoteRequest getQuoteRequest) /** * Place Order (PREDICTION_TRADE) Place a prediction order using a previously obtained quote. - * Requires SAS authorization. Weight(IP): 200 Security Type: PREDICTION_TRADE Notes: - - * Validation rules: | orderType | timeInForce | priceLimit | | --------- | ------------- | + * Requires SAS authorization. Weight(IP): 1 Security Type: PREDICTION_TRADE Notes: - Validation + * rules: | orderType | timeInForce | priceLimit | | --------- | ------------- | * --------------------- | | `MARKET` | Must be `FOK` | Not required | | * `LIMIT` | Must be `GTC` | Required, must be > 0 | * @@ -801,7 +800,7 @@ public ApiResponse placeOrder(PlaceOrderRequest placeOrderRe /** * Query Active Orders (PREDICTION_TRADE) Get active (open) prediction orders for the - * authenticated user. Weight(IP): 200 Security Type: PREDICTION_TRADE + * authenticated user. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param walletAddress User's prediction wallet address (required) * @param tradeSide Filter by trade side. Enum: `BUY`, `SELL` (optional) @@ -839,8 +838,7 @@ public ApiResponse queryActiveOrders( /** * Query Order History (PREDICTION_TRADE) Get historical prediction orders (all statuses) for - * the authenticated user, with optional filters. Weight(IP): 200 Security Type: - * PREDICTION_TRADE + * the authenticated user, with optional filters. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param walletAddress User's prediction wallet address (required) * @param l1Category Filter by level-1 category (optional) @@ -894,7 +892,7 @@ public ApiResponse queryOrderHistory( * Apply MM Deposit (PREDICTION_TRADE) Move funds from the user's bound CeDeFi MPC wallet to * their CEX account (SPOT/FUNDING) via a contract escrow + credit flow. The maker wallet is * resolved server-side by `userId`; the caller does not pass wallet or signature. - * Weight(IP): 200 Security Type: PREDICTION_TRADE Notes: - Restricted to authorized market + * Weight(IP): 1 Security Type: PREDICTION_TRADE Notes: - Restricted to authorized market * makers. Requests from unauthorized accounts are rejected — contact BD to request access. - * \"Note on `fromToken` / `toToken`: typically the same symbol (e.g. * both `USDT`). When they differ, the backend may attempt a swap, but cross-symbol @@ -925,7 +923,7 @@ public ApiResponse applyMmDeposit( * (SPOT/FUNDING) to their bound CeDeFi MPC wallet address. Unlike * `v1/capital/withdraw/apply`, the caller does NOT pass `address`; the * backend resolves the user's bound CeDeFi MPC wallet address by `userId` and - * reuses the existing capital withdraw flow with that address as the target. Weight(IP): 200 + * reuses the existing capital withdraw flow with that address as the target. Weight(IP): 1 * Security Type: PREDICTION_TRADE Notes: - Restricted to authorized market makers. Requests * from unauthorized accounts are rejected — contact BD to request access. - walletType * Validation: | Value | Behavior | | --------------- | ------------------------------- | | @@ -964,7 +962,7 @@ public ApiResponse applyMmWithdraw( * Authorization Required:** This endpoint enforces SAS (Self-Authorization Service) * authorization. If SAS is not enabled for the wallet, the request will be rejected with * `-31003 SAS authorization required`. Enable SAS for your wallet before calling this - * endpoint. Weight(IP): 200 Security Type: PREDICTION_TRADE + * endpoint. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param createInboundTransferRequest (required) * @return ApiResponse<CreateInboundTransferResponse> @@ -988,7 +986,7 @@ public ApiResponse createInboundTransfer( /** * Create Outbound Transfer (PREDICTION_TRADE) Transfer funds from the user's CEX account - * (SPOT or FUNDING) into the prediction wallet. Requires SAS authorization. Weight(IP): 200 + * (SPOT or FUNDING) into the prediction wallet. Requires SAS authorization. Weight(IP): 1 * Security Type: PREDICTION_TRADE * * @param createOutboundTransferRequest (required) @@ -1013,7 +1011,7 @@ public ApiResponse createOutboundTransfer( /** * Query Transfer List (PREDICTION_TRADE) Get the authenticated user's prediction wallet - * transfer history within a date range. Weight(IP): 200 Security Type: PREDICTION_TRADE + * transfer history within a date range. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param walletAddress User's prediction wallet address (required) * @param startDate Start date. Format: `yyyy-MM-dd`. Must be ≤ `endDate` @@ -1066,7 +1064,7 @@ public ApiResponse queryTransferList( * transfer by transfer ID. **`status` values:** Terminal states are * `COMPLETED` and `FAILED`. Intermediate states are `PROCESSING` * and `PENDING`. **Do not** poll for `SUCCESS` — it is not a valid terminal - * state. Weight(IP): 200 Security Type: PREDICTION_TRADE + * state. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param transferId Transfer ID returned from outbound/inbound transfer (required) * @param recvWindow Request validity window in milliseconds (optional) @@ -1092,7 +1090,7 @@ public ApiResponse queryTransferStatus( /** * Get Portfolio (PREDICTION_TRADE) Get the authenticated user's prediction portfolio * overview including active positions count, aggregated PnL, and full position list. - * Weight(IP): 200 Security Type: PREDICTION_TRADE + * Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param walletAddress User's prediction wallet address (required) * @param tokenId Filter by prediction token ID (optional) @@ -1128,8 +1126,7 @@ public ApiResponse getPortfolio( /** * Get Quota Status (PREDICTION_TRADE) Query the current user's daily trading quota limit - * and remaining allowance for prediction markets. Weight(IP): 200 Security Type: - * PREDICTION_TRADE + * and remaining allowance for prediction markets. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetQuotaStatusResponse> @@ -1152,7 +1149,7 @@ public ApiResponse getQuotaStatus(Long recvWindow) throw /** * List Prediction Wallets (PREDICTION_TRADE) Get all prediction wallets registered for the - * authenticated user. Weight(IP): 200 Security Type: PREDICTION_TRADE + * authenticated user. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<ListPredictionWalletsResponse> @@ -1176,8 +1173,7 @@ public ApiResponse listPredictionWallets(Long rec /** * Query Payment Option Balances (PREDICTION_TRADE) Get available balances for each payment - * option that can be used for prediction trading. Weight(IP): 200 Security Type: - * PREDICTION_TRADE + * option that can be used for prediction trading. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<QueryPaymentOptionBalancesResponse> diff --git a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/WalletApi.java b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/WalletApi.java index 314490799..554f74cde 100644 --- a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/WalletApi.java +++ b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/api/WalletApi.java @@ -45,7 +45,7 @@ public class WalletApi { private static final String USER_AGENT = String.format( - "binance-w3w-prediction/2.1.1 (Java/%s; %s; %s)", + "binance-w3w-prediction/2.1.2 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -244,7 +244,7 @@ private okhttp3.Call getPortfolioValidateBeforeCall( /** * Get Portfolio (PREDICTION_TRADE) Get the authenticated user's prediction portfolio * overview including active positions count, aggregated PnL, and full position list. - * Weight(IP): 200 Security Type: PREDICTION_TRADE + * Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param walletAddress User's prediction wallet address (required) * @param tokenId Filter by prediction token ID (optional) @@ -390,8 +390,7 @@ private okhttp3.Call getQuotaStatusValidateBeforeCall(Long recvWindow) throws Ap /** * Get Quota Status (PREDICTION_TRADE) Query the current user's daily trading quota limit - * and remaining allowance for prediction markets. Weight(IP): 200 Security Type: - * PREDICTION_TRADE + * and remaining allowance for prediction markets. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<GetQuotaStatusResponse> @@ -525,7 +524,7 @@ private okhttp3.Call listPredictionWalletsValidateBeforeCall(Long recvWindow) /** * List Prediction Wallets (PREDICTION_TRADE) Get all prediction wallets registered for the - * authenticated user. Weight(IP): 200 Security Type: PREDICTION_TRADE + * authenticated user. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<ListPredictionWalletsResponse> @@ -659,8 +658,7 @@ private okhttp3.Call queryPaymentOptionBalancesValidateBeforeCall(Long recvWindo /** * Query Payment Option Balances (PREDICTION_TRADE) Get available balances for each payment - * option that can be used for prediction trading. Weight(IP): 200 Security Type: - * PREDICTION_TRADE + * option that can be used for prediction trading. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @param recvWindow Request validity window in milliseconds (optional) * @return ApiResponse<QueryPaymentOptionBalancesResponse> diff --git a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/model/AccountType.java b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/model/AccountType.java index 2f2cd588c..a6549e057 100644 --- a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/model/AccountType.java +++ b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/model/AccountType.java @@ -21,7 +21,11 @@ import java.io.IOException; import org.hibernate.validator.constraints.*; -/** Payment account type. Enum: `SPOT`, `FUNDING` */ +/** + * Payment account type. Enum: `SPOT`, `FUNDING`. This only determines the + * settlement/reference account — it does not control which balance is debited. See + * `fundingSource` below for that. + */ @JsonAdapter(AccountType.Adapter.class) public enum AccountType { SPOT("SPOT"), diff --git a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/model/PlaceOrderRequest.java b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/model/PlaceOrderRequest.java index 83a624d7d..6d5d9568b 100644 --- a/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/model/PlaceOrderRequest.java +++ b/clients/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/model/PlaceOrderRequest.java @@ -105,7 +105,10 @@ public PlaceOrderRequest walletAddress(@jakarta.annotation.Nonnull String wallet } /** - * User's prediction wallet address + * User's prediction wallet address. Must be a valid address owned by the calling UID — a + * well-formed address not owned by the UID and a malformed (non-address) value both return the + * same generic `-3026`. An empty string instead returns `-1102` naming the + * field. * * @return walletAddress */ @@ -250,7 +253,9 @@ public PlaceOrderRequest priceLimit(@jakarta.annotation.Nullable String priceLim } /** - * Limit price. Required when `orderType=LIMIT`. Must be > 0 + * Limit price. Required when `orderType=LIMIT`, must be > 0. Omitting it when + * `orderType=LIMIT` returns a generic `-3026` (no field name in the + * message). * * @return priceLimit */ diff --git a/clients/wallet/CHANGELOG.md b/clients/wallet/CHANGELOG.md index be9fcf1c8..4ae8d4252 100644 --- a/clients/wallet/CHANGELOG.md +++ b/clients/wallet/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 6.2.1 - 2026-10-01 + +- Update parent pom to 1.1.4 + ## 6.2.0 - 2026-08-25 ### Added (1) diff --git a/clients/wallet/docs/CapitalApi.md b/clients/wallet/docs/CapitalApi.md index f15ef72f9..eb793443a 100644 --- a/clients/wallet/docs/CapitalApi.md +++ b/clients/wallet/docs/CapitalApi.md @@ -552,7 +552,7 @@ public class Example { CapitalApi apiInstance = new CapitalApi(defaultClient); String coin = "BTC"; // String | String withdrawOrderId = "1"; // String | client side id for withdrawal, if provided in POST `/sapi/v1/capital/withdraw/apply`, can be used here for query. - Long status = 0L; // Long | 0(0:Email Sent, 2:Awaiting Approval 3:Rejected 4:Processing 6:Completed) + Long status = 0L; // Long | 0(0: Email Sent, 2: Awaiting Approval 3: Rejected 4: Processing 6: Completed) Long offset = 0L; // Long | Default: 0 Long limit = 1000L; // Long | String idList = "idList_example"; // String | id list returned in the response of POST `/sapi/v1/capital/withdraw/apply`, separated by `,` @@ -579,7 +579,7 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **coin** | **String**| | [optional] | | **withdrawOrderId** | **String**| client side id for withdrawal, if provided in POST `/sapi/v1/capital/withdraw/apply`, can be used here for query. | [optional] | -| **status** | **Long**| 0(0:Email Sent, 2:Awaiting Approval 3:Rejected 4:Processing 6:Completed) | [optional] | +| **status** | **Long**| 0(0: Email Sent, 2: Awaiting Approval 3: Rejected 4: Processing 6: Completed) | [optional] | | **offset** | **Long**| Default: 0 | [optional] | | **limit** | **Long**| | [optional] | | **idList** | **String**| id list returned in the response of POST `/sapi/v1/capital/withdraw/apply`, separated by `,` | [optional] | diff --git a/clients/wallet/docs/GetCountryListResponseCountriesInner.md b/clients/wallet/docs/GetCountryListResponseCountriesInner.md index 12d4342fd..18d47793e 100644 --- a/clients/wallet/docs/GetCountryListResponseCountriesInner.md +++ b/clients/wallet/docs/GetCountryListResponseCountriesInner.md @@ -12,7 +12,7 @@ |**blockType** | **String** | `supported`, `limited`, or `blocked`. | [optional] | |**depositAllowed** | **Boolean** | Whether deposit is allowed for this country. | [optional] | |**withdrawalAllowed** | **Boolean** | Whether withdrawal is allowed for this country. | [optional] | -|**hasRegionRestrictions** | **Boolean** | Whether this country has region-level restrictions. | [optional] | +|**hasRegionRestrictions** | **Boolean** | Whether this country has region-level restrictions. Always `false` for the BR entity, which does not collect region/city. | [optional] | diff --git a/clients/wallet/docs/TravelRuleApi.md b/clients/wallet/docs/TravelRuleApi.md index 0e972be7a..7c459ea7c 100644 --- a/clients/wallet/docs/TravelRuleApi.md +++ b/clients/wallet/docs/TravelRuleApi.md @@ -172,7 +172,7 @@ public class Example { String tranId = "1"; // String | Comma(,) separated list of wallet tran Ids. String network = "network_example"; // String | String coin = "BTC"; // String | - Long travelRuleStatus = 0L; // Long | 0:Completed,1:Pending,2:Failed + Long travelRuleStatus = 0L; // Long | 0: Completed,1: Pending,2: Failed Boolean pendingQuestionnaire = true; // Boolean | true: Only return records that pending deposit questionnaire. false/not provided: return all records. Long startTime = 1623319461670L; // Long | Default: 90 days from current timestamp Long endTime = 1641782889000L; // Long | Default: present timestamp @@ -201,7 +201,7 @@ public class Example { | **tranId** | **String**| Comma(,) separated list of wallet tran Ids. | [optional] | | **network** | **String**| | [optional] | | **coin** | **String**| | [optional] | -| **travelRuleStatus** | **Long**| 0:Completed,1:Pending,2:Failed | [optional] | +| **travelRuleStatus** | **Long**| 0: Completed,1: Pending,2: Failed | [optional] | | **pendingQuestionnaire** | **Boolean**| true: Only return records that pending deposit questionnaire. false/not provided: return all records. | [optional] | | **startTime** | **Long**| Default: 90 days from current timestamp | [optional] | | **endTime** | **Long**| Default: present timestamp | [optional] | @@ -372,7 +372,7 @@ No authorization required Get Country List (USER_DATA) -Query the active country list for travel rule questionnaires. Currently, only supports AU entity. Weight(IP): 1 Security Type: USER_DATA +Query the active country list for travel rule questionnaires. Currently supports AU and BR entities. Weight(IP): 1 Security Type: USER_DATA ### Example ```java @@ -768,7 +768,7 @@ public class Example { String withdrawOrderId = "1"; // String | client side id for withdrawal, if provided in POST `/sapi/v1/capital/withdraw/apply`, can be used here for query. String network = "network_example"; // String | String coin = "BTC"; // String | - Long travelRuleStatus = 0L; // Long | 0:Completed,1:Pending,2:Failed + Long travelRuleStatus = 0L; // Long | 0: Completed,1: Pending,2: Failed Long offset = 0L; // Long | Long limit = 1000L; // Long | Long startTime = 1623319461670L; // Long | Default: 90 days from current timestamp @@ -797,7 +797,7 @@ public class Example { | **withdrawOrderId** | **String**| client side id for withdrawal, if provided in POST `/sapi/v1/capital/withdraw/apply`, can be used here for query. | [optional] | | **network** | **String**| | [optional] | | **coin** | **String**| | [optional] | -| **travelRuleStatus** | **Long**| 0:Completed,1:Pending,2:Failed | [optional] | +| **travelRuleStatus** | **Long**| 0: Completed,1: Pending,2: Failed | [optional] | | **offset** | **Long**| | [optional] | | **limit** | **Long**| | [optional] | | **startTime** | **Long**| Default: 90 days from current timestamp | [optional] | @@ -850,7 +850,7 @@ public class Example { String withdrawOrderId = "1"; // String | client side id for withdrawal, if provided in POST `/sapi/v1/capital/withdraw/apply`, can be used here for query. String network = "network_example"; // String | String coin = "coin_example"; // String | - Long travelRuleStatus = 0L; // Long | 0:Completed,1:Pending,2:Failed + Long travelRuleStatus = 0L; // Long | 0: Completed,1: Pending,2: Failed Long offset = 0L; // Long | Long limit = 1000L; // Long | Long startTime = 1623319461670L; // Long | Default: 90 days from current timestamp @@ -879,7 +879,7 @@ public class Example { | **withdrawOrderId** | **String**| client side id for withdrawal, if provided in POST `/sapi/v1/capital/withdraw/apply`, can be used here for query. | [optional] | | **network** | **String**| | [optional] | | **coin** | **String**| | [optional] | -| **travelRuleStatus** | **Long**| 0:Completed,1:Pending,2:Failed | [optional] | +| **travelRuleStatus** | **Long**| 0: Completed,1: Pending,2: Failed | [optional] | | **offset** | **Long**| | [optional] | | **limit** | **Long**| | [optional] | | **startTime** | **Long**| Default: 90 days from current timestamp | [optional] | diff --git a/clients/wallet/docs/rest-api/migration-guide.md b/clients/wallet/docs/rest-api/migration-guide.md index fa0856000..39f7b4a4b 100644 --- a/clients/wallet/docs/rest-api/migration-guide.md +++ b/clients/wallet/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-wallet - 6.2.0 + 6.2.1 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-wallet - 6.2.0 + 6.2.1 ``` diff --git a/clients/wallet/pom.xml b/clients/wallet/pom.xml index 648210188..2767028b6 100644 --- a/clients/wallet/pom.xml +++ b/clients/wallet/pom.xml @@ -5,13 +5,13 @@ 4.0.0 binance-wallet wallet - 6.2.0 + 6.2.1 jar io.github.binance binance-connector-java-clients - 1.1.3 + 1.1.4 @@ -31,7 +31,7 @@ io.github.binance binance-common - 2.5.1 + 2.5.3 \ No newline at end of file diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AccountApi.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AccountApi.java index 40077857b..b7eb959be 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AccountApi.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AccountApi.java @@ -50,7 +50,7 @@ public class AccountApi { private static final String USER_AGENT = String.format( - "binance-wallet/6.2.0 (Java/%s; %s; %s)", + "binance-wallet/6.2.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AssetApi.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AssetApi.java index f5db5642d..2603b0ed3 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AssetApi.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AssetApi.java @@ -73,7 +73,7 @@ public class AssetApi { private static final String USER_AGENT = String.format( - "binance-wallet/6.2.0 (Java/%s; %s; %s)", + "binance-wallet/6.2.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/CapitalApi.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/CapitalApi.java index cf95547ff..610828bd1 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/CapitalApi.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/CapitalApi.java @@ -55,7 +55,7 @@ public class CapitalApi { private static final String USER_AGENT = String.format( - "binance-wallet/6.2.0 (Java/%s; %s; %s)", + "binance-wallet/6.2.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -1396,7 +1396,7 @@ public ApiResponse withdraw(@Valid @NotNull WithdrawRequest wi * @param coin (optional) * @param withdrawOrderId client side id for withdrawal, if provided in POST * `/sapi/v1/capital/withdraw/apply`, can be used here for query. (optional) - * @param status 0(0:Email Sent, 2:Awaiting Approval 3:Rejected 4:Processing 6:Completed) + * @param status 0(0: Email Sent, 2: Awaiting Approval 3: Rejected 4: Processing 6: Completed) * (optional) * @param offset Default: 0 (optional) * @param limit (optional) @@ -1598,7 +1598,7 @@ private okhttp3.Call withdrawHistoryValidateBeforeCall( * @param coin (optional) * @param withdrawOrderId client side id for withdrawal, if provided in POST * `/sapi/v1/capital/withdraw/apply`, can be used here for query. (optional) - * @param status 0(0:Email Sent, 2:Awaiting Approval 3:Rejected 4:Processing 6:Completed) + * @param status 0(0: Email Sent, 2: Awaiting Approval 3: Rejected 4: Processing 6: Completed) * (optional) * @param offset Default: 0 (optional) * @param limit (optional) diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/OthersApi.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/OthersApi.java index b2e7f6427..3402e1b4d 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/OthersApi.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/OthersApi.java @@ -43,7 +43,7 @@ public class OthersApi { private static final String USER_AGENT = String.format( - "binance-wallet/6.2.0 (Java/%s; %s; %s)", + "binance-wallet/6.2.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/TravelRuleApi.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/TravelRuleApi.java index 72c862275..bfed1bf2f 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/TravelRuleApi.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/TravelRuleApi.java @@ -62,7 +62,7 @@ public class TravelRuleApi { private static final String USER_AGENT = String.format( - "binance-wallet/6.2.0 (Java/%s; %s; %s)", + "binance-wallet/6.2.1 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -454,7 +454,7 @@ public ApiResponse checkQuestionnaireReq * @param tranId Comma(,) separated list of wallet tran Ids. (optional) * @param network (optional) * @param coin (optional) - * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) + * @param travelRuleStatus 0: Completed,1: Pending,2: Failed (optional) * @param pendingQuestionnaire true: Only return records that pending deposit questionnaire. * false/not provided: return all records. (optional) * @param startTime Default: 90 days from current timestamp (optional) @@ -683,7 +683,7 @@ private okhttp3.Call depositHistoryTravelRuleValidateBeforeCall( * @param tranId Comma(,) separated list of wallet tran Ids. (optional) * @param network (optional) * @param coin (optional) - * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) + * @param travelRuleStatus 0: Completed,1: Pending,2: Failed (optional) * @param pendingQuestionnaire true: Only return records that pending deposit questionnaire. * false/not provided: return all records. (optional) * @param startTime Default: 90 days from current timestamp (optional) @@ -1242,7 +1242,7 @@ private okhttp3.Call getCountryListValidateBeforeCall(Long recvWindow) throws Ap /** * Get Country List (USER_DATA) Query the active country list for travel rule questionnaires. - * Currently, only supports AU entity. Weight(IP): 1 Security Type: USER_DATA + * Currently supports AU and BR entities. Weight(IP): 1 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetCountryListResponse> @@ -2081,7 +2081,7 @@ public ApiResponse vaspList(@Max(60000L) Long recvWindow) * `/sapi/v1/capital/withdraw/apply`, can be used here for query. (optional) * @param network (optional) * @param coin (optional) - * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) + * @param travelRuleStatus 0: Completed,1: Pending,2: Failed (optional) * @param offset (optional) * @param limit (optional) * @param startTime Default: 90 days from current timestamp (optional) @@ -2306,7 +2306,7 @@ private okhttp3.Call withdrawHistoryV1ValidateBeforeCall( * `/sapi/v1/capital/withdraw/apply`, can be used here for query. (optional) * @param network (optional) * @param coin (optional) - * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) + * @param travelRuleStatus 0: Completed,1: Pending,2: Failed (optional) * @param offset (optional) * @param limit (optional) * @param startTime Default: 90 days from current timestamp (optional) @@ -2366,7 +2366,7 @@ public ApiResponse withdrawHistoryV1( * `/sapi/v1/capital/withdraw/apply`, can be used here for query. (optional) * @param network (optional) * @param coin (optional) - * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) + * @param travelRuleStatus 0: Completed,1: Pending,2: Failed (optional) * @param offset (optional) * @param limit (optional) * @param startTime Default: 90 days from current timestamp (optional) @@ -2598,7 +2598,7 @@ private okhttp3.Call withdrawHistoryV2ValidateBeforeCall( * `/sapi/v1/capital/withdraw/apply`, can be used here for query. (optional) * @param network (optional) * @param coin (optional) - * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) + * @param travelRuleStatus 0: Completed,1: Pending,2: Failed (optional) * @param offset (optional) * @param limit (optional) * @param startTime Default: 90 days from current timestamp (optional) diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/WalletRestApi.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/WalletRestApi.java index 1d870f7cf..fdf262b10 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/WalletRestApi.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/WalletRestApi.java @@ -1057,7 +1057,7 @@ public ApiResponse withdraw(WithdrawRequest withdrawRequest) * @param coin (optional) * @param withdrawOrderId client side id for withdrawal, if provided in POST * `/sapi/v1/capital/withdraw/apply`, can be used here for query. (optional) - * @param status 0(0:Email Sent, 2:Awaiting Approval 3:Rejected 4:Processing 6:Completed) + * @param status 0(0: Email Sent, 2: Awaiting Approval 3: Rejected 4: Processing 6: Completed) * (optional) * @param offset Default: 0 (optional) * @param limit (optional) @@ -1243,7 +1243,7 @@ public ApiResponse checkQuestionnaireReq * @param tranId Comma(,) separated list of wallet tran Ids. (optional) * @param network (optional) * @param coin (optional) - * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) + * @param travelRuleStatus 0: Completed,1: Pending,2: Failed (optional) * @param pendingQuestionnaire true: Only return records that pending deposit questionnaire. * false/not provided: return all records. (optional) * @param startTime Default: 90 days from current timestamp (optional) @@ -1377,7 +1377,7 @@ public ApiResponse fetchAddressVerificatio /** * Get Country List (USER_DATA) Query the active country list for travel rule questionnaires. - * Currently, only supports AU entity. Weight(IP): 1 Security Type: USER_DATA + * Currently supports AU and BR entities. Weight(IP): 1 Security Type: USER_DATA * * @param recvWindow (optional) * @return ApiResponse<GetCountryListResponse> @@ -1581,7 +1581,7 @@ public ApiResponse vaspList(Long recvWindow) throws ApiExcepti * `/sapi/v1/capital/withdraw/apply`, can be used here for query. (optional) * @param network (optional) * @param coin (optional) - * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) + * @param travelRuleStatus 0: Completed,1: Pending,2: Failed (optional) * @param offset (optional) * @param limit (optional) * @param startTime Default: 90 days from current timestamp (optional) @@ -1648,7 +1648,7 @@ public ApiResponse withdrawHistoryV1( * `/sapi/v1/capital/withdraw/apply`, can be used here for query. (optional) * @param network (optional) * @param coin (optional) - * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) + * @param travelRuleStatus 0: Completed,1: Pending,2: Failed (optional) * @param offset (optional) * @param limit (optional) * @param startTime Default: 90 days from current timestamp (optional) diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCountryListResponseCountriesInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCountryListResponseCountriesInner.java index c04aca7ca..1f0ba7e2d 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCountryListResponseCountriesInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCountryListResponseCountriesInner.java @@ -181,7 +181,8 @@ public GetCountryListResponseCountriesInner hasRegionRestrictions( } /** - * Whether this country has region-level restrictions. + * Whether this country has region-level restrictions. Always `false` for the BR + * entity, which does not collect region/city. * * @return hasRegionRestrictions */ diff --git a/examples/algo/pom.xml b/examples/algo/pom.xml index 69fc662bb..cfd06292f 100644 --- a/examples/algo/pom.xml +++ b/examples/algo/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-algo - 2.1.0 + 2.1.1 \ No newline at end of file diff --git a/examples/alpha/pom.xml b/examples/alpha/pom.xml index 60b6db99e..955a6dc8d 100644 --- a/examples/alpha/pom.xml +++ b/examples/alpha/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-alpha - 2.0.0 + 2.0.1 \ No newline at end of file diff --git a/examples/c2c/pom.xml b/examples/c2c/pom.xml index 6c307b06f..22b8a04c3 100644 --- a/examples/c2c/pom.xml +++ b/examples/c2c/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-c2c - 4.0.0 + 4.0.1 \ No newline at end of file diff --git a/examples/convert/pom.xml b/examples/convert/pom.xml index 7e7ed3c29..b6bf34a56 100644 --- a/examples/convert/pom.xml +++ b/examples/convert/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-convert - 3.0.0 + 3.0.2 \ No newline at end of file diff --git a/examples/copy-trading/pom.xml b/examples/copy-trading/pom.xml index e556a4fdd..8fe4b136b 100644 --- a/examples/copy-trading/pom.xml +++ b/examples/copy-trading/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-copy-trading - 2.0.0 + 2.0.1 \ No newline at end of file diff --git a/examples/crypto-loan/pom.xml b/examples/crypto-loan/pom.xml index 91562041e..269b133b3 100644 --- a/examples/crypto-loan/pom.xml +++ b/examples/crypto-loan/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-crypto-loan - 5.0.0 + 5.0.2 \ No newline at end of file diff --git a/examples/derivatives-trading-coin-futures/pom.xml b/examples/derivatives-trading-coin-futures/pom.xml index 7b9272df6..9377137d4 100644 --- a/examples/derivatives-trading-coin-futures/pom.xml +++ b/examples/derivatives-trading-coin-futures/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-derivatives-trading-coin-futures - 9.0.0 + 9.0.1 \ No newline at end of file diff --git a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AccountTradeListExample.java b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AccountTradeListExample.java index b3d686709..4be6deec0 100644 --- a/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AccountTradeListExample.java +++ b/examples/derivatives-trading-coin-futures/src/main/java/com/binance/connector/client/derivatives_trading_coin_futures/rest/trade/AccountTradeListExample.java @@ -36,7 +36,7 @@ public DerivativesTradingCoinFuturesRestApi getApi() { * the pair will be returned - The parameter `fromId` cannot be sent with * `startTime` or `endTime` - If startTime and endTime are both not sent, * then the last 7 days' data will be returned. - The time between startTime and endTime - * cannot be longer than 7 days. + * cannot be longer than 7 days. - Only support querying trade in the past 3 months * * @throws ApiException if the Api call fails */ diff --git a/examples/derivatives-trading-options/pom.xml b/examples/derivatives-trading-options/pom.xml index 47313fae5..68fd66fbd 100644 --- a/examples/derivatives-trading-options/pom.xml +++ b/examples/derivatives-trading-options/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-derivatives-trading-options - 9.0.0 + 9.0.2 \ No newline at end of file diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/AccountTradeListExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/AccountTradeListExample.java index d473b7188..4df293f1c 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/AccountTradeListExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/rest/trade/AccountTradeListExample.java @@ -29,7 +29,9 @@ public DerivativesTradingOptionsRestApi getApi() { /** * Account Trade List (USER_DATA) * - *

Get trades for a specific account and symbol. Weight(IP): 5 Security Type: USER_DATA + *

Get trades for a specific account and symbol. Only supports querying trades in the past 3 + * months; a `startTime`/`endTime` outside that window returns `-6073 + * SEARCH_WINDOW_RESTRICTED`. Weight(IP): 5 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OpenInterestExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OpenInterestExample.java index cbd92182e..8986d113f 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OpenInterestExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OpenInterestExample.java @@ -25,8 +25,7 @@ public DerivativesTradingOptionsWebSocketStreams getApi() { * Open Interest * *

Option open interest for specific underlying asset on specific expiration date. - * E.g.[ethusdt@openInterest@221125](wss://fstream.binance.com/market/stream?streams=ethusdt@openInterest@221125) - * Update Speed: 60s + * E.g.ethusdt@openInterest@221125 Update Speed: 60s * * @throws ApiException if the Api call fails */ diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OptionMarkPriceExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OptionMarkPriceExample.java index 8af15bc79..8a21938e3 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OptionMarkPriceExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/market/OptionMarkPriceExample.java @@ -25,8 +25,7 @@ public DerivativesTradingOptionsWebSocketStreams getApi() { * Option Mark Price * *

The mark price for all option symbols on specific underlying asset. - * E.g.[btcusdt@optionMarkPrice](wss://fstream.binance.com/market/stream?streams=btcusdt@optionMarkPrice) - * Update Speed: 1000ms + * E.g.btcusdt@optionMarkPrice Update Speed: 1000ms * * @throws ApiException if the Api call fails */ diff --git a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/TradeStreamsExample.java b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/TradeStreamsExample.java index 46e180162..7badb0aa7 100644 --- a/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/TradeStreamsExample.java +++ b/examples/derivatives-trading-options/src/main/java/com/binance/connector/client/derivatives_trading_options/websocket/stream/publicpkg/TradeStreamsExample.java @@ -25,8 +25,7 @@ public DerivativesTradingOptionsWebSocketStreams getApi() { * Trade Streams * *

The Trade Streams push raw trade information for specific symbol or underlying asset. - * E.g.[btcusdt@optionTrade](wss://fstream.binance.com/public/stream?streams=btcusdt@optionTrade) - * Update Speed: 50ms + * E.g.btcusdt@optionTrade Update Speed: 50ms * * @throws ApiException if the Api call fails */ diff --git a/examples/derivatives-trading-portfolio-margin-pro/pom.xml b/examples/derivatives-trading-portfolio-margin-pro/pom.xml index 998499bc2..96e8702bb 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/pom.xml +++ b/examples/derivatives-trading-portfolio-margin-pro/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-derivatives-trading-portfolio-margin-pro - 8.0.0 + 8.0.2 \ No newline at end of file diff --git a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/SetMarginCallLevelExample.java b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/SetMarginCallLevelExample.java index 5fe60cd49..e41b20012 100644 --- a/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/SetMarginCallLevelExample.java +++ b/examples/derivatives-trading-portfolio-margin-pro/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin_pro/rest/account/SetMarginCallLevelExample.java @@ -31,8 +31,8 @@ public DerivativesTradingPortfolioMarginProRestApi getApi() { * Set Margin Call Level (USER_DATA) * *

Set the margin call level for a Portfolio Margin account. When the account's uniMMR - * drops to the specified level, a notification will be sent via email and SMS. Weight(IP): 1500 - * Security Type: USER_DATA + * drops to the specified level, a notification will be sent via email and push/inbox. + * Weight(IP): 1500 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ diff --git a/examples/derivatives-trading-portfolio-margin/pom.xml b/examples/derivatives-trading-portfolio-margin/pom.xml index 168e5f068..8bc070ae9 100644 --- a/examples/derivatives-trading-portfolio-margin/pom.xml +++ b/examples/derivatives-trading-portfolio-margin/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-derivatives-trading-portfolio-margin - 8.0.0 + 8.0.1 \ No newline at end of file diff --git a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersMarginForceOrdersExample.java b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersMarginForceOrdersExample.java index 2284c6b03..5055138c9 100644 --- a/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersMarginForceOrdersExample.java +++ b/examples/derivatives-trading-portfolio-margin/src/main/java/com/binance/connector/client/derivatives_trading_portfolio_margin/rest/trade/QueryUsersMarginForceOrdersExample.java @@ -30,12 +30,9 @@ public DerivativesTradingPortfolioMarginRestApi getApi() { * Query User's Margin Force Orders (USER_DATA) * *

Query user's margin force orders > **Note:** Portfolio Margin accounts liquidated - * through the [Risk-Based Liquidation - * Adjustment](https://www.binance.com/en/support/faq/detail/662268636eb44b71af55c6c6a597d481) - * flow will not have any order or trade records returned by this endpoint. Query the capital - * flow endpoint instead: [Query Cross Isolated Margin Capital - * Flow](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-isolated-margin-capital-flow). - * Weight(IP): 1 Security Type: USER_DATA + * through the Risk-Based Liquidation Adjustment flow will not have any order or trade records + * returned by this endpoint. Query the capital flow endpoint instead: Query Cross Isolated + * Margin Capital Flow. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ diff --git a/examples/derivatives-trading-usds-futures/pom.xml b/examples/derivatives-trading-usds-futures/pom.xml index cdf1989c6..674b76ba0 100644 --- a/examples/derivatives-trading-usds-futures/pom.xml +++ b/examples/derivatives-trading-usds-futures/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-derivatives-trading-usds-futures - 12.1.0 + 12.1.1 \ No newline at end of file diff --git a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesTradingQuantitativeRulesIndicatorsExample.java b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesTradingQuantitativeRulesIndicatorsExample.java index ca55654a0..e57fbe3b9 100644 --- a/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesTradingQuantitativeRulesIndicatorsExample.java +++ b/examples/derivatives-trading-usds-futures/src/main/java/com/binance/connector/client/derivatives_trading_usds_futures/rest/account/FuturesTradingQuantitativeRulesIndicatorsExample.java @@ -30,10 +30,8 @@ public DerivativesTradingUsdsFuturesRestApi getApi() { * Futures Trading Quantitative Rules Indicators (USER_DATA) * *

Futures trading quantitative rules indicators, for more information on this, please refer - * to the [Futures Trading Quantitative - * Rules](https://www.binance.com/en/support/faq/4f462ebe6ff445d4a170be7d9e897272) Weight: - - * **1** for a single symbol - **10** when the symbol parameter is omitted Security Type: - * USER_DATA + * to the Futures Trading Quantitative Rules Weight: - **1** for a single symbol - **10** when + * the symbol parameter is omitted Security Type: USER_DATA * * @throws ApiException if the Api call fails */ diff --git a/examples/dual-investment/pom.xml b/examples/dual-investment/pom.xml index 3e000d236..7ab8d2958 100644 --- a/examples/dual-investment/pom.xml +++ b/examples/dual-investment/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-dual-investment - 3.0.0 + 3.0.1 \ No newline at end of file diff --git a/examples/fiat/pom.xml b/examples/fiat/pom.xml index d2cdf2730..739f3af0c 100644 --- a/examples/fiat/pom.xml +++ b/examples/fiat/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-fiat - 3.0.1 + 3.0.2 \ No newline at end of file diff --git a/examples/gift-card/pom.xml b/examples/gift-card/pom.xml index 8d9bfb282..f40b51b44 100644 --- a/examples/gift-card/pom.xml +++ b/examples/gift-card/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-gift-card - 2.0.0 + 2.0.1 \ No newline at end of file diff --git a/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/CreateADualTokenGiftCardExample.java b/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/CreateADualTokenGiftCardExample.java index e0c288a12..1b4d22dd1 100644 --- a/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/CreateADualTokenGiftCardExample.java +++ b/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/CreateADualTokenGiftCardExample.java @@ -35,10 +35,10 @@ public GiftCardRestApi getApi() { * USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, * and will be redeemable to BTC equivalent to 100 USDT upon redemption. * Once successfully * created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee - * would be deducted from your funding wallet. * To get started with, please make sure: * You - * have a Binance account * You have passed KYB * You have a sufficient balance(Gift Card amount - * and fee amount) in your Binance funding wallet * You need Enable Withdrawals for the API Key - * which requests this endpoint. Weight(IP): 1 Security Type: TRADE + * would be deducted from your Spot wallet. * To get started with, please make sure: * You have + * a Binance account * You have passed KYB * You have a sufficient balance(Gift Card amount and + * fee amount) in your Binance Spot wallet * You need Enable Withdrawals for the API Key which + * requests this endpoint. Weight(IP): 1 Security Type: TRADE * * @throws ApiException if the Api call fails */ diff --git a/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/CreateASingleTokenGiftCardExample.java b/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/CreateASingleTokenGiftCardExample.java index faa545098..c2efc3fb8 100644 --- a/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/CreateASingleTokenGiftCardExample.java +++ b/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/CreateASingleTokenGiftCardExample.java @@ -31,8 +31,8 @@ public GiftCardRestApi getApi() { * *

This API is for creating a Binance Gift Card. To get started with, please make sure: * You * have a Binance account * You have passed KYB * You have a sufficient balance(Gift Card amount - * and fee amount) in your Binance funding wallet * You need `Enable Withdrawals` for - * the API Key which requests this endpoint. Weight(IP): 1 Security Type: USER_DATA + * and fee amount) in your Binance Spot wallet * You need `Enable Withdrawals` for the + * API Key which requests this endpoint. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ diff --git a/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/RedeemABinanceGiftCardExample.java b/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/RedeemABinanceGiftCardExample.java index 08a0cecd1..c531f98f5 100644 --- a/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/RedeemABinanceGiftCardExample.java +++ b/examples/gift-card/src/main/java/com/binance/connector/client/gift_card/rest/marketdata/RedeemABinanceGiftCardExample.java @@ -30,7 +30,7 @@ public GiftCardRestApi getApi() { * Redeem a Binance Gift Card (USER_DATA) * *

This API is for redeeming a Binance Gift Card. Once redeemed, the coins will be deposited - * in your funding wallet. Weight(IP): 1 Security Type: USER_DATA Notes: - Parameter + * in your Spot wallet. Weight(IP): 1 Security Type: USER_DATA Notes: - Parameter * `code` can be sent in two formats: `Plaintext` and `Encrypted`. * - Sending `code` in encrypted format is more secure than plaintext. - To send * encrypted `code`: - Fetch RSA public key from `GET diff --git a/examples/margin-trading/pom.xml b/examples/margin-trading/pom.xml index 505f4f213..3978544da 100644 --- a/examples/margin-trading/pom.xml +++ b/examples/margin-trading/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-margin-trading - 7.0.3 + 7.0.4 \ No newline at end of file diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/AdjustCrossMarginMaxLeverageExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/AdjustCrossMarginMaxLeverageExample.java index c1f463255..d7840c666 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/AdjustCrossMarginMaxLeverageExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/AdjustCrossMarginMaxLeverageExample.java @@ -34,8 +34,7 @@ public MarginTradingRestApi getApi() { * USER_DATA Notes: - The margin level need higher than the initial risk ratio of adjusted * leverage, the initial risk ratio of 3x is 1.5 , the initial risk ratio of 5x is 1.25; The * detail conditions on how to switch between Cross Margin Classic and Cross Margin Pro can - * refer to [the - * FAQ](https://www.binance.com/en/support/faq/how-to-activate-the-cross-margin-pro-mode-on-binance-e27786da05e743a694b8c625b3bc475d). + * refer to the FAQ. * * @throws ApiException if the Api call fails */ diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossIsolatedMarginCapitalFlowExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossIsolatedMarginCapitalFlowExample.java index 63de114dd..56ffaf600 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossIsolatedMarginCapitalFlowExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/account/QueryCrossIsolatedMarginCapitalFlowExample.java @@ -32,9 +32,14 @@ public MarginTradingRestApi getApi() { * *

Query Cross Isolated Margin Capital Flow Weight(IP): 100 Security Type: USER_DATA Notes: - * Only supports querying the data of the last 90 days - The time between startTime and endTime - * cannot be longer than 7 days. - If fromId is set, the data with id > fromId will be - * returned. Otherwise the latest data will be returned - To query isolated data, Symbol needs - * to be entered. + * cannot be longer than 7 days. - If both startTime and endTime are omitted, the most recent 7 + * days are queried (endTime defaults to the current time, and startTime to the current time + * minus 7 days). - If startTime is provided without endTime, endTime defaults to startTime plus + * 7 days. - If endTime is provided without startTime, startTime defaults to endTime minus 7 + * days. - If fromId is set, the data with id > fromId within the queried time range will be + * returned. Otherwise the latest data within that range will be returned. fromId does not + * extend the time range; to retrieve older records, move startTime and endTime backwards in + * windows of up to 7 days. - To query isolated data, Symbol needs to be entered. * * @throws ApiException if the Api call fails */ diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryMaxBorrowExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryMaxBorrowExample.java index 9ebb81f19..f3ecf42df 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryMaxBorrowExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/borrowrepay/QueryMaxBorrowExample.java @@ -31,7 +31,7 @@ public MarginTradingRestApi getApi() { * *

Query Max Borrow Weight(IP): 50 Security Type: USER_DATA Notes: - If isolatedSymbol is not * sent, crossed margin data will be sent. - `borrowLimit` is also available from - * [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee) + * https://www.binance.com/en/margin-fee * * @throws ApiException if the Api call fails */ diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/CreateSpecialKeyExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/CreateSpecialKeyExample.java index 6726e1d5a..8e8e61ec9 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/CreateSpecialKeyExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/CreateSpecialKeyExample.java @@ -30,8 +30,7 @@ public MarginTradingRestApi getApi() { /** * Create Special Key(Low-Latency Trading) (TRADE) * - *

**Eligibility** - Binance Margin offers low-latency trading through a [special - * key](https://www.binance.com/en/support/faq/frequently-asked-questions-on-margin-special-api-key-3208663e900d4d2e9fec4140e1832f4e), + *

**Eligibility** - Binance Margin offers low-latency trading through a special key, * available exclusively to users with VIP level 7 or higher. - If you are VIP level 6 or below, * please contact your VIP manager for eligibility criterias. - All new Margin Special Key users * are required to read, understand, and agree to the Margin Special Key Supplemental Product @@ -39,28 +38,24 @@ public MarginTradingRestApi getApi() { * master account level, the agreement applies to all sub-accounts. The master account and all * sub-accounts (Cross Margin Classic and Portfolio Margin Pro) are authorized to create a * Margin Special Key and are subject to the LiquidationLoan policy. For more information, - * please refer to - * [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e). - * **Supported Products:** - Cross Margin - Isolated Margin - Portfolio Margin Pro **Unsupported - * Products:** - Portfolio Margin We support several types of API keys: * Ed25519 (recommended) - * * HMAC * RSA We recommend to **use Ed25519 API keys** as it should provide the best - * performance and security out of all supported key types. We accept PKCS#8 (BEGIN PUBLIC KEY). - * For how to generate an RSA key pair to send API requests on Binance. Please refer to the - * document below - * [FAQ](https://www.binance.com/en/support/faq/how-to-generate-an-rsa-key-pair-to-send-api-requests-on-binance-2b79728f331e43079b27440d9d15c5db) - * . **How to use the Margin Special Key** - Use the below `sapi` endpoint to create - * your margin special API Key. - For accessing the Cross Margin account, do not send the - * `symbol` parameter. - For accessing the Isolated Margin account(s), pass the - * relevant `symbol` parameter in the API Key creation request. - Use the generated - * API Key (and Secret key, if applicable) to perform margin trading and listenKey generation - * via **Spot** REST API (`https://api.binance.com/api/v3/_*`) endpoints. Read [REST - * API](/products/spot/rest-api#signed-trade-and-user_data-endpoint-security) or [WebSocket - * API](/products/spot/web-socket-api#request-security) documentation to learn how to use - * different API keys You need to enable Permits “Enable Spot & Margin Trading” option for - * the API Key which requests this endpoint. Weight(UID): 1 Security Type: TRADE Response Notes: - * - Error Code Description - **UNSUPPORTED_OPERATION** : Portfolio Margin is an unsupported - * product, please change the account type to a supported margin product. - **Forbidden**: Cross - * Margin Pro accounts require additional agreements, please contact your relationship manager. + * please refer to FAQ. **Supported Products:** - Cross Margin - Isolated Margin - Portfolio + * Margin Pro **Unsupported Products:** - Portfolio Margin We support several types of API keys: + * * Ed25519 (recommended) * HMAC * RSA We recommend to **use Ed25519 API keys** as it should + * provide the best performance and security out of all supported key types. We accept PKCS#8 + * (BEGIN PUBLIC KEY). For how to generate an RSA key pair to send API requests on Binance. + * Please refer to the document below FAQ . **How to use the Margin Special Key** - Use the + * below `sapi` endpoint to create your margin special API Key. - For accessing the + * Cross Margin account, do not send the `symbol` parameter. - For accessing the + * Isolated Margin account(s), pass the relevant `symbol` parameter in the API Key + * creation request. - Use the generated API Key (and Secret key, if applicable) to perform + * margin trading and listenKey generation via **Spot** REST API + * (`https://api.binance.com/api/v3/_*`) endpoints. Read REST API or WebSocket API + * documentation to learn how to use different API keys You need to enable Permits “Enable Spot + * & Margin Trading” option for the API Key which requests this endpoint. Weight(UID): 1 + * Security Type: TRADE Response Notes: - Error Code Description - **UNSUPPORTED_OPERATION** : + * Portfolio Margin is an unsupported product, please change the account type to a supported + * margin product. - **Forbidden**: Cross Margin Pro accounts require additional agreements, + * please contact your relationship manager. * * @throws ApiException if the Api call fails */ diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/ExitSpecialKeyModeExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/ExitSpecialKeyModeExample.java index de758c98b..ce8067eb1 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/ExitSpecialKeyModeExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/ExitSpecialKeyModeExample.java @@ -38,14 +38,12 @@ public MarginTradingRestApi getApi() { * 2. All pre-execution margin checks (including Open-order-loss calculation) will revert to * standard mode. 3. A cooldown period (default: 24 hours) will be enforced, during which the * account will not be permitted to create new Margin Special API Keys. For more information, - * please refer to - * [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e). - * **Preconditions:** The following conditions must be met; otherwise the request will be - * rejected: - Account type must be **Cross Margin Classic**. - Account must currently be in - * **Special Key Mode**. If not, the request silently succeeds. - Account must **not be in - * liquidation**. - Account must **have no liability**. You need to enable \"Permits Enable - * Spot & Margin Trading\" option for the API Key which requests this endpoint. - * Weight(UID): 10 Security Type: TRADE + * please refer to FAQ. **Preconditions:** The following conditions must be met; otherwise the + * request will be rejected: - Account type must be **Cross Margin Classic**. - Account must + * currently be in **Special Key Mode**. If not, the request silently succeeds. - Account must + * **not be in liquidation**. - Account must **have no liability**. You need to enable + * \"Permits Enable Spot & Margin Trading\" option for the API Key which requests + * this endpoint. Weight(UID): 10 Security Type: TRADE * * @throws ApiException if the Api call fails */ diff --git a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOtocoExample.java b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOtocoExample.java index aefd82ca7..7834298a2 100644 --- a/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOtocoExample.java +++ b/examples/margin-trading/src/main/java/com/binance/connector/client/margin_trading/rest/trade/MarginAccountNewOtocoExample.java @@ -40,16 +40,14 @@ public MarginTradingRestApi getApi() { * on the order book. - The behavior of the working order is the same as the OTO. - OTOCO has 2 * pending orders (pending above and pending below), forming an OCO pair. The pending orders are * only placed on the order book when the working order gets **fully filled**. - The rules of - * the pending above and pending below follow the same rules as the [Order List - * OCO](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oco). - * - OTOCOs add **3 orders** against the unfilled order count, - * `EXCHANGE_MAX_NUM_ORDERS` filter, and `MAX_NUM_ORDERS` filter. Weight: - * 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY Security Type: - * TRADE Notes: - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid - * under high frequent new order/cancel order execution - Depending on the - * `pendingAboveType`/`pendingBelowType` or `workingType`, some - * optional parameters will become mandatory: | Type | Additional mandatory parameters | - * Additional information | | ------------------------------------ | + * the pending above and pending below follow the same rules as the Order List OCO. - OTOCOs add + * **3 orders** against the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` filter, + * and `MAX_NUM_ORDERS` filter. Weight: 6(UID) or 1500(UID) when sideEffectType is + * MARGIN_BUY or AUTO_BORROW_REPAY Security Type: TRADE Notes: - autoRepayAtCancel is suggested + * to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order + * execution - Depending on the `pendingAboveType`/`pendingBelowType` or + * `workingType`, some optional parameters will become mandatory: | Type | Additional + * mandatory parameters | Additional information | | ------------------------------------ | * ------------------------------------------------------------ | ---------------------- | | * `workingType` = `LIMIT` | `workingTimeInForce` | | | * `pendingAboveType`= `LIMIT_MAKER` | `pendingAbovePrice` | diff --git a/examples/mining/pom.xml b/examples/mining/pom.xml index b6d9fb3fc..b341b1626 100644 --- a/examples/mining/pom.xml +++ b/examples/mining/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-mining - 4.0.0 + 4.0.1 \ No newline at end of file diff --git a/examples/nft/pom.xml b/examples/nft/pom.xml deleted file mode 100644 index 21c2548f8..000000000 --- a/examples/nft/pom.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - 4.0.0 - binance-nft-examples - nft - 1.0.0 - jar - - - io.github.binance - binance-connector-java-examples - 1.0.0 - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - -parameters - - - - - - - - io.github.binance - binance-nft - 1.2.1 - - - \ No newline at end of file diff --git a/examples/nft/src/main/java/com/binance/connector/client/nft/rest/nft/GetNFTAssetExample.java b/examples/nft/src/main/java/com/binance/connector/client/nft/rest/nft/GetNFTAssetExample.java deleted file mode 100644 index ab6582ad9..000000000 --- a/examples/nft/src/main/java/com/binance/connector/client/nft/rest/nft/GetNFTAssetExample.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.binance.connector.client.nft.rest.nft; - -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.configuration.SignatureConfiguration; -import com.binance.connector.client.nft.rest.NftRestApiUtil; -import com.binance.connector.client.nft.rest.api.NftRestApi; -import com.binance.connector.client.nft.rest.model.GetNFTAssetResponse; - -/** API examples for NftApi */ -public class GetNFTAssetExample { - private NftRestApi api; - - public NftRestApi getApi() { - if (api == null) { - ClientConfiguration clientConfiguration = NftRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - api = new NftRestApi(clientConfiguration); - } - return api; - } - - /** - * Get NFT Asset(USER_DATA) - * - *

Get NFT Asset Weight: 3000 - * - * @throws ApiException if the Api call fails - */ - public void getNFTAssetExample() throws ApiException { - Long limit = 50L; - Long page = 1L; - Long recvWindow = 5000L; - ApiResponse response = getApi().getNFTAsset(limit, page, recvWindow); - System.out.println(response.getData()); - } -} diff --git a/examples/nft/src/main/java/com/binance/connector/client/nft/rest/nft/GetNFTDepositHistoryExample.java b/examples/nft/src/main/java/com/binance/connector/client/nft/rest/nft/GetNFTDepositHistoryExample.java deleted file mode 100644 index 0709e2437..000000000 --- a/examples/nft/src/main/java/com/binance/connector/client/nft/rest/nft/GetNFTDepositHistoryExample.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.binance.connector.client.nft.rest.nft; - -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.configuration.SignatureConfiguration; -import com.binance.connector.client.nft.rest.NftRestApiUtil; -import com.binance.connector.client.nft.rest.api.NftRestApi; -import com.binance.connector.client.nft.rest.model.GetNFTDepositHistoryResponse; - -/** API examples for NftApi */ -public class GetNFTDepositHistoryExample { - private NftRestApi api; - - public NftRestApi getApi() { - if (api == null) { - ClientConfiguration clientConfiguration = NftRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - api = new NftRestApi(clientConfiguration); - } - return api; - } - - /** - * Get NFT Deposit History(USER_DATA) - * - *

et NFT Deposit History * The max interval between startTime and endTime is 90 days. * If - * startTime and endTime are not sent, the recent 7 days' data will be returned. Weight: - * 3000 - * - * @throws ApiException if the Api call fails - */ - public void getNFTDepositHistoryExample() throws ApiException { - Long startTime = 1623319461670L; - Long endTime = 1641782889000L; - Long limit = 50L; - Long page = 1L; - Long recvWindow = 5000L; - ApiResponse response = - getApi().getNFTDepositHistory(startTime, endTime, limit, page, recvWindow); - System.out.println(response.getData()); - } -} diff --git a/examples/nft/src/main/java/com/binance/connector/client/nft/rest/nft/GetNFTTransactionHistoryExample.java b/examples/nft/src/main/java/com/binance/connector/client/nft/rest/nft/GetNFTTransactionHistoryExample.java deleted file mode 100644 index 53d57c50d..000000000 --- a/examples/nft/src/main/java/com/binance/connector/client/nft/rest/nft/GetNFTTransactionHistoryExample.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.binance.connector.client.nft.rest.nft; - -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.configuration.SignatureConfiguration; -import com.binance.connector.client.nft.rest.NftRestApiUtil; -import com.binance.connector.client.nft.rest.api.NftRestApi; -import com.binance.connector.client.nft.rest.model.GetNFTTransactionHistoryResponse; - -/** API examples for NftApi */ -public class GetNFTTransactionHistoryExample { - private NftRestApi api; - - public NftRestApi getApi() { - if (api == null) { - ClientConfiguration clientConfiguration = NftRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - api = new NftRestApi(clientConfiguration); - } - return api; - } - - /** - * Get NFT Transaction History(USER_DATA) - * - *

Get NFT Transaction History * The max interval between startTime and endTime is 90 days. * - * If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight: - * 3000 - * - * @throws ApiException if the Api call fails - */ - public void getNFTTransactionHistoryExample() throws ApiException { - Long orderType = 0L; - Long startTime = 1623319461670L; - Long endTime = 1641782889000L; - Long limit = 50L; - Long page = 1L; - Long recvWindow = 5000L; - ApiResponse response = - getApi().getNFTTransactionHistory( - orderType, startTime, endTime, limit, page, recvWindow); - System.out.println(response.getData()); - } -} diff --git a/examples/nft/src/main/java/com/binance/connector/client/nft/rest/nft/GetNFTWithdrawHistoryExample.java b/examples/nft/src/main/java/com/binance/connector/client/nft/rest/nft/GetNFTWithdrawHistoryExample.java deleted file mode 100644 index b54f77dbb..000000000 --- a/examples/nft/src/main/java/com/binance/connector/client/nft/rest/nft/GetNFTWithdrawHistoryExample.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.binance.connector.client.nft.rest.nft; - -import com.binance.connector.client.common.ApiException; -import com.binance.connector.client.common.ApiResponse; -import com.binance.connector.client.common.configuration.ClientConfiguration; -import com.binance.connector.client.common.configuration.SignatureConfiguration; -import com.binance.connector.client.nft.rest.NftRestApiUtil; -import com.binance.connector.client.nft.rest.api.NftRestApi; -import com.binance.connector.client.nft.rest.model.GetNFTWithdrawHistoryResponse; - -/** API examples for NftApi */ -public class GetNFTWithdrawHistoryExample { - private NftRestApi api; - - public NftRestApi getApi() { - if (api == null) { - ClientConfiguration clientConfiguration = NftRestApiUtil.getClientConfiguration(); - SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); - signatureConfiguration.setApiKey("apiKey"); - signatureConfiguration.setPrivateKey("path/to/private.key"); - clientConfiguration.setSignatureConfiguration(signatureConfiguration); - api = new NftRestApi(clientConfiguration); - } - return api; - } - - /** - * Get NFT Withdraw History(USER_DATA) - * - *

Get NFT Withdraw History * The max interval between startTime and endTime is 90 days. * If - * startTime and endTime are not sent, the recent 7 days' data will be returned. Weight: - * 3000 - * - * @throws ApiException if the Api call fails - */ - public void getNFTWithdrawHistoryExample() throws ApiException { - Long startTime = 1623319461670L; - Long endTime = 1641782889000L; - Long limit = 50L; - Long page = 1L; - Long recvWindow = 5000L; - ApiResponse response = - getApi().getNFTWithdrawHistory(startTime, endTime, limit, page, recvWindow); - System.out.println(response.getData()); - } -} diff --git a/examples/pay/pom.xml b/examples/pay/pom.xml index e1eb1196f..954ed8644 100644 --- a/examples/pay/pom.xml +++ b/examples/pay/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-pay - 5.0.0 + 5.0.1 \ No newline at end of file diff --git a/examples/pom.xml b/examples/pom.xml index d0fb1b07f..43665a826 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -31,7 +31,6 @@ gift-card margin-trading mining - nft pay rebate simple-earn diff --git a/examples/rebate/pom.xml b/examples/rebate/pom.xml index e878750e3..6945b6821 100644 --- a/examples/rebate/pom.xml +++ b/examples/rebate/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-rebate - 2.0.0 + 2.0.1 \ No newline at end of file diff --git a/examples/simple-earn/pom.xml b/examples/simple-earn/pom.xml index e3d2c6737..28ef8438e 100644 --- a/examples/simple-earn/pom.xml +++ b/examples/simple-earn/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-simple-earn - 7.0.1 + 7.0.2 \ No newline at end of file diff --git a/examples/spot/pom.xml b/examples/spot/pom.xml index 45a714a78..0cc3b9e22 100644 --- a/examples/spot/pom.xml +++ b/examples/spot/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-spot - 11.0.1 + 11.0.2 \ No newline at end of file diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AllOrdersExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AllOrdersExample.java index 2b8f09b74..e75824daf 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AllOrdersExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/AllOrdersExample.java @@ -34,7 +34,9 @@ public SpotRestApi getApi() { * some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is * not available at this time. - If `startTime` and/or `endTime` provided, * `orderId` is not required. - The time between `startTime` and - * `endTime` can't be longer than 24 hours. + * `endTime` can't be longer than 24 hours. Response Notes: **Note:** The payload + * above does not show all fields that can appear. Please refer to Conditional fields in Order + * Responses. * * @throws ApiException if the Api call fails */ diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOpenOrdersExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOpenOrdersExample.java index bd70b6e9c..81b62922c 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOpenOrdersExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOpenOrdersExample.java @@ -31,7 +31,8 @@ public SpotRestApi getApi() { *

Get all open orders on a symbol. **Careful** when accessing this with no symbol. Weight: 6 * for a single symbol; 80 when the symbol parameter is omitted Security Type: USER_DATA Notes: * **Data Source:** Memory => Database - If the symbol is not sent, orders for all - * symbols will be returned in an array. + * symbols will be returned in an array. Response Notes: **Note:** The payload above does not + * show all fields that can appear. Please refer to Conditional fields in Order Responses. * * @throws ApiException if the Api call fails */ diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOrderExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOrderExample.java index 434c32eb3..a1ccd4036 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOrderExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/account/GetOrderExample.java @@ -35,7 +35,8 @@ public SpotRestApi getApi() { * the `origClientOrderId` from that result is checked against that order. If both * conditions are not met the request will be rejected. - For some historical orders * `cummulativeQuoteQty` will be < 0, meaning the data is not available at this - * time. + * time. Response Notes: **Note:** The payload above does not show all fields that can appear. + * Please refer to Conditional fields in Order Responses. * * @throws ApiException if the Api call fails */ diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/PingExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/PingExample.java index a90f21122..a094b44da 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/PingExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/PingExample.java @@ -26,7 +26,8 @@ public SpotRestApi getApi() { /** * Test connectivity * - *

Test connectivity to the Rest API. Weight(IP): 1 Security Type: NONE + *

Test connectivity to the Rest API. Weight(IP): 1 Security Type: NONE Notes: **Data + * Source:** Memory * * @throws ApiException if the Api call fails */ diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/TimeExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/TimeExample.java index 1b1d2d65f..ee78494d9 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/TimeExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/general/TimeExample.java @@ -29,7 +29,7 @@ public SpotRestApi getApi() { * Check server time * *

Test connectivity to the Rest API and get the current server time. Weight(IP): 1 Security - * Type: NONE + * Type: NONE Notes: **Data Source:** Memory * * @throws ApiException if the Api call fails */ diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/HistoricalBlockTradesExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/HistoricalBlockTradesExample.java index fa60b233f..b1e57c2a3 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/HistoricalBlockTradesExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/HistoricalBlockTradesExample.java @@ -28,7 +28,8 @@ public SpotRestApi getApi() { /** * Historical Block Trades (MARKET_DATA) * - *

Get block trades. Weight(IP): 25 Security Type: MARKET_DATA Notes: - Data Source: Database + *

Get block trades. Weight(IP): 25 Security Type: MARKET_DATA Notes: **Data Source:** + * Database * * @throws ApiException if the Api call fails */ diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/ReferencePriceExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/ReferencePriceExample.java index 119aff5b8..8c35ed27f 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/ReferencePriceExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/market/ReferencePriceExample.java @@ -29,7 +29,9 @@ public SpotRestApi getApi() { * Query Reference Price * *

Query the reference price for a symbol. Weight(IP): 2 Security Type: NONE Notes: **Data - * Source:** Memory + * Source:** Memory If the symbol has never had a reference price set, the request is rejected + * with: ```json { \"code\": -2043, \"msg\": \"This + * symbol doesn't have a reference price.\" } ``` * * @throws ApiException if the Api call fails */ diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOrderExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOrderExample.java index 8921902e7..905a1a764 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOrderExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/DeleteOrderExample.java @@ -34,10 +34,17 @@ public SpotRestApi getApi() { * If both `orderId` and `origClientOrderId` are provided, the * `orderId` is searched first, then the `origClientOrderId` from that * result is checked against that order. If both conditions are not met the request will be - * rejected. - The performance for canceling an order (single cancel or as part of a - * cancel-replace) is always better when only `orderId` is sent. Sending - * `origClientOrderId` or both `orderId` + `origClientOrderId` - * will be slower. + * rejected. Response Notes: **Notes:** - The payload above does not show all fields that can + * appear in the order response. Please refer to Conditional fields in Order Responses. - The + * performance for canceling an order (single cancel or as part of a cancel-replace) is always + * better when only `orderId` is sent. Sending `origClientOrderId` or both + * `orderId` + `origClientOrderId` will be slower. **Regarding + * `cancelRestrictions`** * If the `cancelRestrictions` value is not any of + * the supported values, the error will be: ```json { \"code\": -1145, + * \"msg\": \"Invalid cancelRestrictions\" } ``` * If the + * order did not pass the conditions for `cancelRestrictions`, the error will be: + * ```json { \"code\": -2011, \"msg\": \"Order was not + * canceled due to cancel restrictions.\" } ``` * * @throws ApiException if the Api call fails */ diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderAmendKeepPriorityExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderAmendKeepPriorityExample.java index 2db3e6ca6..375fbc327 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderAmendKeepPriorityExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderAmendKeepPriorityExample.java @@ -32,7 +32,9 @@ public SpotRestApi getApi() { *

Reduce the quantity of an existing open order. This adds 0 orders to the * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read Order * Amend Keep Priority FAQ to learn more. Weight(IP): 4 Unfilled Order Count: 0 Security Type: - * TRADE Notes: **Data Source:** Matching Engine + * TRADE Notes: **Data Source:** Matching Engine Response Notes: **Note:** The payload above + * does not show all fields that can appear. Please refer to Conditional fields in Order + * Responses. * * @throws ApiException if the Api call fails */ @@ -40,7 +42,7 @@ public void orderAmendKeepPriorityExample() throws ApiException, IOException { OrderAmendKeepPriorityRequest orderAmendKeepPriorityRequest = new OrderAmendKeepPriorityRequest(); orderAmendKeepPriorityRequest.symbol("BNBUSDT"); - orderAmendKeepPriorityRequest.newQty(1d); + orderAmendKeepPriorityRequest.newQty(5d); ApiResponse response = getApi().orderAmendKeepPriority(orderAmendKeepPriorityRequest); System.out.println(response.getData()); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderCancelReplaceExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderCancelReplaceExample.java index 53e0912f2..4c2d7d08f 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderCancelReplaceExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderCancelReplaceExample.java @@ -138,10 +138,11 @@ public SpotRestApi getApi() { * </tr> <tr> <td>✅ <code>SUCCESS</code></td> <td>❌ * <code>FAILURE</code></td> <td * align=right><code>409</code></td> </tr> </tbody> - * </table> **Notes:** - The performance for canceling an order (single cancel or as part - * of a cancel-replace) is always better when only `orderId` is sent. Sending - * `origClientOrderId` or both `orderId` + `origClientOrderId` - * will be slower. + * </table> Response Notes: **Notes:** - The payload above does not show all fields that + * can appear. Please refer to Conditional fields in Order Responses. - The performance for + * canceling an order (single cancel or as part of a cancel-replace) is always better when only + * `orderId` is sent. Sending `origClientOrderId` or both + * `orderId` + `origClientOrderId` will be slower. * * @throws ApiException if the Api call fails */ diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpoExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpoExample.java index ce503a800..aa7816863 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpoExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpoExample.java @@ -33,10 +33,11 @@ public SpotRestApi getApi() { /** * New Order List - OPO (TRADE) * - *

Place an [OPO](/products/spot/faqs/opo). - OPOs add 2 orders to the - * `EXCHANGE_MAX_NUM_ORDERS`` filter and `MAX_NUM_ORDERS`` filter. - * Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** Matching - * Engine + *

Place an OPO. - OPOs add 2 orders to the `EXCHANGE_MAX_NUM_ORDERS`` filter + * and `MAX_NUM_ORDERS`` filter. Weight(IP): 1 Unfilled Order Count: 2 Security + * Type: TRADE Notes: **Data Source:** Matching Engine Response Notes: **Note:** The payload + * above does not show all fields that can appear. Please refer to Conditional fields in Order + * Responses. * * @throws ApiException if the Api call fails */ diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpocoExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpocoExample.java index 28870d14c..74264e1dc 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpocoExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOpocoExample.java @@ -33,8 +33,9 @@ public SpotRestApi getApi() { /** * New Order List - OPOCO (TRADE) * - *

Place an [OPOCO](/products/spot/faqs/opo). Weight(IP): 1 Unfilled Order Count: 3 Security - * Type: TRADE Notes: **Data Source:** Matching Engine + *

Place an OPOCO. Weight(IP): 1 Unfilled Order Count: 3 Security Type: TRADE Notes: **Data + * Source:** Matching Engine Response Notes: **Note:** The payload above does not show all + * fields that can appear. Please refer to Conditional fields in Order Responses. * * @throws ApiException if the Api call fails */ diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtoExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtoExample.java index 3339bc771..8b2a40bef 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtoExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtoExample.java @@ -56,7 +56,9 @@ public SpotRestApi getApi() { * |`pendingStopPrice` and/or `pendingTrailingDelta`| * |`pendingType` = `STOP_LOSS_LIMIT` or * `TAKE_PROFIT_LIMIT`|`pendingPrice`, `pendingStopPrice` and/or - * `pendingTrailingDelta`, `pendingTimeInForce`| + * `pendingTrailingDelta`, `pendingTimeInForce`| Response Notes: **Note:** + * The payload above does not show all fields that can appear. Please refer to Conditional + * fields in Order Responses. * * @throws ApiException if the Api call fails */ diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtocoExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtocoExample.java index 38f73ddc9..3078d7549 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtocoExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/OrderListOtocoExample.java @@ -36,21 +36,21 @@ public SpotRestApi getApi() { *

Place an OTOCO. - An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list comprised * of 3 orders. - The first order is called the **working order** and must be `LIMIT` * or `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The - * behavior of the working order is the same as the [OTO](#order-list-oto). - OTOCO has 2 - * pending orders (pending above and pending below), forming an OCO pair. The pending orders are - * only placed on the order book when the working order gets **fully filled**. - The rules of - * the pending above and pending below follow the same rules as the [Order list - * OCO](#order-list-oco). - OTOCOs add **3 orders** to the `EXCHANGE_MAX_NUM_ORDERS` - * filter and `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 3 Security - * Type: TRADE Notes: **Data Source:** Matching Engine **Mandatory parameters based on - * `pendingAboveType`, `pendingBelowType` or `workingType`** - * Depending on the `pendingAboveType`/`pendingBelowType` or - * `workingType`, some optional parameters will become mandatory. |Type |Additional - * mandatory parameters|Additional information| |---- |---- |------ |`workingType` - * = `LIMIT` |`workingTimeInForce` | - * |`pendingAboveType`= `LIMIT_MAKER` |`pendingAbovePrice` | - * |`pendingAboveType` = `STOP_LOSS/TAKE_PROFIT` - * |`pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`| + * behavior of the working order is the same as the OTO. - OTOCO has 2 pending orders (pending + * above and pending below), forming an OCO pair. The pending orders are only placed on the + * order book when the working order gets **fully filled**. - The rules of the pending above and + * pending below follow the same rules as the Order list OCO. - OTOCOs add **3 orders** to the + * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight(IP): + * 1 Unfilled Order Count: 3 Security Type: TRADE Notes: **Data Source:** Matching Engine + * **Mandatory parameters based on `pendingAboveType`, `pendingBelowType` or + * `workingType`** Depending on the + * `pendingAboveType`/`pendingBelowType` or `workingType`, some + * optional parameters will become mandatory. |Type |Additional mandatory parameters|Additional + * information| |---- |---- |------ |`workingType` = `LIMIT` + * |`workingTimeInForce` | |`pendingAboveType`= `LIMIT_MAKER` + * |`pendingAbovePrice` | |`pendingAboveType` = + * `STOP_LOSS/TAKE_PROFIT` |`pendingAboveStopPrice` and/or + * `pendingAboveTrailingDelta`| * |`pendingAboveType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT` * |`pendingAbovePrice`, `pendingAboveStopPrice` and/or * `pendingAboveTrailingDelta`, `pendingAboveTimeInForce`| @@ -59,7 +59,9 @@ public SpotRestApi getApi() { * and/or `pendingBelowTrailingDelta`| * |`pendingBelowType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT` * |`pendingBelowPrice`, `pendingBelowStopPrice` and/or - * `pendingBelowTrailingDelta`, `pendingBelowTimeInForce`| + * `pendingBelowTrailingDelta`, `pendingBelowTimeInForce`| Response Notes: + * **Note:** The payload above does not show all fields that can appear. Please refer to + * Conditional fields in Order Responses. * * @throws ApiException if the Api call fails */ diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/SorOrderExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/SorOrderExample.java index 15c3405d3..0825661b8 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/SorOrderExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/rest/trade/SorOrderExample.java @@ -32,11 +32,10 @@ public SpotRestApi getApi() { * New order using SOR (TRADE) * *

Places an order using smart order routing (SOR). This adds 1 order to the - * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read [SOR - * FAQ](/products/spot/faqs/sor_faq) to learn more. Weight(IP): 1 Unfilled Order Count: 1 - * Security Type: TRADE Notes: **Data Source:** Matching Engine **Note:** `POST - * /api/v3/sor/order` only supports `LIMIT` and `MARKET` orders. - * `quoteOrderQty` is not supported. + * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read SOR + * FAQ to learn more. Weight(IP): 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data + * Source:** Matching Engine **Note:** `POST /api/v3/sor/order` only supports + * `LIMIT` and `MARKET` orders. `quoteOrderQty` is not supported. * * @throws ApiException if the Api call fails */ diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyFiltersExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyFiltersExample.java index e082dc151..d3bd0f057 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyFiltersExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyFiltersExample.java @@ -31,9 +31,8 @@ public SpotWebSocketApi getApi() { /** * Query Relevant Filters (USER_DATA) * - *

Retrieves the list of [filters](/products/spot/filters) relevant to an account on a given - * symbol. This is the only method that shows if an account has - * [`MAX_ASSET`](/products/spot/filters#max_asset) filters applied to it. Weight(IP): + *

Retrieves the list of filters relevant to an account on a given symbol. This is the only + * method that shows if an account has `MAX_ASSET` filters applied to it. Weight(IP): * 40 Security Type: USER_DATA Notes: **Data Source:** Memory */ public void myFiltersExampleAsync() { @@ -53,9 +52,8 @@ public void myFiltersExampleAsync() { /** * Query Relevant Filters (USER_DATA) * - *

Retrieves the list of [filters](/products/spot/filters) relevant to an account on a given - * symbol. This is the only method that shows if an account has - * [`MAX_ASSET`](/products/spot/filters#max_asset) filters applied to it. Weight(IP): + *

Retrieves the list of filters relevant to an account on a given symbol. This is the only + * method that shows if an account has `MAX_ASSET` filters applied to it. Weight(IP): * 40 Security Type: USER_DATA Notes: **Data Source:** Memory */ public void myFiltersExampleSync() { diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyTradesExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyTradesExample.java index b9fe0acf7..915dd0ea2 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyTradesExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/MyTradesExample.java @@ -32,9 +32,9 @@ public SpotWebSocketApi getApi() { * Account trade history (USER_DATA) * *

Query information about all your trades, filtered by time range. Weight: Condition| - * Weight| ---| --- |Without orderId|20| |With orderId|5| Security Type: USER_DATA Notes: Data - * Source: Memory => Database Notes: - If `fromId` is specified, return trades - * with trade ID >= `fromId`. - If `startTime` and/or + * Weight| ---| --- |Without orderId|20| |With orderId|5| Security Type: USER_DATA Notes: **Data + * Source:** Memory => Database Notes: - If `fromId` is specified, return + * trades with trade ID >= `fromId`. - If `startTime` and/or * `endTime` are specified, trades are filtered by execution time (`time`). * - `fromId` cannot be used together with `startTime` and * `endTime`. - If `orderId` is specified, only trades related to that order @@ -61,9 +61,9 @@ public void myTradesExampleAsync() { * Account trade history (USER_DATA) * *

Query information about all your trades, filtered by time range. Weight: Condition| - * Weight| ---| --- |Without orderId|20| |With orderId|5| Security Type: USER_DATA Notes: Data - * Source: Memory => Database Notes: - If `fromId` is specified, return trades - * with trade ID >= `fromId`. - If `startTime` and/or + * Weight| ---| --- |Without orderId|20| |With orderId|5| Security Type: USER_DATA Notes: **Data + * Source:** Memory => Database Notes: - If `fromId` is specified, return + * trades with trade ID >= `fromId`. - If `startTime` and/or * `endTime` are specified, trades are filtered by execution time (`time`). * - `fromId` cannot be used together with `startTime` and * `endTime`. - If `orderId` is specified, only trades related to that order diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OpenOrdersStatusExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OpenOrdersStatusExample.java index 8be8e55a8..d9941be8b 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OpenOrdersStatusExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OpenOrdersStatusExample.java @@ -36,7 +36,9 @@ public SpotWebSocketApi getApi() { * `userDataStream.subscribe` if on an authenticated session * * `userDataStream.subscribe.signature` if subscribing through signature subscription * Weight: | Parameter | Weight | | --------- | ------ | | `symbol` | 6 | | none | 80 - * | Security Type: USER_DATA Notes: Data Source: Memory => Database + * | Security Type: USER_DATA Notes: **Data Source:** Memory => Database Response Notes: + * **Note:** The payload above does not show all fields that can appear. Please refer to + * Conditional fields in Order Responses. */ public void openOrdersStatusExampleAsync() { OpenOrdersStatusRequest openOrdersStatusRequest = new OpenOrdersStatusRequest(); @@ -60,7 +62,9 @@ public void openOrdersStatusExampleAsync() { * `userDataStream.subscribe` if on an authenticated session * * `userDataStream.subscribe.signature` if subscribing through signature subscription * Weight: | Parameter | Weight | | --------- | ------ | | `symbol` | 6 | | none | 80 - * | Security Type: USER_DATA Notes: Data Source: Memory => Database + * | Security Type: USER_DATA Notes: **Data Source:** Memory => Database Response Notes: + * **Note:** The payload above does not show all fields that can appear. Please refer to + * Conditional fields in Order Responses. */ public void openOrdersStatusExampleSync() { OpenOrdersStatusRequest openOrdersStatusRequest = new OpenOrdersStatusRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderStatusExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderStatusExample.java index f3df58ada..6cd50a66d 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderStatusExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/account/OrderStatusExample.java @@ -37,7 +37,8 @@ public SpotWebSocketApi getApi() { * the `origClientOrderId` from that result is checked against that order. If both * conditions are not met the request will be rejected. * For some historical orders the * `cummulativeQuoteQty` response field may be negative, meaning the data is not - * available at this time. + * available at this time. Response Notes: **Note:** The payload above does not show all fields + * that can appear. Please refer to Conditional fields in Order Responses. */ public void orderStatusExampleAsync() { OrderStatusRequest orderStatusRequest = new OrderStatusRequest(); @@ -62,7 +63,8 @@ public void orderStatusExampleAsync() { * the `origClientOrderId` from that result is checked against that order. If both * conditions are not met the request will be rejected. * For some historical orders the * `cummulativeQuoteQty` response field may be negative, meaning the data is not - * available at this time. + * available at this time. Response Notes: **Note:** The payload above does not show all fields + * that can appear. Please refer to Conditional fields in Order Responses. */ public void orderStatusExampleSync() { OrderStatusRequest orderStatusRequest = new OrderStatusRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/BlockTradesHistoricalExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/BlockTradesHistoricalExample.java index b681fcd7f..5b4b6cfc1 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/BlockTradesHistoricalExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/BlockTradesHistoricalExample.java @@ -31,7 +31,7 @@ public SpotWebSocketApi getApi() { /** * Historical Block Trades * - *

Get block trades. Weight(IP): 25 Security Type: NONE Notes: - Data Source: Database + *

Get block trades. Weight(IP): 25 Security Type: NONE Notes: **Data Source:** Database */ public void blockTradesHistoricalExampleAsync() { BlockTradesHistoricalRequest blockTradesHistoricalRequest = @@ -53,7 +53,7 @@ public void blockTradesHistoricalExampleAsync() { /** * Historical Block Trades * - *

Get block trades. Weight(IP): 25 Security Type: NONE Notes: - Data Source: Database + *

Get block trades. Weight(IP): 25 Security Type: NONE Notes: **Data Source:** Database */ public void blockTradesHistoricalExampleSync() { BlockTradesHistoricalRequest blockTradesHistoricalRequest = diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/DepthExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/DepthExample.java index 44f31efea..04baba761 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/DepthExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/DepthExample.java @@ -34,11 +34,10 @@ public SpotWebSocketApi getApi() { *

Get current order book. Note that this request returns limited market depth. If you need * to continuously monitor order book updates, please consider using WebSocket Streams: * * `<symbol>@depth<levels>` * `<symbol>@depth` You can use - * `depth` request together with `<symbol>@depth` streams to [maintain - * a local order - * book](/products/spot/web-socket-streams#how-to-manage-a-local-order-book-correctly). Weight: - * Adjusted based on the limit: |Limit|Request Weight ------|------- 1-100| 5 101-500| 25 - * 501-1000| 50 1001-5000| 250 Security Type: NONE Notes: **Data Source:** Memory + * `depth` request together with `<symbol>@depth` streams to maintain + * a local order book. Weight: Adjusted based on the limit: |Limit|Request Weight ------|------- + * 1-100| 5 101-500| 25 501-1000| 50 1001-5000| 250 Security Type: NONE Notes: **Data Source:** + * Memory */ public void depthExampleAsync() { DepthRequest depthRequest = new DepthRequest(); @@ -60,11 +59,10 @@ public void depthExampleAsync() { *

Get current order book. Note that this request returns limited market depth. If you need * to continuously monitor order book updates, please consider using WebSocket Streams: * * `<symbol>@depth<levels>` * `<symbol>@depth` You can use - * `depth` request together with `<symbol>@depth` streams to [maintain - * a local order - * book](/products/spot/web-socket-streams#how-to-manage-a-local-order-book-correctly). Weight: - * Adjusted based on the limit: |Limit|Request Weight ------|------- 1-100| 5 101-500| 25 - * 501-1000| 50 1001-5000| 250 Security Type: NONE Notes: **Data Source:** Memory + * `depth` request together with `<symbol>@depth` streams to maintain + * a local order book. Weight: Adjusted based on the limit: |Limit|Request Weight ------|------- + * 1-100| 5 101-500| 25 501-1000| 50 1001-5000| 250 Security Type: NONE Notes: **Data Source:** + * Memory */ public void depthExampleSync() { DepthRequest depthRequest = new DepthRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/KlinesExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/KlinesExample.java index 0b5612ded..4f72a79ee 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/KlinesExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/KlinesExample.java @@ -35,19 +35,19 @@ public SpotWebSocketApi getApi() { *

Get klines (candlestick bars). Klines are uniquely identified by their open & close * time. If you need access to real-time kline updates, please consider using WebSocket Streams: * * `<symbol>@kline_<interval>` If you need historical kline data, please - * consider using [data.binance.vision](https://github.com/binance/binance-public-data/#klines). - * Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Database Supported kline intervals - * (case-sensitive): Interval | `interval` value --------- | ---------------- seconds - * | `1s` minutes | `1m`, `3m`, `5m`, `15m`, - * `30m` hours | `1h`, `2h`, `4h`, `6h`, - * `8h`, `12h` days | `1d`, `3d` weeks | `1w` - * months | `1M` **Notes:** * If `startTime` and `endTime` are not - * sent, the most recent klines are returned. * Supported values for `timeZone`: * - * Hours and minutes (e.g. `-1:00`, `05:45`) * Only hours (e.g. - * `0`, `8`, `4`) * Accepted range is strictly [-12:00 to +14:00] - * inclusive * If `timeZone` provided, kline intervals are interpreted in that - * timezone instead of UTC. * Note that `startTime` and `endTime` are always - * interpreted in UTC, regardless of `timeZone`. + * consider using data.binance.vision. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** + * Database Supported kline intervals (case-sensitive): Interval | `interval` value + * --------- | ---------------- seconds | `1s` minutes | `1m`, + * `3m`, `5m`, `15m`, `30m` hours | `1h`, + * `2h`, `4h`, `6h`, `8h`, `12h` days | + * `1d`, `3d` weeks | `1w` months | `1M` **Notes:** * If + * `startTime` and `endTime` are not sent, the most recent klines are + * returned. * Supported values for `timeZone`: * Hours and minutes (e.g. + * `-1:00`, `05:45`) * Only hours (e.g. `0`, `8`, + * `4`) * Accepted range is strictly [-12:00 to +14:00] inclusive * If + * `timeZone` provided, kline intervals are interpreted in that timezone instead of + * UTC. * Note that `startTime` and `endTime` are always interpreted in UTC, + * regardless of `timeZone`. */ public void klinesExampleAsync() { KlinesRequest klinesRequest = new KlinesRequest(); @@ -70,19 +70,19 @@ public void klinesExampleAsync() { *

Get klines (candlestick bars). Klines are uniquely identified by their open & close * time. If you need access to real-time kline updates, please consider using WebSocket Streams: * * `<symbol>@kline_<interval>` If you need historical kline data, please - * consider using [data.binance.vision](https://github.com/binance/binance-public-data/#klines). - * Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Database Supported kline intervals - * (case-sensitive): Interval | `interval` value --------- | ---------------- seconds - * | `1s` minutes | `1m`, `3m`, `5m`, `15m`, - * `30m` hours | `1h`, `2h`, `4h`, `6h`, - * `8h`, `12h` days | `1d`, `3d` weeks | `1w` - * months | `1M` **Notes:** * If `startTime` and `endTime` are not - * sent, the most recent klines are returned. * Supported values for `timeZone`: * - * Hours and minutes (e.g. `-1:00`, `05:45`) * Only hours (e.g. - * `0`, `8`, `4`) * Accepted range is strictly [-12:00 to +14:00] - * inclusive * If `timeZone` provided, kline intervals are interpreted in that - * timezone instead of UTC. * Note that `startTime` and `endTime` are always - * interpreted in UTC, regardless of `timeZone`. + * consider using data.binance.vision. Weight(IP): 2 Security Type: NONE Notes: **Data Source:** + * Database Supported kline intervals (case-sensitive): Interval | `interval` value + * --------- | ---------------- seconds | `1s` minutes | `1m`, + * `3m`, `5m`, `15m`, `30m` hours | `1h`, + * `2h`, `4h`, `6h`, `8h`, `12h` days | + * `1d`, `3d` weeks | `1w` months | `1M` **Notes:** * If + * `startTime` and `endTime` are not sent, the most recent klines are + * returned. * Supported values for `timeZone`: * Hours and minutes (e.g. + * `-1:00`, `05:45`) * Only hours (e.g. `0`, `8`, + * `4`) * Accepted range is strictly [-12:00 to +14:00] inclusive * If + * `timeZone` provided, kline intervals are interpreted in that timezone instead of + * UTC. * Note that `startTime` and `endTime` are always interpreted in UTC, + * regardless of `timeZone`. */ public void klinesExampleSync() { KlinesRequest klinesRequest = new KlinesRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/ReferencePriceExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/ReferencePriceExample.java index 21c847798..814ef434d 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/ReferencePriceExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/ReferencePriceExample.java @@ -31,7 +31,10 @@ public SpotWebSocketApi getApi() { /** * Query Reference Price * - *

Query Reference Price Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory + *

Query Reference Price Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory If + * the symbol has never had a reference price set, the request is rejected with: + * ```json { \"code\": -2043, \"msg\": \"This symbol + * doesn't have a reference price.\" } ``` */ public void referencePriceExampleAsync() { ReferencePriceRequest referencePriceRequest = new ReferencePriceRequest(); @@ -51,7 +54,10 @@ public void referencePriceExampleAsync() { /** * Query Reference Price * - *

Query Reference Price Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory + *

Query Reference Price Weight(IP): 2 Security Type: NONE Notes: **Data Source:** Memory If + * the symbol has never had a reference price set, the request is rejected with: + * ```json { \"code\": -2043, \"msg\": \"This symbol + * doesn't have a reference price.\" } ``` */ public void referencePriceExampleSync() { ReferencePriceRequest referencePriceRequest = new ReferencePriceRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesAggregateExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesAggregateExample.java index 49081becf..5a427e21f 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesAggregateExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/market/TradesAggregateExample.java @@ -36,15 +36,13 @@ public SpotWebSocketApi getApi() { * those trades are collected into an aggregate trade with total quantity of the individual * trades. If you need access to real-time trading activity, please consider using WebSocket * Streams: * `<symbol>@aggTrade` If you need historical aggregate trade data, - * please consider using - * [data.binance.vision](https://github.com/binance/binance-public-data/#aggtrades). Weight(IP): - * 4 Security Type: NONE Notes: **Data Source:** Database - If `fromId` is specified, - * return aggtrades with aggregate trade ID >= `fromId`. Use - * `fromId` and `limit` to page through all aggtrades. - If - * `startTime` and/or `endTime` are specified, aggtrades are filtered by - * execution time (`T`). `fromId` cannot be used together with - * `startTime` and `endTime`. - If no condition is specified, the most - * recent aggregate trades are returned. + * please consider using data.binance.vision. Weight(IP): 4 Security Type: NONE Notes: **Data + * Source:** Database - If `fromId` is specified, return aggtrades with aggregate + * trade ID >= `fromId`. Use `fromId` and `limit` to page + * through all aggtrades. - If `startTime` and/or `endTime` are specified, + * aggtrades are filtered by execution time (`T`). `fromId` cannot be used + * together with `startTime` and `endTime`. - If no condition is specified, + * the most recent aggregate trades are returned. */ public void tradesAggregateExampleAsync() { TradesAggregateRequest tradesAggregateRequest = new TradesAggregateRequest(); @@ -69,15 +67,13 @@ public void tradesAggregateExampleAsync() { * those trades are collected into an aggregate trade with total quantity of the individual * trades. If you need access to real-time trading activity, please consider using WebSocket * Streams: * `<symbol>@aggTrade` If you need historical aggregate trade data, - * please consider using - * [data.binance.vision](https://github.com/binance/binance-public-data/#aggtrades). Weight(IP): - * 4 Security Type: NONE Notes: **Data Source:** Database - If `fromId` is specified, - * return aggtrades with aggregate trade ID >= `fromId`. Use - * `fromId` and `limit` to page through all aggtrades. - If - * `startTime` and/or `endTime` are specified, aggtrades are filtered by - * execution time (`T`). `fromId` cannot be used together with - * `startTime` and `endTime`. - If no condition is specified, the most - * recent aggregate trades are returned. + * please consider using data.binance.vision. Weight(IP): 4 Security Type: NONE Notes: **Data + * Source:** Database - If `fromId` is specified, return aggtrades with aggregate + * trade ID >= `fromId`. Use `fromId` and `limit` to page + * through all aggtrades. - If `startTime` and/or `endTime` are specified, + * aggtrades are filtered by execution time (`T`). `fromId` cannot be used + * together with `startTime` and `endTime`. - If no condition is specified, + * the most recent aggregate trades are returned. */ public void tradesAggregateExampleSync() { TradesAggregateRequest tradesAggregateRequest = new TradesAggregateRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OpenOrdersCancelAllExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OpenOrdersCancelAllExample.java index b959f9c29..4f42f56fc 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OpenOrdersCancelAllExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OpenOrdersCancelAllExample.java @@ -32,7 +32,9 @@ public SpotWebSocketApi getApi() { * Cancel open orders (TRADE) * *

Cancel all open orders on a symbol. This includes orders that are part of an order list. - * Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** Matching Engine + * Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** Matching Engine Response Notes: + * **Note:** The payload above does not show all fields that can appear. Please refer to + * Conditional fields in Order Responses. */ public void openOrdersCancelAllExampleAsync() { OpenOrdersCancelAllRequest openOrdersCancelAllRequest = new OpenOrdersCancelAllRequest(); @@ -53,7 +55,9 @@ public void openOrdersCancelAllExampleAsync() { * Cancel open orders (TRADE) * *

Cancel all open orders on a symbol. This includes orders that are part of an order list. - * Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** Matching Engine + * Weight(IP): 1 Security Type: TRADE Notes: **Data Source:** Matching Engine Response Notes: + * **Note:** The payload above does not show all fields that can appear. Please refer to + * Conditional fields in Order Responses. */ public void openOrdersCancelAllExampleSync() { OpenOrdersCancelAllRequest openOrdersCancelAllRequest = new OpenOrdersCancelAllRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderAmendKeepPriorityExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderAmendKeepPriorityExample.java index 92f050127..788a595d0 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderAmendKeepPriorityExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderAmendKeepPriorityExample.java @@ -32,16 +32,17 @@ public SpotWebSocketApi getApi() { * Order Amend Keep Priority (TRADE) * *

Reduce the quantity of an existing open order. This adds 0 orders to the - * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read [Order - * Amend Keep Priority FAQ](/products/spot/faqs/order_amend_keep_priority) to learn more. - * Weight(IP): 4 Unfilled Order Count: 0 Security Type: TRADE Notes: **Data Source:** Matching - * Engine + * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read Order + * Amend Keep Priority FAQ to learn more. Weight(IP): 4 Unfilled Order Count: 0 Security Type: + * TRADE Notes: **Data Source:** Matching Engine Response Notes: **Note:** The payload above + * does not show all fields that can appear. Please refer to Conditional fields in Order + * Responses. */ public void orderAmendKeepPriorityExampleAsync() { OrderAmendKeepPriorityRequest orderAmendKeepPriorityRequest = new OrderAmendKeepPriorityRequest(); orderAmendKeepPriorityRequest.symbol("BNBUSDT"); - orderAmendKeepPriorityRequest.newQty(1d); + orderAmendKeepPriorityRequest.newQty(5d); CompletableFuture future = getApi().orderAmendKeepPriority(orderAmendKeepPriorityRequest); future.handle( @@ -58,16 +59,17 @@ public void orderAmendKeepPriorityExampleAsync() { * Order Amend Keep Priority (TRADE) * *

Reduce the quantity of an existing open order. This adds 0 orders to the - * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read [Order - * Amend Keep Priority FAQ](/products/spot/faqs/order_amend_keep_priority) to learn more. - * Weight(IP): 4 Unfilled Order Count: 0 Security Type: TRADE Notes: **Data Source:** Matching - * Engine + * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read Order + * Amend Keep Priority FAQ to learn more. Weight(IP): 4 Unfilled Order Count: 0 Security Type: + * TRADE Notes: **Data Source:** Matching Engine Response Notes: **Note:** The payload above + * does not show all fields that can appear. Please refer to Conditional fields in Order + * Responses. */ public void orderAmendKeepPriorityExampleSync() { OrderAmendKeepPriorityRequest orderAmendKeepPriorityRequest = new OrderAmendKeepPriorityRequest(); orderAmendKeepPriorityRequest.symbol("BNBUSDT"); - orderAmendKeepPriorityRequest.newQty(1d); + orderAmendKeepPriorityRequest.newQty(5d); CompletableFuture future = getApi().orderAmendKeepPriority(orderAmendKeepPriorityRequest); OrderAmendKeepPriorityResponse response = future.join(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelExample.java index 4af8c0f14..63a53b99a 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelExample.java @@ -40,7 +40,15 @@ public SpotWebSocketApi getApi() { * you cancel an order that is a part of an order list, the entire order list is canceled. * The * performance for canceling an order (single cancel or as part of a cancel-replace) is always * better when only `orderId` is sent. Sending `origClientOrderId` or both - * `orderId` + `origClientOrderId` will be slower. + * `orderId` + `origClientOrderId` will be slower. Response Notes: **Note:** + * The payload above does not show all fields that can appear. Please refer to Conditional + * fields in Order Responses. **Regarding `cancelRestrictions`** * If the + * `cancelRestrictions` value is not any of the supported values, the error will be: + * ```json { \"code\": -1145, \"msg\": \"Invalid + * cancelRestrictions\" } ``` * If the order did not pass the conditions for + * `cancelRestrictions`, the error will be: ```json { + * \"code\": -2011, \"msg\": \"Order was not canceled due to cancel + * restrictions.\" } ``` */ public void orderCancelExampleAsync() { OrderCancelRequest orderCancelRequest = new OrderCancelRequest(); @@ -68,7 +76,15 @@ public void orderCancelExampleAsync() { * you cancel an order that is a part of an order list, the entire order list is canceled. * The * performance for canceling an order (single cancel or as part of a cancel-replace) is always * better when only `orderId` is sent. Sending `origClientOrderId` or both - * `orderId` + `origClientOrderId` will be slower. + * `orderId` + `origClientOrderId` will be slower. Response Notes: **Note:** + * The payload above does not show all fields that can appear. Please refer to Conditional + * fields in Order Responses. **Regarding `cancelRestrictions`** * If the + * `cancelRestrictions` value is not any of the supported values, the error will be: + * ```json { \"code\": -1145, \"msg\": \"Invalid + * cancelRestrictions\" } ``` * If the order did not pass the conditions for + * `cancelRestrictions`, the error will be: ```json { + * \"code\": -2011, \"msg\": \"Order was not canceled due to cancel + * restrictions.\" } ``` */ public void orderCancelExampleSync() { OrderCancelRequest orderCancelRequest = new OrderCancelRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelReplaceExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelReplaceExample.java index ad567fff4..ee8e7450b 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelReplaceExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderCancelReplaceExample.java @@ -38,16 +38,14 @@ public SpotWebSocketApi getApi() { * * A new order that was not attempted (i.e. when `newOrderResult: NOT_ATTEMPTED`), * will still increase the unfilled order count by 1. * You can only cancel an individual order * from an orderList using this method, but the result is the same as canceling the entire - * orderList.not attempted (i.e. when `newOrderResult: NOT_ATTEMPTED`), will still - * increase the unfilled order count by 1. Weight(IP): 1 Unfilled Order Count: 1 Security Type: - * TRADE Notes: **Data Source:** Matching Engine Similar to the - * [`order.place`](#order-place) request, additional mandatory parameters (*) are - * determined by the new order `type`. Available `cancelReplaceMode` - * options: * `STOP_ON_FAILURE` – if cancellation request fails, new order placement - * will not be attempted. * `ALLOW_FAILURE` – new order placement will be attempted - * even if the cancel request fails. <table> <thead> <tr> <th - * colspan=3 align=left>Request</th> <th colspan=3 - * align=left>Response</th> </tr> <tr> + * orderList. Weight(IP): 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** + * Matching Engine Similar to the `order.place` request, additional mandatory + * parameters (*) are determined by the new order `type`. Available + * `cancelReplaceMode` options: * `STOP_ON_FAILURE` – if cancellation + * request fails, new order placement will not be attempted. * `ALLOW_FAILURE` – new + * order placement will be attempted even if the cancel request fails. <table> + * <thead> <tr> <th colspan=3 align=left>Request</th> <th + * colspan=3 align=left>Response</th> </tr> <tr> * <th><code>cancelReplaceMode</code></th> * <th><code>orderRateLimitExceededMode</code></th> <th>Unfilled * Order Count</th> <th><code>cancelResult</code></th> @@ -157,11 +155,13 @@ public SpotWebSocketApi getApi() { * `STOP_ON_FAILURE` mode, if the new order placement fails, the old order is still * canceled. * Filters and order count limits are evaluated before cancellation and order * placement occurs. * If new order placement is not attempted, your order count is still - * incremented. * Like [`order.cancel`](#order-cancel), if you cancel an individual - * order from an order list, the entire order list is canceled. * The performance for canceling - * an order (single cancel or as part of a cancel-replace) is always better when only - * `orderId` is sent. Sending `origClientOrderId` or both - * `orderId` + `origClientOrderId` will be slower. + * incremented. * Like `order.cancel`, if you cancel an individual order from an order + * list, the entire order list is canceled. * The performance for canceling an order (single + * cancel or as part of a cancel-replace) is always better when only `orderId` is + * sent. Sending `origClientOrderId` or both `orderId` + + * `origClientOrderId` will be slower. Response Notes: **Note:** The payload above + * does not show all fields that can appear. Please refer to Conditional fields in Order + * Responses. */ public void orderCancelReplaceExampleAsync() { OrderCancelReplaceRequest orderCancelReplaceRequest = new OrderCancelReplaceRequest(); @@ -188,16 +188,14 @@ public void orderCancelReplaceExampleAsync() { * * A new order that was not attempted (i.e. when `newOrderResult: NOT_ATTEMPTED`), * will still increase the unfilled order count by 1. * You can only cancel an individual order * from an orderList using this method, but the result is the same as canceling the entire - * orderList.not attempted (i.e. when `newOrderResult: NOT_ATTEMPTED`), will still - * increase the unfilled order count by 1. Weight(IP): 1 Unfilled Order Count: 1 Security Type: - * TRADE Notes: **Data Source:** Matching Engine Similar to the - * [`order.place`](#order-place) request, additional mandatory parameters (*) are - * determined by the new order `type`. Available `cancelReplaceMode` - * options: * `STOP_ON_FAILURE` – if cancellation request fails, new order placement - * will not be attempted. * `ALLOW_FAILURE` – new order placement will be attempted - * even if the cancel request fails. <table> <thead> <tr> <th - * colspan=3 align=left>Request</th> <th colspan=3 - * align=left>Response</th> </tr> <tr> + * orderList. Weight(IP): 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data Source:** + * Matching Engine Similar to the `order.place` request, additional mandatory + * parameters (*) are determined by the new order `type`. Available + * `cancelReplaceMode` options: * `STOP_ON_FAILURE` – if cancellation + * request fails, new order placement will not be attempted. * `ALLOW_FAILURE` – new + * order placement will be attempted even if the cancel request fails. <table> + * <thead> <tr> <th colspan=3 align=left>Request</th> <th + * colspan=3 align=left>Response</th> </tr> <tr> * <th><code>cancelReplaceMode</code></th> * <th><code>orderRateLimitExceededMode</code></th> <th>Unfilled * Order Count</th> <th><code>cancelResult</code></th> @@ -307,11 +305,13 @@ public void orderCancelReplaceExampleAsync() { * `STOP_ON_FAILURE` mode, if the new order placement fails, the old order is still * canceled. * Filters and order count limits are evaluated before cancellation and order * placement occurs. * If new order placement is not attempted, your order count is still - * incremented. * Like [`order.cancel`](#order-cancel), if you cancel an individual - * order from an order list, the entire order list is canceled. * The performance for canceling - * an order (single cancel or as part of a cancel-replace) is always better when only - * `orderId` is sent. Sending `origClientOrderId` or both - * `orderId` + `origClientOrderId` will be slower. + * incremented. * Like `order.cancel`, if you cancel an individual order from an order + * list, the entire order list is canceled. * The performance for canceling an order (single + * cancel or as part of a cancel-replace) is always better when only `orderId` is + * sent. Sending `origClientOrderId` or both `orderId` + + * `origClientOrderId` will be slower. Response Notes: **Note:** The payload above + * does not show all fields that can appear. Please refer to Conditional fields in Order + * Responses. */ public void orderCancelReplaceExampleSync() { OrderCancelReplaceRequest orderCancelReplaceRequest = new OrderCancelReplaceRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListCancelExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListCancelExample.java index aeb31fede..6fbf6aa8e 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListCancelExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListCancelExample.java @@ -36,7 +36,7 @@ public SpotWebSocketApi getApi() { * parameters are provided, the `orderListId` is searched first, then the * `listClientOrderId` from that result is checked against that order. If both * conditions are not met the request will be rejected. * Canceling an individual order with - * [`order.cancel`](#order-cancel) will cancel the entire order list as well. + * `order.cancel` will cancel the entire order list as well. */ public void orderListCancelExampleAsync() { OrderListCancelRequest orderListCancelRequest = new OrderListCancelRequest(); @@ -61,7 +61,7 @@ public void orderListCancelExampleAsync() { * parameters are provided, the `orderListId` is searched first, then the * `listClientOrderId` from that result is checked against that order. If both * conditions are not met the request will be rejected. * Canceling an individual order with - * [`order.cancel`](#order-cancel) will cancel the entire order list as well. + * `order.cancel` will cancel the entire order list as well. */ public void orderListCancelExampleSync() { OrderListCancelRequest orderListCancelRequest = new OrderListCancelRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpoExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpoExample.java index c11df1280..8653ec2d6 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpoExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpoExample.java @@ -35,9 +35,10 @@ public SpotWebSocketApi getApi() { /** * OPO (TRADE) * - *

Place an [OPO](/products/spot/faqs/opo). * OPOs add 2 orders to the - * EXCHANGE_MAX_NUM_ORDERS filter and MAX_NUM_ORDERS filter. Weight(IP): 1 Unfilled Order Count: - * 2 Security Type: TRADE Notes: **Data Source:** Matching Engine + *

Place an OPO. * OPOs add 2 orders to the EXCHANGE_MAX_NUM_ORDERS filter and MAX_NUM_ORDERS + * filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** + * Matching Engine Response Notes: **Note:** The payload above does not show all fields that can + * appear. Please refer to Conditional fields in Order Responses. */ public void orderListPlaceOpoExampleAsync() { OrderListPlaceOpoRequest orderListPlaceOpoRequest = new OrderListPlaceOpoRequest(); @@ -63,9 +64,10 @@ public void orderListPlaceOpoExampleAsync() { /** * OPO (TRADE) * - *

Place an [OPO](/products/spot/faqs/opo). * OPOs add 2 orders to the - * EXCHANGE_MAX_NUM_ORDERS filter and MAX_NUM_ORDERS filter. Weight(IP): 1 Unfilled Order Count: - * 2 Security Type: TRADE Notes: **Data Source:** Matching Engine + *

Place an OPO. * OPOs add 2 orders to the EXCHANGE_MAX_NUM_ORDERS filter and MAX_NUM_ORDERS + * filter. Weight(IP): 1 Unfilled Order Count: 2 Security Type: TRADE Notes: **Data Source:** + * Matching Engine Response Notes: **Note:** The payload above does not show all fields that can + * appear. Please refer to Conditional fields in Order Responses. */ public void orderListPlaceOpoExampleSync() { OrderListPlaceOpoRequest orderListPlaceOpoRequest = new OrderListPlaceOpoRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpocoExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpocoExample.java index f9635e349..109c57f14 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpocoExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOpocoExample.java @@ -35,8 +35,9 @@ public SpotWebSocketApi getApi() { /** * OPOCO (TRADE) * - *

Place an [OPOCO](/products/spot/faqs/opo). Weight(IP): 1 Unfilled Order Count: 3 Security - * Type: TRADE Notes: **Data Source:** Matching Engine + *

Place an OPOCO. Weight(IP): 1 Unfilled Order Count: 3 Security Type: TRADE Notes: **Data + * Source:** Matching Engine Response Notes: **Note:** The payload above does not show all + * fields that can appear. Please refer to Conditional fields in Order Responses. */ public void orderListPlaceOpocoExampleAsync() { OrderListPlaceOpocoRequest orderListPlaceOpocoRequest = new OrderListPlaceOpocoRequest(); @@ -62,8 +63,9 @@ public void orderListPlaceOpocoExampleAsync() { /** * OPOCO (TRADE) * - *

Place an [OPOCO](/products/spot/faqs/opo). Weight(IP): 1 Unfilled Order Count: 3 Security - * Type: TRADE Notes: **Data Source:** Matching Engine + *

Place an OPOCO. Weight(IP): 1 Unfilled Order Count: 3 Security Type: TRADE Notes: **Data + * Source:** Matching Engine Response Notes: **Note:** The payload above does not show all + * fields that can appear. Please refer to Conditional fields in Order Responses. */ public void orderListPlaceOpocoExampleSync() { OrderListPlaceOpocoRequest orderListPlaceOpocoRequest = new OrderListPlaceOpocoRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtoExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtoExample.java index 8b943e6bf..c1466186d 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtoExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtoExample.java @@ -58,7 +58,9 @@ public SpotWebSocketApi getApi() { * |`pendingStopPrice` and/or `pendingTrailingDelta`| * |`pendingType` =`STOP_LOSS_LIMIT` or * `TAKE_PROFIT_LIMIT`|`pendingPrice`, `pendingStopPrice` and/or - * `pendingTrailingDelta`, `pendingTimeInForce`| + * `pendingTrailingDelta`, `pendingTimeInForce`| Response Notes: **Note:** + * The payload above does not show all fields that can appear. Please refer to Conditional + * fields in Order Responses. */ public void orderListPlaceOtoExampleAsync() { OrderListPlaceOtoRequest orderListPlaceOtoRequest = new OrderListPlaceOtoRequest(); @@ -108,7 +110,9 @@ public void orderListPlaceOtoExampleAsync() { * |`pendingStopPrice` and/or `pendingTrailingDelta`| * |`pendingType` =`STOP_LOSS_LIMIT` or * `TAKE_PROFIT_LIMIT`|`pendingPrice`, `pendingStopPrice` and/or - * `pendingTrailingDelta`, `pendingTimeInForce`| + * `pendingTrailingDelta`, `pendingTimeInForce`| Response Notes: **Note:** + * The payload above does not show all fields that can appear. Please refer to Conditional + * fields in Order Responses. */ public void orderListPlaceOtoExampleSync() { OrderListPlaceOtoRequest orderListPlaceOtoRequest = new OrderListPlaceOtoRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtocoExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtocoExample.java index 8a3b096e0..a0aff9f96 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtocoExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderListPlaceOtocoExample.java @@ -38,11 +38,10 @@ public SpotWebSocketApi getApi() { *

Place an OTOCO. * An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list comprised * of 3 orders. * The first order is called the **working order** and must be `LIMIT` * or `LIMIT_MAKER`. Initially, only the working order goes on the order book. * The - * behavior of the working order is the same as the [OTO](#order-list-place-oto). * OTOCO has 2 - * pending orders (pending above and pending below), forming an OCO pair. The pending orders are - * only placed on the order book when the working order gets **fully filled**. * The rules of - * the pending above and pending below follow the same rules as the [Order list - * OCO](#order-list-place-oco). * OTOCOs add **3 orders** to the + * behavior of the working order is the same as the OTO. * OTOCO has 2 pending orders (pending + * above and pending below), forming an OCO pair. The pending orders are only placed on the + * order book when the working order gets **fully filled**. * The rules of the pending above and + * pending below follow the same rules as the Order list OCO. * OTOCOs add **3 orders** to the * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight(IP): * 1 Unfilled Order Count: 3 Security Type: TRADE Notes: **Data Source:** Matching Engine * **Mandatory parameters based on `pendingAboveType`, `pendingBelowType` or @@ -62,7 +61,8 @@ public SpotWebSocketApi getApi() { * `pendingBelowTrailingDelta`| * |`pendingBelowType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT`|`pendingBelowPrice`, * `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta`, - * `pendingBelowTimeInForce`| + * `pendingBelowTimeInForce`| Response Notes: **Note:** The payload above does not + * show all fields that can appear. Please refer to Conditional fields in Order Responses. */ public void orderListPlaceOtocoExampleAsync() { OrderListPlaceOtocoRequest orderListPlaceOtocoRequest = new OrderListPlaceOtocoRequest(); @@ -92,11 +92,10 @@ public void orderListPlaceOtocoExampleAsync() { *

Place an OTOCO. * An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list comprised * of 3 orders. * The first order is called the **working order** and must be `LIMIT` * or `LIMIT_MAKER`. Initially, only the working order goes on the order book. * The - * behavior of the working order is the same as the [OTO](#order-list-place-oto). * OTOCO has 2 - * pending orders (pending above and pending below), forming an OCO pair. The pending orders are - * only placed on the order book when the working order gets **fully filled**. * The rules of - * the pending above and pending below follow the same rules as the [Order list - * OCO](#order-list-place-oco). * OTOCOs add **3 orders** to the + * behavior of the working order is the same as the OTO. * OTOCO has 2 pending orders (pending + * above and pending below), forming an OCO pair. The pending orders are only placed on the + * order book when the working order gets **fully filled**. * The rules of the pending above and + * pending below follow the same rules as the Order list OCO. * OTOCOs add **3 orders** to the * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight(IP): * 1 Unfilled Order Count: 3 Security Type: TRADE Notes: **Data Source:** Matching Engine * **Mandatory parameters based on `pendingAboveType`, `pendingBelowType` or @@ -116,7 +115,8 @@ public void orderListPlaceOtocoExampleAsync() { * `pendingBelowTrailingDelta`| * |`pendingBelowType=STOP_LOSS_LIMIT/TAKE_PROFIT_LIMIT`|`pendingBelowPrice`, * `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta`, - * `pendingBelowTimeInForce`| + * `pendingBelowTimeInForce`| Response Notes: **Note:** The payload above does not + * show all fields that can appear. Please refer to Conditional fields in Order Responses. */ public void orderListPlaceOtocoExampleSync() { OrderListPlaceOtocoRequest orderListPlaceOtocoRequest = new OrderListPlaceOtocoRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderPlaceExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderPlaceExample.java index 2855b6a27..411f15ac9 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderPlaceExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/OrderPlaceExample.java @@ -35,8 +35,7 @@ public SpotWebSocketApi getApi() { * *

Send in a new order. This adds 1 order to the `EXCHANGE_MAX_ORDERS` filter and * the `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 1 Security Type: - * TRADE Notes: **Data Source:** Matching Engine <a - * id=\"order-type\">Certain parameters (*)</a> become mandatory based + * TRADE Notes: **Data Source:** Matching Engine Certain parameters (*) become mandatory based * on the order `type`: <table> <thead> <tr> <th>Order * <code>type</code></th> <th>Mandatory parameters</th> * </tr> </thead> <tbody> <tr> @@ -111,35 +110,33 @@ public SpotWebSocketApi getApi() { * direction. </p> </td> </tr> <tr> * <td><code>TAKE_PROFIT_LIMIT</code></td> <td> <p> Like * <code>STOP_LOSS_LIMIT</code> but activates when market price moves in the - * favorable direction. </p> </td> </tr> </tbody> </table> <a - * id=\"pegged-orders-info\"></a> Notes on using parameters for Pegged - * Orders: * These parameters are allowed for `LIMIT`, `LIMIT_MAKER`, - * `STOP_LOSS_LIMIT`, `TAKE_PROFIT_LIMIT` orders. * If - * `pegPriceType` is specified, `price` becomes optional. Otherwise, it is - * still mandatory. * `pegPriceType=PRIMARY_PEG` means the primary peg, that is - * the best price on the same side of the order book as your order. * + * favorable direction. </p> </td> </tr> </tbody> </table> Notes + * on using parameters for Pegged Orders: * These parameters are allowed for `LIMIT`, + * `LIMIT_MAKER`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT_LIMIT` orders. * + * If `pegPriceType` is specified, `price` becomes optional. Otherwise, it + * is still mandatory. * `pegPriceType=PRIMARY_PEG` means the primary peg, that + * is the best price on the same side of the order book as your order. * * `pegPriceType=MARKET_PEG` means the market peg, that is the best price on the * opposite side of the order book from your order. * Use `pegOffsetType` and * `pegOffsetValue` to request a price level other than the best one. These parameters - * must be specified together. <a id=\"timeInForce\"></a> Available - * `timeInForce` options, setting how long the order should be active before - * expiration: TIF | Description ----- | -------------- `GTC` | **Good 'til - * Canceled** – the order will remain on the book until you cancel it, or the order is - * completely filled. `IOC` | **Immediate or Cancel** – the order will be filled for - * as much as possible, the unfilled quantity immediately expires. `FOK` | **Fill or - * Kill** – the order will expire unless it cannot be immediately filled for the entire - * quantity. Notes: * `newClientOrderId` specifies `clientOrderId` value for - * the order. A new order with the same `clientOrderId` is accepted only when the - * previous one is filled or expired. * Any `LIMIT` or `LIMIT_MAKER` order - * can be made into an iceberg order by specifying the `icebergQty`. An order with an - * `icebergQty` must have `timeInForce` set to `GTC`. * Trigger - * order price rules for `STOP_LOSS`/`TAKE_PROFIT` orders: * - * `stopPrice` must be above market price: `STOP_LOSS BUY`, - * `TAKE_PROFIT SELL` * `stopPrice` must be below market price: - * `STOP_LOSS SELL`, `TAKE_PROFIT BUY` * `MARKET` orders using - * `quoteOrderQty` follow [`LOT_SIZE`](/products/spot/filters#lot_size) - * filter rules. The order will execute a quantity that has notional value as close as possible - * to requested `quoteOrderQty`. + * must be specified together. Available `timeInForce` options, setting how long the + * order should be active before expiration: TIF | Description ----- | -------------- + * `GTC` | **Good 'til Canceled** – the order will remain on the book until you + * cancel it, or the order is completely filled. `IOC` | **Immediate or Cancel** – the + * order will be filled for as much as possible, the unfilled quantity immediately expires. + * `FOK` | **Fill or Kill** – the order will expire unless it cannot be immediately + * filled for the entire quantity. Notes: * `newClientOrderId` specifies + * `clientOrderId` value for the order. A new order with the same + * `clientOrderId` is accepted only when the previous one is filled or expired. * Any + * `LIMIT` or `LIMIT_MAKER` order can be made into an iceberg order by + * specifying the `icebergQty`. An order with an `icebergQty` must have + * `timeInForce` set to `GTC`. * Trigger order price rules for + * `STOP_LOSS`/`TAKE_PROFIT` orders: * `stopPrice` must be above + * market price: `STOP_LOSS BUY`, `TAKE_PROFIT SELL` * `stopPrice` + * must be below market price: `STOP_LOSS SELL`, `TAKE_PROFIT BUY` * + * `MARKET` orders using `quoteOrderQty` follow `LOT_SIZE` filter + * rules. The order will execute a quantity that has notional value as close as possible to + * requested `quoteOrderQty`. */ public void orderPlaceExampleAsync() { OrderPlaceRequest orderPlaceRequest = new OrderPlaceRequest(); @@ -162,8 +159,7 @@ public void orderPlaceExampleAsync() { * *

Send in a new order. This adds 1 order to the `EXCHANGE_MAX_ORDERS` filter and * the `MAX_NUM_ORDERS` filter. Weight(IP): 1 Unfilled Order Count: 1 Security Type: - * TRADE Notes: **Data Source:** Matching Engine <a - * id=\"order-type\">Certain parameters (*)</a> become mandatory based + * TRADE Notes: **Data Source:** Matching Engine Certain parameters (*) become mandatory based * on the order `type`: <table> <thead> <tr> <th>Order * <code>type</code></th> <th>Mandatory parameters</th> * </tr> </thead> <tbody> <tr> @@ -238,35 +234,33 @@ public void orderPlaceExampleAsync() { * direction. </p> </td> </tr> <tr> * <td><code>TAKE_PROFIT_LIMIT</code></td> <td> <p> Like * <code>STOP_LOSS_LIMIT</code> but activates when market price moves in the - * favorable direction. </p> </td> </tr> </tbody> </table> <a - * id=\"pegged-orders-info\"></a> Notes on using parameters for Pegged - * Orders: * These parameters are allowed for `LIMIT`, `LIMIT_MAKER`, - * `STOP_LOSS_LIMIT`, `TAKE_PROFIT_LIMIT` orders. * If - * `pegPriceType` is specified, `price` becomes optional. Otherwise, it is - * still mandatory. * `pegPriceType=PRIMARY_PEG` means the primary peg, that is - * the best price on the same side of the order book as your order. * + * favorable direction. </p> </td> </tr> </tbody> </table> Notes + * on using parameters for Pegged Orders: * These parameters are allowed for `LIMIT`, + * `LIMIT_MAKER`, `STOP_LOSS_LIMIT`, `TAKE_PROFIT_LIMIT` orders. * + * If `pegPriceType` is specified, `price` becomes optional. Otherwise, it + * is still mandatory. * `pegPriceType=PRIMARY_PEG` means the primary peg, that + * is the best price on the same side of the order book as your order. * * `pegPriceType=MARKET_PEG` means the market peg, that is the best price on the * opposite side of the order book from your order. * Use `pegOffsetType` and * `pegOffsetValue` to request a price level other than the best one. These parameters - * must be specified together. <a id=\"timeInForce\"></a> Available - * `timeInForce` options, setting how long the order should be active before - * expiration: TIF | Description ----- | -------------- `GTC` | **Good 'til - * Canceled** – the order will remain on the book until you cancel it, or the order is - * completely filled. `IOC` | **Immediate or Cancel** – the order will be filled for - * as much as possible, the unfilled quantity immediately expires. `FOK` | **Fill or - * Kill** – the order will expire unless it cannot be immediately filled for the entire - * quantity. Notes: * `newClientOrderId` specifies `clientOrderId` value for - * the order. A new order with the same `clientOrderId` is accepted only when the - * previous one is filled or expired. * Any `LIMIT` or `LIMIT_MAKER` order - * can be made into an iceberg order by specifying the `icebergQty`. An order with an - * `icebergQty` must have `timeInForce` set to `GTC`. * Trigger - * order price rules for `STOP_LOSS`/`TAKE_PROFIT` orders: * - * `stopPrice` must be above market price: `STOP_LOSS BUY`, - * `TAKE_PROFIT SELL` * `stopPrice` must be below market price: - * `STOP_LOSS SELL`, `TAKE_PROFIT BUY` * `MARKET` orders using - * `quoteOrderQty` follow [`LOT_SIZE`](/products/spot/filters#lot_size) - * filter rules. The order will execute a quantity that has notional value as close as possible - * to requested `quoteOrderQty`. + * must be specified together. Available `timeInForce` options, setting how long the + * order should be active before expiration: TIF | Description ----- | -------------- + * `GTC` | **Good 'til Canceled** – the order will remain on the book until you + * cancel it, or the order is completely filled. `IOC` | **Immediate or Cancel** – the + * order will be filled for as much as possible, the unfilled quantity immediately expires. + * `FOK` | **Fill or Kill** – the order will expire unless it cannot be immediately + * filled for the entire quantity. Notes: * `newClientOrderId` specifies + * `clientOrderId` value for the order. A new order with the same + * `clientOrderId` is accepted only when the previous one is filled or expired. * Any + * `LIMIT` or `LIMIT_MAKER` order can be made into an iceberg order by + * specifying the `icebergQty`. An order with an `icebergQty` must have + * `timeInForce` set to `GTC`. * Trigger order price rules for + * `STOP_LOSS`/`TAKE_PROFIT` orders: * `stopPrice` must be above + * market price: `STOP_LOSS BUY`, `TAKE_PROFIT SELL` * `stopPrice` + * must be below market price: `STOP_LOSS SELL`, `TAKE_PROFIT BUY` * + * `MARKET` orders using `quoteOrderQty` follow `LOT_SIZE` filter + * rules. The order will execute a quantity that has notional value as close as possible to + * requested `quoteOrderQty`. */ public void orderPlaceExampleSync() { OrderPlaceRequest orderPlaceRequest = new OrderPlaceRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/SorOrderPlaceExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/SorOrderPlaceExample.java index c332410a3..a93bd36c2 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/SorOrderPlaceExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/trade/SorOrderPlaceExample.java @@ -34,11 +34,10 @@ public SpotWebSocketApi getApi() { * Place new order using SOR (TRADE) * *

Places an order using smart order routing (SOR). This adds 1 order to the - * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read [SOR - * FAQ](/products/spot/faqs/sor_faq) to learn more. Weight(IP): 1 Unfilled Order Count: 1 - * Security Type: TRADE Notes: **Data Source:** Matching Engine **Note:** - * `sor.order.place` only supports `LIMIT` and `MARKET` orders. - * `quoteOrderQty` is not supported. + * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read SOR + * FAQ to learn more. Weight(IP): 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data + * Source:** Matching Engine **Note:** `sor.order.place` only supports + * `LIMIT` and `MARKET` orders. `quoteOrderQty` is not supported. */ public void sorOrderPlaceExampleAsync() { SorOrderPlaceRequest sorOrderPlaceRequest = new SorOrderPlaceRequest(); @@ -62,11 +61,10 @@ public void sorOrderPlaceExampleAsync() { * Place new order using SOR (TRADE) * *

Places an order using smart order routing (SOR). This adds 1 order to the - * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read [SOR - * FAQ](/products/spot/faqs/sor_faq) to learn more. Weight(IP): 1 Unfilled Order Count: 1 - * Security Type: TRADE Notes: **Data Source:** Matching Engine **Note:** - * `sor.order.place` only supports `LIMIT` and `MARKET` orders. - * `quoteOrderQty` is not supported. + * `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Read SOR + * FAQ to learn more. Weight(IP): 1 Unfilled Order Count: 1 Security Type: TRADE Notes: **Data + * Source:** Matching Engine **Note:** `sor.order.place` only supports + * `LIMIT` and `MARKET` orders. `quoteOrderQty` is not supported. */ public void sorOrderPlaceExampleSync() { SorOrderPlaceRequest sorOrderPlaceRequest = new SorOrderPlaceRequest(); diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamSubscribeExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamSubscribeExample.java index 50f9557d5..4aecfb77c 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamSubscribeExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamSubscribeExample.java @@ -30,18 +30,15 @@ public SpotWebSocketApi getApi() { } /** - * Subscribe to User Data Stream + * Subscribe to User Data Stream (USER_STREAM) * *

Subscribe to the User Data Stream in the current WebSocket connection. **Notes:** - This * method requires an authenticated WebSocket connection using Ed25519 keys. Please refer to - * [`session.logon`](/catalog/core-trading-spot-trading/api/ws-api/auth#session-logon). - * - To check the subscription status, use - * [`session.status`](/catalog/core-trading-spot-trading/api/ws-api/auth#session-status), - * see the `userDataStream` flag indicating you have have an active subscription. - - * User Data Stream events are available in both JSON and [SBE](/products/spot/faqs/sbe_faq) - * sessions. - Please refer to [User Data Streams](/products/spot/user-data-stream) for the - * event format details. - For SBE, only SBE schema 2:1 or later is supported. Weight(IP): 2 - * Security Type: NONE + * `session.logon`. - To check the subscription status, use + * `session.status`, see the `userDataStream` flag indicating you have an + * active subscription. - User Data Stream events are available in both JSON and SBE sessions. - + * Please refer to User Data Streams for the event format details. - For SBE, only SBE schema + * 2:1 or later is supported. Weight(IP): 2 Security Type: USER_STREAM */ public void userDataStreamSubscribeExampleStream() throws InterruptedException { StreamResponse resp = diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamUnsubscribeExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamUnsubscribeExample.java index 4c428026d..f18ec33c9 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamUnsubscribeExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/api/userdatastream/UserDataStreamUnsubscribeExample.java @@ -29,7 +29,7 @@ public SpotWebSocketApi getApi() { } /** - * WebSocket Unsubscribe from User Data Stream + * Unsubscribe from User Data Stream * *

Stop listening to the User Data Stream in the current WebSocket connection. Note that * `session.logout` will only close the subscription created with @@ -52,7 +52,7 @@ public void userDataStreamUnsubscribeExampleAsync() { } /** - * WebSocket Unsubscribe from User Data Stream + * Unsubscribe from User Data Stream * *

Stop listening to the User Data Stream in the current WebSocket connection. Note that * `session.logout` will only close the subscription created with diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/KlineOffsetExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/KlineOffsetExample.java index fd04cfe46..8c2ab1920 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/KlineOffsetExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/KlineOffsetExample.java @@ -27,10 +27,11 @@ public SpotWebSocketStreams getApi() { *

The Kline/Candlestick Stream push updates to the current klines/candlestick every second * in `UTC+8` timezone **Kline/Candlestick chart intervals:** Supported intervals: See * Kline/Candlestick chart intervals **UTC+8 timezone offset:** - Kline intervals open and close - * in the UTC+8 timezone. For example the 1d klines will open at the beginning of the UTC+8 day, - * and close at the end of the UTC+8 day. - Note that E (event time), t (start time) and T - * (close time) in the payload are Unix timestamps, which are always interpreted in UTC. Update - * Speed: 1000ms for `1s`, 2000ms for the other intervals + * in the `UTC+8` timezone. For example the `1d` klines will open at the + * beginning of the `UTC+8` day, and close at the end of the `UTC+8` day. - + * Note that `E` (event time), `t` (start time) and `T` (close + * time) in the payload are Unix timestamps, which are always interpreted in UTC. Update Speed: + * 1000ms for `1s`, 2000ms for the other intervals * * @throws ApiException if the Api call fails */ diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/PartialBookDepthExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/PartialBookDepthExample.java index d9c0b2593..d362b8cbe 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/PartialBookDepthExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/PartialBookDepthExample.java @@ -22,10 +22,10 @@ public SpotWebSocketStreams getApi() { } /** - * WebSocket Partial Book Depth Streams + * Partial Book Depth Streams * - *

Top **\\<levels\\>** bids and asks, pushed every second. Update Speed: 1000ms or - * 100ms + *

Top **\\<levels\\>** bids and asks, pushed every second. Valid + * **\\<levels\\>** are 5, 10, or 20. Update Speed: 1000ms or 100ms * * @throws ApiException if the Api call fails */ diff --git a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/RollingWindowTickerExample.java b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/RollingWindowTickerExample.java index 330854b60..a60ab63f0 100644 --- a/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/RollingWindowTickerExample.java +++ b/examples/spot/src/main/java/com/binance/connector/client/spot/websocket/stream/defaultpkg/RollingWindowTickerExample.java @@ -28,7 +28,7 @@ public SpotWebSocketStreams getApi() { * **Note:** This stream is different from the `<symbol>@ticker` stream. The * open time `\"O\"` always starts on a minute, while the closing time * `\"C\"` is the current time of the update. As such, the effective window - * might be up to 59999ms wider than `<window_size>`. Update Speed: 1000ms + * might be up to 59999ms wider than `<windowSize>`. Update Speed: 1000ms * * @throws ApiException if the Api call fails */ diff --git a/examples/staking/pom.xml b/examples/staking/pom.xml index badde75a9..e37dadc32 100644 --- a/examples/staking/pom.xml +++ b/examples/staking/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-staking - 6.0.0 + 6.0.2 \ No newline at end of file diff --git a/examples/stocks/pom.xml b/examples/stocks/pom.xml index f58b2eb8d..550122479 100644 --- a/examples/stocks/pom.xml +++ b/examples/stocks/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-stocks - 1.0.0 + 1.0.1 \ No newline at end of file diff --git a/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/CalendarStreamExample.java b/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/CalendarStreamExample.java index 029165a21..57febdf65 100644 --- a/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/CalendarStreamExample.java +++ b/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/CalendarStreamExample.java @@ -24,7 +24,8 @@ public StocksWebSocketStreams getApi() { * Calendar Stream * *

Single-stream broadcast of market-phase transitions. One message per transition; no - * periodic heartbeat payload. Server polls every 5 seconds. + * periodic heartbeat payload. Server polls every 5 seconds. Also reachable via the + * SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC. * * @throws ApiException if the Api call fails */ diff --git a/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/KlineStreamExample.java b/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/KlineStreamExample.java index 9ba3791ed..d68744756 100644 --- a/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/KlineStreamExample.java +++ b/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/KlineStreamExample.java @@ -25,7 +25,8 @@ public StocksWebSocketStreams getApi() { * Kline Stream * *

Per-symbol candlestick updates. One stream per (symbol, interval) combination. Supported - * intervals: 5m, 1h, 1d, 1w, 1M. + * intervals: 5m, 1h, 1d, 1w, 1M. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see + * Subscribing via RPC. * * @throws ApiException if the Api call fails */ diff --git a/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/PriceStreamExample.java b/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/PriceStreamExample.java index 0e0a4db47..793de09ea 100644 --- a/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/PriceStreamExample.java +++ b/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/PriceStreamExample.java @@ -24,7 +24,8 @@ public StocksWebSocketStreams getApi() { * Price Stream * *

Push-all price snapshot, polled every 3 seconds. One message carries the latest price for - * every active US-equity symbol. + * every active US-equity symbol. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see + * Subscribing via RPC. * * @throws ApiException if the Api call fails */ diff --git a/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/QuoteStreamExample.java b/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/QuoteStreamExample.java index 8d8e19ee9..54e6d41f9 100644 --- a/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/QuoteStreamExample.java +++ b/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/QuoteStreamExample.java @@ -25,7 +25,8 @@ public StocksWebSocketStreams getApi() { * Quote Stream * *

Per-symbol real-time best-bid / best-ask. Each symbol has its own stream. Per-symbol - * throttle: at most one push per symbol every 200 ms. + * throttle: at most one push per symbol every 200 ms. Also reachable via the + * SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC. * * @throws ApiException if the Api call fails */ diff --git a/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/TradabilityStreamExample.java b/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/TradabilityStreamExample.java index 6a898cde8..a47db0bce 100644 --- a/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/TradabilityStreamExample.java +++ b/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/TradabilityStreamExample.java @@ -25,7 +25,8 @@ public StocksWebSocketStreams getApi() { * Tradability Stream * *

Per-symbol push whenever the tradable direction of a symbol changes. Pushed only when the - * value actually changes (new value ≠ old value). + * value actually changes (new value ≠ old value). Also reachable via the SUBSCRIBE/UNSUBSCRIBE + * RPC — see Subscribing via RPC. * * @throws ApiException if the Api call fails */ diff --git a/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/TradingStatusStreamExample.java b/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/TradingStatusStreamExample.java index 176b99eb0..425911d7d 100644 --- a/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/TradingStatusStreamExample.java +++ b/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/marketstreams/TradingStatusStreamExample.java @@ -25,7 +25,8 @@ public StocksWebSocketStreams getApi() { * Trading Status Stream * *

Per-symbol trading-status transitions (halts, resumes, SSR, LULD pauses, etc.). Events - * that do not match a known status/reason rule are not pushed. + * that do not match a known status/reason rule are not pushed. Also reachable via the + * SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC. * * @throws ApiException if the Api call fails */ diff --git a/examples/sub-account/pom.xml b/examples/sub-account/pom.xml index 9b6a7b17f..e889e560d 100644 --- a/examples/sub-account/pom.xml +++ b/examples/sub-account/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-sub-account - 8.0.0 + 8.0.1 \ No newline at end of file diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountInvestorExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountInvestorExample.java index 46d9fd6eb..47c069605 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountInvestorExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountInvestorExample.java @@ -34,9 +34,7 @@ public SubAccountRestApi getApi() { * api to query managed sub account transfer log. This endpoint is available for investor of * Managed Sub-Account. A Managed Sub-Account is an account type for investors who value * flexibility in asset allocation and account application, while delegating trades to a - * professional trading team. Please refer to - * [link](https://www.binance.com/en/support/faq/how-to-get-started-with-managed-sub-account-functions-and-frequently-asked-questions-0594748722704383a7c369046e489459) - * Weight(IP): 1 Security Type: USER_DATA + * professional trading team. Please refer to link Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ diff --git a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountTradingExample.java b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountTradingExample.java index c4a6ee3fc..0bdd12e86 100644 --- a/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountTradingExample.java +++ b/examples/sub-account/src/main/java/com/binance/connector/client/sub_account/rest/managedsubaccount/QueryManagedSubAccountTransferLogMasterAccountTradingExample.java @@ -34,9 +34,7 @@ public SubAccountRestApi getApi() { * use this api to query managed sub account transfer log. This endpoint is available for * trading team of Managed Sub-Account. A Managed Sub-Account is an account type for investors * who value flexibility in asset allocation and account application, while delegating trades to - * a professional trading team. Please refer to - * [link](https://www.binance.com/en/support/faq/how-to-get-started-with-managed-sub-account-functions-and-frequently-asked-questions-0594748722704383a7c369046e489459) - * Weight(UID): 60 Security Type: USER_DATA + * a professional trading team. Please refer to link Weight(UID): 60 Security Type: USER_DATA * * @throws ApiException if the Api call fails */ diff --git a/examples/vip-loan/pom.xml b/examples/vip-loan/pom.xml index d080216ef..659bb424c 100644 --- a/examples/vip-loan/pom.xml +++ b/examples/vip-loan/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-vip-loan - 4.0.0 + 4.0.2 \ No newline at end of file diff --git a/examples/w3w-prediction/pom.xml b/examples/w3w-prediction/pom.xml index 3a9e27de4..8a6581f92 100644 --- a/examples/w3w-prediction/pom.xml +++ b/examples/w3w-prediction/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-w3w-prediction - 2.1.0 + 2.1.2 \ No newline at end of file diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/GetMarketDetailExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/GetMarketDetailExample.java index b3e1ecb93..8ba6ca222 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/GetMarketDetailExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/GetMarketDetailExample.java @@ -30,7 +30,7 @@ public W3WPredictionRestApi getApi() { * Get Market Detail * *

Get full details for a specific prediction market topic, including variant data and - * timeline. Weight(IP): 200 + * timeline. Weight(IP): 1 * * @throws ApiException if the Api call fails */ diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/ListPredictionCategoriesExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/ListPredictionCategoriesExample.java index 0dcf8f008..939836892 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/ListPredictionCategoriesExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/ListPredictionCategoriesExample.java @@ -29,7 +29,7 @@ public W3WPredictionRestApi getApi() { /** * List Prediction Categories * - *

Get all available prediction market categories (L1 and L2). Weight(IP): 200 + *

Get all available prediction market categories (L1 and L2). Weight(IP): 1 * * @throws ApiException if the Api call fails */ diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/ListPredictionMarketsExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/ListPredictionMarketsExample.java index 34c401997..ecf62ead1 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/ListPredictionMarketsExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/ListPredictionMarketsExample.java @@ -32,7 +32,7 @@ public W3WPredictionRestApi getApi() { * List Prediction Markets * *

Get a paginated list of prediction market topics, with optional category and sort filters. - * Weight(IP): 200 + * Weight(IP): 1 * * @throws ApiException if the Api call fails */ diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/MarketSearchExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/MarketSearchExample.java index 89a302bdd..728ece639 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/MarketSearchExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/MarketSearchExample.java @@ -29,7 +29,7 @@ public W3WPredictionRestApi getApi() { /** * Market Search * - *

Semantic search for prediction market topics by keyword. Weight(IP): 200 + *

Semantic search for prediction market topics by keyword. Weight(IP): 1 * * @throws ApiException if the Api call fails */ diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/QueryLastTradePriceExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/QueryLastTradePriceExample.java index b709937f4..47b50f7ac 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/QueryLastTradePriceExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/QueryLastTradePriceExample.java @@ -29,7 +29,7 @@ public W3WPredictionRestApi getApi() { /** * Query Last Trade Price * - *

Get the most recent trade price for a prediction market. Weight(IP): 200 + *

Get the most recent trade price for a prediction market. Weight(IP): 1 * * @throws ApiException if the Api call fails */ diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/QueryOrderBookExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/QueryOrderBookExample.java index 67f058726..4af91194a 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/QueryOrderBookExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/marketdata/QueryOrderBookExample.java @@ -30,7 +30,7 @@ public W3WPredictionRestApi getApi() { * Query Order Book * *

Get the current order book (bids and asks) for a specific prediction market outcome token. - * Weight(IP): 200 + * Weight(IP): 1 * * @throws ApiException if the Api call fails */ diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/GetPositionByTokenExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/GetPositionByTokenExample.java index 67b79651e..46aa074bd 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/GetPositionByTokenExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/GetPositionByTokenExample.java @@ -30,7 +30,7 @@ public W3WPredictionRestApi getApi() { * Get Position by Token (PREDICTION_TRADE) * *

Get the authenticated user's position detail for a specific prediction token. - * Weight(IP): 200 Security Type: PREDICTION_TRADE + * Weight(IP): 1 Security Type: PREDICTION_TRADE * * @throws ApiException if the Api call fails */ diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPnLExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPnLExample.java index a29a93f69..7e0728187 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPnLExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPnLExample.java @@ -31,7 +31,7 @@ public W3WPredictionRestApi getApi() { * *

Query profit and loss records for the authenticated user's prediction positions. When * `tokenId` is provided, returns a single record in `pnl`; otherwise - * returns a list in `pnlList`. Weight(IP): 200 Security Type: PREDICTION_TRADE + * returns a list in `pnlList`. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @throws ApiException if the Api call fails */ diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPositionsByFilterExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPositionsByFilterExample.java index a8c0cb2c0..59875b450 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPositionsByFilterExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPositionsByFilterExample.java @@ -30,7 +30,7 @@ public W3WPredictionRestApi getApi() { * Query Positions by Filter (PREDICTION_TRADE) * *

Get prediction positions filtered by wallet address and/or market topic ID. Both - * parameters are optional. Weight(IP): 200 Security Type: PREDICTION_TRADE + * parameters are optional. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @throws ApiException if the Api call fails */ diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPositionsExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPositionsExample.java index 25c3a87d9..8d13f1620 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPositionsExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QueryPositionsExample.java @@ -30,7 +30,7 @@ public W3WPredictionRestApi getApi() { * Query Positions (PREDICTION_TRADE) * *

Get the authenticated user's prediction token positions with portfolio summary and - * tab-based filtering. Weight(IP): 200 Security Type: PREDICTION_TRADE + * tab-based filtering. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @throws ApiException if the Api call fails */ diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QuerySettledPositionHistoryExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QuerySettledPositionHistoryExample.java index 48b62eb09..823182567 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QuerySettledPositionHistoryExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/position/QuerySettledPositionHistoryExample.java @@ -30,7 +30,7 @@ public W3WPredictionRestApi getApi() { * Query Settled Position History (PREDICTION_TRADE) * *

Get the authenticated user's settled (resolved) prediction position history with - * optional filters. Weight(IP): 200 Security Type: PREDICTION_TRADE + * optional filters. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @throws ApiException if the Api call fails */ diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/redeem/BatchRedeemExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/redeem/BatchRedeemExample.java index b565a77a5..bac0003f4 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/redeem/BatchRedeemExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/redeem/BatchRedeemExample.java @@ -32,7 +32,7 @@ public W3WPredictionRestApi getApi() { * Batch Redeem (PREDICTION_TRADE) * *

Redeem one or more settled prediction tokens on-chain to claim winnings. Requires SAS - * authorization. Weight(IP): 200 Security Type: PREDICTION_TRADE + * authorization. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @throws ApiException if the Api call fails */ diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/redeem/GetRedeemStatusExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/redeem/GetRedeemStatusExample.java index c64f1e4fd..09a06a534 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/redeem/GetRedeemStatusExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/redeem/GetRedeemStatusExample.java @@ -30,7 +30,7 @@ public W3WPredictionRestApi getApi() { * Get Redeem Status (PREDICTION_TRADE) * *

Query the on-chain transaction status of a previously submitted redeem request. - * Weight(IP): 200 Security Type: PREDICTION_TRADE Response Notes: - Status values: | Value | + * Weight(IP): 1 Security Type: PREDICTION_TRADE Response Notes: - Status values: | Value | * Description | | ----------- | -------------------------------------------- | | * `PENDING` | Transaction submitted, awaiting confirmation | | `CONFIRMED` * | Transaction confirmed on-chain | | `FAILED` | Transaction failed | | diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/BatchCancelOrdersExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/BatchCancelOrdersExample.java index e01d3ba9f..bbef23dac 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/BatchCancelOrdersExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/BatchCancelOrdersExample.java @@ -42,7 +42,7 @@ public W3WPredictionRestApi getApi() { * normalize URLs): - **Python:** use `http.client` (stdlib) and hand-build the body * string. - **Java:** use `HttpURLConnection` and write the raw body bytes directly. * - **Go:** use `strings.NewReader` with a hand-built body instead of - * `url.Values.Encode()`. Weight(IP): 200 Security Type: PREDICTION_TRADE Notes: - Use + * `url.Values.Encode()`. Weight(IP): 1 Security Type: PREDICTION_TRADE Notes: - Use * dot notation for nested list fields: `cancelInfoList[0].orderId`, * `cancelInfoList[1].orderId`, etc. - `vendor` does not need to be * supplied. The server automatically sets the correct vendor (`predict_fun`) for diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/GetQuoteExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/GetQuoteExample.java index 6812f9548..5bcb3d1cd 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/GetQuoteExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/GetQuoteExample.java @@ -33,7 +33,7 @@ public W3WPredictionRestApi getApi() { * Get Quote (PREDICTION_TRADE) * *

Get a price quote for a prediction order. The returned `quoteId` must be used in - * the subsequent Place Order request. Weight(IP): 200 Security Type: PREDICTION_TRADE Response + * the subsequent Place Order request. Weight(IP): 1 Security Type: PREDICTION_TRADE Response * Notes: - `feeAmount` is a string because it is denominated in wei (18 decimals) and * may exceed JavaScript's safe integer range. `feeDiscountBps` is also a string * to allow fractional basis-point values in the future. `feeRateBps` and diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/PlaceOrderExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/PlaceOrderExample.java index 85df2fec0..8ed3a124e 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/PlaceOrderExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/PlaceOrderExample.java @@ -33,7 +33,7 @@ public W3WPredictionRestApi getApi() { * Place Order (PREDICTION_TRADE) * *

Place a prediction order using a previously obtained quote. Requires SAS authorization. - * Weight(IP): 200 Security Type: PREDICTION_TRADE Notes: - Validation rules: | orderType | + * Weight(IP): 1 Security Type: PREDICTION_TRADE Notes: - Validation rules: | orderType | * timeInForce | priceLimit | | --------- | ------------- | --------------------- | | * `MARKET` | Must be `FOK` | Not required | | `LIMIT` | Must be * `GTC` | Required, must be > 0 | diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/QueryActiveOrdersExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/QueryActiveOrdersExample.java index 09bd89561..c7040c988 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/QueryActiveOrdersExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/QueryActiveOrdersExample.java @@ -30,7 +30,7 @@ public W3WPredictionRestApi getApi() { /** * Query Active Orders (PREDICTION_TRADE) * - *

Get active (open) prediction orders for the authenticated user. Weight(IP): 200 Security + *

Get active (open) prediction orders for the authenticated user. Weight(IP): 1 Security * Type: PREDICTION_TRADE * * @throws ApiException if the Api call fails diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/QueryOrderHistoryExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/QueryOrderHistoryExample.java index 67b0a0260..62f085585 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/QueryOrderHistoryExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/trade/QueryOrderHistoryExample.java @@ -31,7 +31,7 @@ public W3WPredictionRestApi getApi() { * Query Order History (PREDICTION_TRADE) * *

Get historical prediction orders (all statuses) for the authenticated user, with optional - * filters. Weight(IP): 200 Security Type: PREDICTION_TRADE + * filters. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @throws ApiException if the Api call fails */ diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/ApplyMmDepositExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/ApplyMmDepositExample.java index 5cbb2be32..fe48841bb 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/ApplyMmDepositExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/ApplyMmDepositExample.java @@ -33,7 +33,7 @@ public W3WPredictionRestApi getApi() { * *

Move funds from the user's bound CeDeFi MPC wallet to their CEX account (SPOT/FUNDING) * via a contract escrow + credit flow. The maker wallet is resolved server-side by - * `userId`; the caller does not pass wallet or signature. Weight(IP): 200 Security + * `userId`; the caller does not pass wallet or signature. Weight(IP): 1 Security * Type: PREDICTION_TRADE Notes: - Restricted to authorized market makers. Requests from * unauthorized accounts are rejected — contact BD to request access. - \"Note on * `fromToken` / `toToken`: typically the same symbol (e.g. both diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/ApplyMmWithdrawExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/ApplyMmWithdrawExample.java index 2d9a5a7ef..af0503c63 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/ApplyMmWithdrawExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/ApplyMmWithdrawExample.java @@ -34,7 +34,7 @@ public W3WPredictionRestApi getApi() { * wallet address. Unlike `v1/capital/withdraw/apply`, the caller does NOT pass * `address`; the backend resolves the user's bound CeDeFi MPC wallet address by * `userId` and reuses the existing capital withdraw flow with that address as the - * target. Weight(IP): 200 Security Type: PREDICTION_TRADE Notes: - Restricted to authorized + * target. Weight(IP): 1 Security Type: PREDICTION_TRADE Notes: - Restricted to authorized * market makers. Requests from unauthorized accounts are rejected — contact BD to request * access. - walletType Validation: | Value | Behavior | | --------------- | * ------------------------------- | | `null` | Allowed — defaults to SPOT | | diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/CreateInboundTransferExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/CreateInboundTransferExample.java index 9333f753a..241dae5c5 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/CreateInboundTransferExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/CreateInboundTransferExample.java @@ -35,7 +35,7 @@ public W3WPredictionRestApi getApi() { * FUNDING). Requires SAS authorization. ⚠️ **SAS Authorization Required:** This endpoint * enforces SAS (Self-Authorization Service) authorization. If SAS is not enabled for the * wallet, the request will be rejected with `-31003 SAS authorization required`. - * Enable SAS for your wallet before calling this endpoint. Weight(IP): 200 Security Type: + * Enable SAS for your wallet before calling this endpoint. Weight(IP): 1 Security Type: * PREDICTION_TRADE * * @throws ApiException if the Api call fails diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/CreateOutboundTransferExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/CreateOutboundTransferExample.java index b1784534c..7a9c314b2 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/CreateOutboundTransferExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/CreateOutboundTransferExample.java @@ -33,7 +33,7 @@ public W3WPredictionRestApi getApi() { * Create Outbound Transfer (PREDICTION_TRADE) * *

Transfer funds from the user's CEX account (SPOT or FUNDING) into the prediction - * wallet. Requires SAS authorization. Weight(IP): 200 Security Type: PREDICTION_TRADE + * wallet. Requires SAS authorization. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @throws ApiException if the Api call fails */ diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/QueryTransferListExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/QueryTransferListExample.java index acf98e3b2..f982235d6 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/QueryTransferListExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/QueryTransferListExample.java @@ -31,7 +31,7 @@ public W3WPredictionRestApi getApi() { * Query Transfer List (PREDICTION_TRADE) * *

Get the authenticated user's prediction wallet transfer history within a date range. - * Weight(IP): 200 Security Type: PREDICTION_TRADE + * Weight(IP): 1 Security Type: PREDICTION_TRADE * * @throws ApiException if the Api call fails */ diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/QueryTransferStatusExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/QueryTransferStatusExample.java index d00769365..8c3a04aef 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/QueryTransferStatusExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/transfer/QueryTransferStatusExample.java @@ -32,7 +32,7 @@ public W3WPredictionRestApi getApi() { *

Query the current status of a prediction wallet transfer by transfer ID. * **`status` values:** Terminal states are `COMPLETED` and * `FAILED`. Intermediate states are `PROCESSING` and `PENDING`. - * **Do not** poll for `SUCCESS` — it is not a valid terminal state. Weight(IP): 200 + * **Do not** poll for `SUCCESS` — it is not a valid terminal state. Weight(IP): 1 * Security Type: PREDICTION_TRADE * * @throws ApiException if the Api call fails diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetPortfolioExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetPortfolioExample.java index f7127e5a4..720c731a5 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetPortfolioExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetPortfolioExample.java @@ -30,8 +30,7 @@ public W3WPredictionRestApi getApi() { * Get Portfolio (PREDICTION_TRADE) * *

Get the authenticated user's prediction portfolio overview including active positions - * count, aggregated PnL, and full position list. Weight(IP): 200 Security Type: - * PREDICTION_TRADE + * count, aggregated PnL, and full position list. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @throws ApiException if the Api call fails */ diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetQuotaStatusExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetQuotaStatusExample.java index e10fe4708..32d14651f 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetQuotaStatusExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/GetQuotaStatusExample.java @@ -30,7 +30,7 @@ public W3WPredictionRestApi getApi() { * Get Quota Status (PREDICTION_TRADE) * *

Query the current user's daily trading quota limit and remaining allowance for - * prediction markets. Weight(IP): 200 Security Type: PREDICTION_TRADE + * prediction markets. Weight(IP): 1 Security Type: PREDICTION_TRADE * * @throws ApiException if the Api call fails */ diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/ListPredictionWalletsExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/ListPredictionWalletsExample.java index 1de3c5092..e167f6e12 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/ListPredictionWalletsExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/ListPredictionWalletsExample.java @@ -29,7 +29,7 @@ public W3WPredictionRestApi getApi() { /** * List Prediction Wallets (PREDICTION_TRADE) * - *

Get all prediction wallets registered for the authenticated user. Weight(IP): 200 Security + *

Get all prediction wallets registered for the authenticated user. Weight(IP): 1 Security * Type: PREDICTION_TRADE * * @throws ApiException if the Api call fails diff --git a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/QueryPaymentOptionBalancesExample.java b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/QueryPaymentOptionBalancesExample.java index 5678f2160..160ce36f3 100644 --- a/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/QueryPaymentOptionBalancesExample.java +++ b/examples/w3w-prediction/src/main/java/com/binance/connector/client/w3w_prediction/rest/wallet/QueryPaymentOptionBalancesExample.java @@ -30,7 +30,7 @@ public W3WPredictionRestApi getApi() { * Query Payment Option Balances (PREDICTION_TRADE) * *

Get available balances for each payment option that can be used for prediction trading. - * Weight(IP): 200 Security Type: PREDICTION_TRADE + * Weight(IP): 1 Security Type: PREDICTION_TRADE * * @throws ApiException if the Api call fails */ diff --git a/examples/wallet/pom.xml b/examples/wallet/pom.xml index d70535d49..2429308c3 100644 --- a/examples/wallet/pom.xml +++ b/examples/wallet/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-wallet - 6.2.0 + 6.2.1 \ No newline at end of file diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetCountryListExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetCountryListExample.java index 4d2517020..6bf468254 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetCountryListExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetCountryListExample.java @@ -28,8 +28,8 @@ public WalletRestApi getApi() { /** * Get Country List (USER_DATA) * - *

Query the active country list for travel rule questionnaires. Currently, only supports AU - * entity. Weight(IP): 1 Security Type: USER_DATA + *

Query the active country list for travel rule questionnaires. Currently supports AU and BR + * entities. Weight(IP): 1 Security Type: USER_DATA * * @throws ApiException if the Api call fails */