Skip to content

Commit 6c688be

Browse files
committed
v3.0.5
1 parent 1018ec8 commit 6c688be

23 files changed

+342
-477
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 3.0.5 - 2024-10-03
2+
3+
### Removed
4+
- UM_Futures Porfolio Endpoints:
5+
- `GET fapi/v1/pmExchangeInfo`
6+
- `GET fapi/v1/pmAccountInfo`
7+
18
## 3.0.4 - 2024-01-10
29

310
### Fixed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
33
[![Code Style](https://img.shields.io/badge/code%20style-checkstyle-yellow)](https://checkstyle.org/checks.html)
44

5-
This is a lightweight library that works as a connector to the [Binance Futures API](https://binance-docs.github.io/apidocs/futures/en/)
5+
This is a lightweight library that works as a connector to the [Binance Futures API](https://developers.binance.com/docs/derivatives/Introduction)
66

77
- Supported APIs:
88
- `/fapi/*`
@@ -33,8 +33,8 @@ you should reconfigure the API_KEY and SECRET_KEY when using the library.
3333
### RESTful APIs
3434

3535
The endpoints are categorized according to the following API documentations:
36-
- [Binance USDⓈ-M Futures](https://binance-docs.github.io/apidocs/futures/en/#change-log)
37-
- [Binance COIN-M Futures](https://binance-docs.github.io/apidocs/delivery/en/#change-log)
36+
- [Binance USDⓈ-M Futures](https://developers.binance.com/docs/derivatives/usds-margined-futures/general-info)
37+
- [Binance COIN-M Futures](https://developers.binance.com/docs/derivatives/coin-margined-futures/general-info)
3838

3939
Each object corresponds to its category which will be used to call its respective endpoints.
4040

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>io.github.binance</groupId>
88
<artifactId>binance-futures-connector-java</artifactId>
9-
<version>3.0.4</version>
9+
<version>3.0.5</version>
1010
<packaging>jar</packaging>
1111
<name>${project.groupId}:${project.artifactId}</name>
1212
<description>lightweight connector to Futures API</description>

src/main/java/com/binance/connector/futures/client/FuturesClient.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@ public interface FuturesClient {
99
Market market();
1010
Account account();
1111
UserData userData();
12-
PortfolioMargin portfolioMargin();
12+
// Default implementation to make the method optional
13+
default PortfolioMargin portfolioMargin() {
14+
throw new UnsupportedOperationException("Portfolio Margin is not supported by this implementation.");
15+
}
1316
}

src/main/java/com/binance/connector/futures/client/impl/CMWebsocketClientImpl.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
/**
1010
* <h2>COIN-M Websocket Streams</h2>
1111
* All stream endpoints under the
12-
* <a href="https://binance-docs.github.io/apidocs/delivery/en/#websocket-market-streams"> Websocket Market Streams</a> and
13-
* <a href="https://binance-docs.github.io/apidocs/delivery/en/#user-data-streams"> User Data Streams</a>
12+
* <a href="https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Connect"> Websocket Market Streams</a> and
13+
* <a href="https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Connect"> User Data Streams</a>
1414
* section of the API documentation will be implemented in this class.
1515
* <br>
1616
* Response will be returned as callback.
@@ -35,8 +35,8 @@ public CMWebsocketClientImpl(String baseUrl) {
3535
* @param speed speed in seconds, can be 1 or 3
3636
* @param onMessageCallback onMessageCallback
3737
* @return int - Connection ID
38-
* @see <a href="https://binance-docs.github.io/apidocs/delivery/en/#index-price-stream">
39-
* https://binance-docs.github.io/apidocs/delivery/en/#index-price-streams</a>
38+
* @see <a href="https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Index-Price-Stream">
39+
* https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Index-Price-Stream</a>
4040
*/
4141
public int indexPriceStream(String pair, int speed, WebSocketCallback onMessageCallback) {
4242
ParameterChecker.checkParameterType(pair, String.class, "pair");
@@ -77,8 +77,8 @@ public int indexPriceStream(String pair, int speed, WebSocketCallback onOpenCall
7777
* @param speed speed in seconds, can be 1 or 3
7878
* @param onMessageCallback onMessageCallback
7979
* @return int - Connection ID
80-
* @see <a href="https://binance-docs.github.io/apidocs/delivery/en/#mark-price-of-all-symbols-of-a-pair">
81-
* https://binance-docs.github.io/apidocs/delivery/en/#mark-price-of-all-symbols-of-a-pair</a>
80+
* @see <a href="https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Mark-Price-of-All-Symbols-of-a-Pair">
81+
* https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Mark-Price-of-All-Symbols-of-a-Pair</a>
8282
*/
8383
public int markPriceSymbolsPairStream(String pair, int speed, WebSocketCallback onMessageCallback) {
8484
ParameterChecker.checkParameterType(pair, String.class, "pair");
@@ -119,8 +119,8 @@ public int markPriceSymbolsPairStream(String pair, int speed, WebSocketCallback
119119
* @param interval kline interval - 1m 3m 5m 15m 30m 1h 2h 4h 6h 8h 12h 1d 3d 1w 1M
120120
* @param onMessageCallback onMessageCallback
121121
* @return int - Connection ID
122-
* @see <a href="https://binance-docs.github.io/apidocs/delivery/en/#index-kline-candlestick-streams">
123-
* https://binance-docs.github.io/apidocs/delivery/en/#index-kline-candlestick-streams</a>
122+
* @see <a href="https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Index-Kline-Candlestick-Streams">
123+
* https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Index-Kline-Candlestick-Streams</a>
124124
*/
125125
public int indexKlineCandlestick(String pair, String interval, WebSocketCallback onMessageCallback) {
126126
ParameterChecker.checkParameterType(pair, String.class, "pair");
@@ -155,8 +155,8 @@ public int indexKlineCandlestick(String pair, String interval, WebSocketCallback
155155
* @param interval kline interval - 1m 3m 5m 15m 30m 1h 2h 4h 6h 8h 12h 1d 3d 1w 1M
156156
* @param onMessageCallback onMessageCallback
157157
* @return int - Connection ID
158-
* @see <a href="https://binance-docs.github.io/apidocs/delivery/en/#mark-price-kline-candlestick-streams">
159-
* https://binance-docs.github.io/apidocs/delivery/en/#mark-price-kline-candlestick-streams</a>
158+
* @see <a href="https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Mark-Price-Kline-Candlestick-Streams">
159+
* https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Mark-Price-Kline-Candlestick-Streams</a>
160160
*/
161161
public int markKlineCandlestick(String symbol, String interval, WebSocketCallback onMessageCallback) {
162162
ParameterChecker.checkParameterType(symbol, String.class, "symbol");

src/main/java/com/binance/connector/futures/client/impl/UMFuturesClientImpl.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.binance.connector.futures.client.enums.DefaultUrls;
44
import com.binance.connector.futures.client.impl.um_futures.UMAccount;
55
import com.binance.connector.futures.client.impl.um_futures.UMMarket;
6-
import com.binance.connector.futures.client.impl.um_futures.UMPortfolioMargin;
76
import com.binance.connector.futures.client.impl.um_futures.UMUserData;
87

98
public class UMFuturesClientImpl extends FuturesClientImpl {
@@ -48,9 +47,4 @@ public UMAccount account() {
4847
public UMUserData userData() {
4948
return new UMUserData(getProductUrl(), getApiKey(), getShowLimitUsage(), getProxy());
5049
}
51-
52-
@Override
53-
public UMPortfolioMargin portfolioMargin() {
54-
return new UMPortfolioMargin(getProductUrl(), getApiKey(), getSecretKey(), getShowLimitUsage(), getProxy());
55-
}
5650
}

src/main/java/com/binance/connector/futures/client/impl/UMWebsocketClientImpl.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
/**
1010
* <h2>USDⓈ-M Websocket Streams</h2>
1111
* All stream endpoints under the
12-
* <a href="https://binance-docs.github.io/apidocs/futures/en/#websocket-market-streams"> Websocket Market Streams</a> and
13-
* <a href="https://binance-docs.github.io/apidocs/futures/en/#user-data-streams"> User Data Streams</a>
12+
* <a href="https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Connect"> Websocket Market Streams</a> and
13+
* <a href="https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Connect"> User Data Streams</a>
1414
* section of the API documentation will be implemented in this class.
1515
* <br>
1616
* Response will be returned as callback.
@@ -35,8 +35,8 @@ public UMWebsocketClientImpl(String baseUrl) {
3535
* @param speed speed in seconds, can be 1 or 3
3636
* @param onMessageCallback onMessageCallback
3737
* @return int - Connection ID
38-
* @see <a href="https://binance-docs.github.io/apidocs/futures/en/#mark-price-stream-for-all-market">
39-
* https://binance-docs.github.io/apidocs/futures/en/#mark-price-stream-for-all-market</a>
38+
* @see <a href="https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream">
39+
* https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream</a>
4040
*/
4141
public int allMarkPriceStream(int speed, WebSocketCallback onMessageCallback) {
4242
return allMarkPriceStream(speed, getNoopCallback(), onMessageCallback, getNoopCallback(), getNoopCallback());
@@ -73,8 +73,8 @@ public int allMarkPriceStream(int speed, WebSocketCallback onOpenCallback, WebSo
7373
* @param symbol trading symbol
7474
* @param onMessageCallback onMessageCallback
7575
* @return int - Connection ID
76-
* @see <a href="https://binance-docs.github.io/apidocs/futures/en/#composite-index-symbol-information-streams">
77-
* https://binance-docs.github.io/apidocs/futures/en/#composite-index-symbol-information-streams</a>
76+
* @see <a href="https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Composite-Index-Symbol-Information-Streams">
77+
* https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Composite-Index-Symbol-Information-Streams</a>
7878
*/
7979
public int compositeIndexSymbolInfo(String symbol, WebSocketCallback onMessageCallback) {
8080
ParameterChecker.checkParameterType(symbol, String.class, "symbol");

0 commit comments

Comments
 (0)