import java.util.*; import java.util.zip.*; import java.util.List; import java.util.regex.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; import java.util.concurrent.locks.*; import java.util.function.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.text.*; import javax.swing.table.*; import java.io.*; import java.net.*; import java.lang.reflect.*; import java.lang.ref.*; import java.lang.management.*; import java.security.*; import java.security.spec.*; import java.awt.*; import java.awt.event.*; import java.awt.image.*; import java.awt.geom.*; import javax.imageio.*; import java.math.*; import java.time.Duration; import java.lang.invoke.VarHandle; import java.lang.invoke.MethodHandles; import com.bitget.openapi.ws.*; import com.alibaba.fastjson.JSONObject; class main { // BitGet Java SDK static BitgetWsHandle.BitgetClientBuilder bitGetWSClientBuilder(BitGetCredentials cred) { String PUSH_URL = "wss://ws.bitget.com/mix/v1/stream"; return BitgetWsHandle.builder() .pushUrl(PUSH_URL) .apiKey(cred.apiKey()) .secretKey(cred.secretKey()) .passPhrase(cred.passphrase()) .isLogin(true); } static class BitGetCredentials { final public BitGetCredentials setApiKey(String apiKey){ return apiKey(apiKey); } public BitGetCredentials apiKey(String apiKey) { this.apiKey = apiKey; return this; } final public String getApiKey(){ return apiKey(); } public String apiKey() { return apiKey; } String apiKey; final public BitGetCredentials setPassphrase(String passphrase){ return passphrase(passphrase); } public BitGetCredentials passphrase(String passphrase) { this.passphrase = passphrase; return this; } final public String getPassphrase(){ return passphrase(); } public String passphrase() { return passphrase; } String passphrase; final public BitGetCredentials setSecretKey(String secretKey){ return secretKey(secretKey); } public BitGetCredentials secretKey(String secretKey) { this.secretKey = secretKey; return this; } final public String getSecretKey(){ return secretKey(); } public String secretKey() { return secretKey; } String secretKey; } }