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
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ When creating WebSocket API clients (such as SpotWebSocketApi), you can follow:

**C2c**: [Rest API](clients/c2c/example_rest.md)

**CMS**: [WebSocket Streams](clients/cms/example_websocket_stream.md)

**Convert**: [Rest API](clients/convert/example_rest.md)

**Copy Trading**: [Rest API](clients/copy-trading/example_rest.md)
Expand Down Expand Up @@ -259,7 +261,7 @@ When creating WebSocket API clients (such as SpotWebSocketApi), you can follow:

**Vip Loan**: [Rest API](clients/vip-loan/example_rest.md)

**W3W Prediction**: [Rest API](clients/w3w-prediction/example_rest.md)
**W3W Prediction**: [Rest API](clients/w3w-prediction/example_rest.md) - [WebSocket Streams](clients/w3w-prediction/example_websocket_stream.md)

**Wallet**: [Rest API](clients/wallet/example_rest.md)

Expand Down
13 changes: 13 additions & 0 deletions clients/cms/docs/ComAnnouncementEnRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@


# ComAnnouncementEnRequest


## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**id** | **String** | Unique WebSocket request ID. | [optional] |



18 changes: 18 additions & 0 deletions clients/cms/docs/ComAnnouncementEnResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@


# ComAnnouncementEnResponse


## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**catalogId** | **Long** | Catalog ID | [optional] |
|**catalogName** | **String** | Catalog Name | [optional] |
|**publishDate** | **Long** | Publish timestamp (milliseconds) | [optional] |
|**title** | **String** | Announcement title | [optional] |
|**body** | **String** | Announcement body | [optional] |
|**disclaimer** | **String** | Disclaimer | [optional] |



67 changes: 67 additions & 0 deletions clients/cms/docs/DefaultApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# DefaultApi

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

| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**comAnnouncementEn**](DefaultApi.md#comAnnouncementEn) | **POST** /com_announcement_en | |


<a id="comAnnouncementEn"></a>
# **comAnnouncementEn**
> ComAnnouncementEnResponse comAnnouncementEn()



Receive push notifications hen Binance publishes announcements in English (language code: en).

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

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

DefaultApi apiInstance = new DefaultApi(defaultClient);
try {
ComAnnouncementEnResponse result = apiInstance.comAnnouncementEn();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#comAnnouncementEn");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**ComAnnouncementEnResponse**](ComAnnouncementEnResponse.md)

### Authorization

No authorization required

### HTTP request headers

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

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Binance announcements in English (language code: en) | - |

4 changes: 4 additions & 0 deletions clients/cms/example_websocket_stream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Default

[com_announcement_en](https://developers.binance.com/en/docs/products/announcements/announcement) - comAnnouncementEn - [ComAnnouncementEnExample.java:33](/examples/cms/src/main/java/com/binance/connector/client/cms/websocket/stream/defaultpkg/ComAnnouncementEnExample.java#L33)

37 changes: 37 additions & 0 deletions clients/cms/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>
<artifactId>binance-cms</artifactId>
<name>cms</name>
<version>1.0.0</version>
<packaging>jar</packaging>

<parent>
<groupId>io.github.binance</groupId>
<artifactId>binance-connector-java-clients</artifactId>
<version>1.1.4</version>
</parent>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>io.github.binance</groupId>
<artifactId>binance-common</artifactId>
<version>2.6.0</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package com.binance.connector.client.cms.websocket.stream;

import com.binance.connector.client.common.configuration.SignatureConfiguration;
import com.binance.connector.client.common.websocket.configuration.WebSocketClientConfiguration;

public class CmsWebSocketStreamsUtil {
private static final String BASE_URL = "wss://api.binance.com/sapi/wss";
private static final boolean HAS_TIME_UNIT = false;

public static WebSocketClientConfiguration getClientConfiguration() {
return getClientConfiguration("");
}

public static WebSocketClientConfiguration getClientConfiguration(String path) {
WebSocketClientConfiguration clientConfiguration = new WebSocketClientConfiguration();
if (!HAS_TIME_UNIT) {
clientConfiguration.setTimeUnit(null);
}
clientConfiguration.setAutoLogon(false);
return clientConfiguration;
}

public static WebSocketClientConfiguration getClientConfiguration(
SignatureConfiguration signatureConfiguration) {
WebSocketClientConfiguration clientConfiguration = getClientConfiguration();
clientConfiguration.setSignatureConfiguration(signatureConfiguration);
clientConfiguration.setUrl(getBaseUrl());
clientConfiguration.setPingIntervalTime(30000L);
return clientConfiguration;
}

public static String getBaseUrl() {
return BASE_URL;
}
}
Loading
Loading