Skip to content
Open
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
31 changes: 31 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/configuration-reference
version: 2.1

# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/jobs-steps/#jobs-overview & https://circleci.com/docs/configuration-reference/#jobs
jobs:
say-hello:
# Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub.
# See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job
docker:
# Specify the version you desire here
# See: https://circleci.com/developer/images/image/cimg/base
- image: cimg/base:current

# Add steps to the job
# See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps
steps:
# Checkout the code as the first step.
- checkout
- run:
name: "Say hello"
command: "echo Hello, World!"

# Orchestrate jobs using workflows
# See: https://circleci.com/docs/workflows/ & https://circleci.com/docs/configuration-reference/#workflows
workflows:
say-hello-workflow: # This is the name of the workflow, feel free to change it to better match your workflow.
# Inside the workflow, you define the jobs you want to run.
jobs:
- say-hello
23 changes: 23 additions & 0 deletions .circleci/gemini_ai.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: 2.1
executors:
my-custom-executor:
docker:
- image: cimg/base:stable
auth:
# ensure you have first added these secrets
# visit app.circleci.com/settings/project/github/Dargon789/binance/environment-variables
username: $DOCKER_HUB_USER
password: $DOCKER_HUB_PASSWORD
jobs:
my-job-name:

executor: my-custom-executor
steps:
- checkout
- run: |
# echo Hello, World!

workflows:
my-custom-workflow:
jobs:
- my-job-name
4 changes: 2 additions & 2 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ For Futures (COIN-M Futures package):
</dependency>
```

### **Step 3: Update Imports**
### **Step 2: Update Imports**

Update your import paths:

Expand Down Expand Up @@ -129,7 +129,7 @@ The new structure introduces a more modular approach to client initialization.
DerivativesTradingCoinFuturesRestApi api = new DerivativesTradingCoinFuturesRestApi(clientConfiguration);

Long recvWindow = 5000L;
ApiResponse<AccountInformationResponse> response = getApi().accountInformation(recvWindow);
ApiResponse<AccountInformationResponse> response = api.accountInformation(recvWindow);
System.out.println(response.getData());
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1717,37 +1717,29 @@ private void applySslSettings() {
try {
TrustManager[] trustManagers;
HostnameVerifier hostnameVerifier;
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
if (!verifyingSsl) {
trustManagers =
new TrustManager[] {
new X509TrustManager() {
@Override
public void checkClientTrusted(
java.security.cert.X509Certificate[] chain, String authType)
throws CertificateException {}

@Override
public void checkServerTrusted(
java.security.cert.X509Certificate[] chain, String authType)
throws CertificateException {}

@Override
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
return new java.security.cert.X509Certificate[] {};
}
}
};
hostnameVerifier =
new HostnameVerifier() {
@Override
public boolean verify(String hostname, SSLSession session) {
return true;
}
};
if (sslCaCert == null) {
throw new IllegalStateException("SSL verification is disabled, but no trusted certificate provided in sslCaCert. Refusing to trust all certificates for security reasons.");
} else {
char[] password = null; // Any password will work.
CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509");
Collection<? extends Certificate> certificates =
certificateFactory.generateCertificates(sslCaCert);
if (certificates.isEmpty()) {
throw new IllegalArgumentException(
"expected non-empty set of trusted certificates");
}
KeyStore caKeyStore = newEmptyKeyStore(password);
int index = 0;
for (Certificate certificate : certificates) {
String certificateAlias = "ca" + (index++);
caKeyStore.setCertificateEntry(certificateAlias, certificate);
}
trustManagerFactory.init(caKeyStore);
}
hostnameVerifier = OkHostnameVerifier.INSTANCE;
} else {
TrustManagerFactory trustManagerFactory =
TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());

if (sslCaCert == null) {
trustManagerFactory.init((KeyStore) null);
} else {
Expand All @@ -1767,8 +1759,9 @@ public boolean verify(String hostname, SSLSession session) {
}
trustManagerFactory.init(caKeyStore);
}
trustManagers = trustManagerFactory.getTrustManagers();
hostnameVerifier = OkHostnameVerifier.INSTANCE;
trustManagers = trustManagerFactory.getTrustManagers();

}

SSLContext sslContext = SSLContext.getInstance("TLS");
Expand Down