Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Since this repository contains auto-generated code using OpenAPI Generator, we e
2. Allow maintainers to implement necessary changes through the code generation process

## Examples
**Wallet**: [Rest API](clients/web3-wallet/example_rest.md)
**Wallet**: [Rest API](clients/web3-wallet/example_rest.md) - [WebSocket Streams](clients/web3-wallet/example_websocket_stream.md)

## License

Expand Down
4 changes: 2 additions & 2 deletions clients/web3-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@

<artifactId>binance-web3-common</artifactId>
<name>web3-common</name>
<version>1.1.0</version>
<version>1.1.1</version>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>io.github.binance</groupId>
<artifactId>binance-common</artifactId>
<version>2.5.0</version>
<version>2.5.2</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,16 @@ public void applyToParams(
headerParams.put("X-OC-APIKEY", apiKey);
headerParams.put("X-OC-TIMESTAMP", timestamp);
String allParametersAsString = joinQueryParameters(queryParams);
String querySeparator = "";
if (!queryParams.isEmpty()) {
querySeparator = "?";
}

if (HttpMethod.requiresRequestBody(method) && StringUtils.isNotEmpty(payload)) {
allParametersAsString += payload;
}

String preHash = timestamp + method + uri.getPath() + (StringUtils.isNotEmpty(allParametersAsString) ? "?" + allParametersAsString : "");
String preHash = timestamp + method + uri.getPath() + (StringUtils.isNotEmpty(allParametersAsString) ? querySeparator + allParametersAsString : "");
try {
headerParams.put("X-OC-SIGN", Base64.getEncoder().encodeToString(generator.sign(preHash)));
} catch (CryptoException e) {
Expand Down
4 changes: 4 additions & 0 deletions clients/web3-wallet/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 4.4.1 - 2026-09-28

- Fix signature generation for POST requests.

## 4.4.0 - 2026-09-21

### Added (1)
Expand Down
16 changes: 16 additions & 0 deletions clients/web3-wallet/docs/CandlestickStreamRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@


# CandlestickStreamRequest


## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**id** | **String** | Unique WebSocket request ID. | [optional] |
|**bar** | **String** | K-line interval. Enum: 1s, 5s, 30s, 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M. | [optional] |
|**chainId** | **String** | Chain identifier, e.g. \&quot;1\&quot;&#x3D;Ethereum, \&quot;56\&quot;&#x3D;BSC, \&quot;CT_501\&quot;&#x3D;Solana. Full supported-chain list: same as the [\&quot;supported/chain\&quot;](/catalog/web3-wallet/api/rest-api/general-data#get-supported-chains) endpoint. | [optional] |
|**contractAddress** | **String** | Token contract address. | [optional] |



13 changes: 13 additions & 0 deletions clients/web3-wallet/docs/CandlestickStreamResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@


# CandlestickStreamResponse

Candle data is a fixed 6-element positional array: [0]=open, [1]=high, [2]=low, [3]=close, [4]=volume (USD), [5]=start time in ms. Close [3] keeps changing while the candle is still open.

## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|



12 changes: 12 additions & 0 deletions clients/web3-wallet/docs/CandlestickStreamResponseInner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@


# CandlestickStreamResponseInner


## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|



260 changes: 260 additions & 0 deletions clients/web3-wallet/docs/MarketApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
# MarketApi

All URIs are relative to *http://localhost*

| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**candlestickStream**](MarketApi.md#candlestickStream) | **POST** /w3w@onchainos@pub@candles@&lt;bar&gt;@&lt;chainId&gt;@&lt;contractAddress&gt; | Candlestick Stream |
| [**marketStatsStream**](MarketApi.md#marketStatsStream) | **POST** /w3w@onchainos@pub@tx-data@&lt;chainId&gt;@&lt;contractAddress&gt; | Market Stats Stream |
| [**priceStream**](MarketApi.md#priceStream) | **POST** /w3w@onchainos@pub@price@&lt;chainId&gt;@&lt;contractAddress&gt; | Price Stream |
| [**realTimeTradesStream**](MarketApi.md#realTimeTradesStream) | **POST** /w3w@onchainos@pub@tx@&lt;chainId&gt;@&lt;contractAddress&gt; | Real-Time Trades Stream |


<a id="candlestickStream"></a>
# **candlestickStream**
> CandlestickStreamResponse candlestickStream(candlestickStreamRequest)

Candlestick Stream

Push token candlestick (K-line) data in real time. The current (unclosed) candle keeps updating as new trades occur. Update Speed: Real-time

### Example
```java
// Import classes:
import com.binance.connector.client.web3_wallet.ApiClient;
import com.binance.connector.client.web3_wallet.ApiException;
import com.binance.connector.client.web3_wallet.Configuration;
import com.binance.connector.client.web3_wallet.models.*;
import com.binance.connector.client.web3_wallet.websocket.stream.api.MarketApi;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");

MarketApi apiInstance = new MarketApi(defaultClient);
CandlestickStreamRequest candlestickStreamRequest = new CandlestickStreamRequest(); // CandlestickStreamRequest |
try {
CandlestickStreamResponse result = apiInstance.candlestickStream(candlestickStreamRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MarketApi#candlestickStream");
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 |
|------------- | ------------- | ------------- | -------------|
| **candlestickStreamRequest** | [**CandlestickStreamRequest**](CandlestickStreamRequest.md)| | |

### Return type

[**CandlestickStreamResponse**](CandlestickStreamResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Candles stream payload. | - |

<a id="marketStatsStream"></a>
# **marketStatsStream**
> MarketStatsStreamResponse marketStatsStream(marketStatsStreamRequest)

Market Stats Stream

Push token market data. Rate-limited to at most once per second per token: if a token&#39;s data changes within a 1-second window, the latest snapshot is pushed once (multiple changes are coalesced into the latest value); if there is no change, nothing is pushed. Update Speed: Real-time

### Example
```java
// Import classes:
import com.binance.connector.client.web3_wallet.ApiClient;
import com.binance.connector.client.web3_wallet.ApiException;
import com.binance.connector.client.web3_wallet.Configuration;
import com.binance.connector.client.web3_wallet.models.*;
import com.binance.connector.client.web3_wallet.websocket.stream.api.MarketApi;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");

MarketApi apiInstance = new MarketApi(defaultClient);
MarketStatsStreamRequest marketStatsStreamRequest = new MarketStatsStreamRequest(); // MarketStatsStreamRequest |
try {
MarketStatsStreamResponse result = apiInstance.marketStatsStream(marketStatsStreamRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MarketApi#marketStatsStream");
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 |
|------------- | ------------- | ------------- | -------------|
| **marketStatsStreamRequest** | [**MarketStatsStreamRequest**](MarketStatsStreamRequest.md)| | |

### Return type

[**MarketStatsStreamResponse**](MarketStatsStreamResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | TX data stream payload. | - |

<a id="priceStream"></a>
# **priceStream**
> PriceStreamResponse priceStream(priceStreamRequest)

Price Stream

Push token price updates. Triggered every time a token&#39;s price changes. Update Speed: Real-time

### Example
```java
// Import classes:
import com.binance.connector.client.web3_wallet.ApiClient;
import com.binance.connector.client.web3_wallet.ApiException;
import com.binance.connector.client.web3_wallet.Configuration;
import com.binance.connector.client.web3_wallet.models.*;
import com.binance.connector.client.web3_wallet.websocket.stream.api.MarketApi;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");

MarketApi apiInstance = new MarketApi(defaultClient);
PriceStreamRequest priceStreamRequest = new PriceStreamRequest(); // PriceStreamRequest |
try {
PriceStreamResponse result = apiInstance.priceStream(priceStreamRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MarketApi#priceStream");
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 |
|------------- | ------------- | ------------- | -------------|
| **priceStreamRequest** | [**PriceStreamRequest**](PriceStreamRequest.md)| | |

### Return type

[**PriceStreamResponse**](PriceStreamResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Price stream payload. | - |

<a id="realTimeTradesStream"></a>
# **realTimeTradesStream**
> RealTimeTradesStreamResponse realTimeTradesStream(realTimeTradesStreamRequest)

Real-Time Trades Stream

Push real-time token trade history. Triggered on every new transaction. Update Speed: Real-time

### Example
```java
// Import classes:
import com.binance.connector.client.web3_wallet.ApiClient;
import com.binance.connector.client.web3_wallet.ApiException;
import com.binance.connector.client.web3_wallet.Configuration;
import com.binance.connector.client.web3_wallet.models.*;
import com.binance.connector.client.web3_wallet.websocket.stream.api.MarketApi;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");

MarketApi apiInstance = new MarketApi(defaultClient);
RealTimeTradesStreamRequest realTimeTradesStreamRequest = new RealTimeTradesStreamRequest(); // RealTimeTradesStreamRequest |
try {
RealTimeTradesStreamResponse result = apiInstance.realTimeTradesStream(realTimeTradesStreamRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MarketApi#realTimeTradesStream");
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 |
|------------- | ------------- | ------------- | -------------|
| **realTimeTradesStreamRequest** | [**RealTimeTradesStreamRequest**](RealTimeTradesStreamRequest.md)| | |

### Return type

[**RealTimeTradesStreamResponse**](RealTimeTradesStreamResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Trade history stream payload. | - |

15 changes: 15 additions & 0 deletions clients/web3-wallet/docs/MarketStatsStreamRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@


# MarketStatsStreamRequest


## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**id** | **String** | Unique WebSocket request ID. | [optional] |
|**chainId** | **String** | Chain identifier, e.g. \&quot;1\&quot;&#x3D;Ethereum, \&quot;56\&quot;&#x3D;BSC, \&quot;CT_501\&quot;&#x3D;Solana. Full supported-chain list: same as the [\&quot;supported/chain\&quot;](/catalog/web3-wallet/api/rest-api/general-data#get-supported-chains) endpoint. | [optional] |
|**contractAddress** | **String** | Token contract address. | [optional] |



Loading
Loading