Path: blob/master/bitget-java-sdk-api/src/test/java/com/bitget/openapi/BaseTest.java
518 views
package com.bitget.openapi;12import com.bitget.openapi.common.client.BitgetRestClient;3import com.bitget.openapi.common.domain.ClientParameter;4import com.bitget.openapi.common.enums.SignTypeEnum;5import com.bitget.openapi.common.enums.SupportedLocaleEnum;6import org.junit.After;7import org.junit.Before;89/**10* @author bitget-sdk-team11* @date 2019-01-1512*/13public class BaseTest {1415/**16* 用户 apiKey 替换成自己的17*/18private final String apiKey = "";1920/**21* 用户 secretKey 替换成自己的22*/23private final String secretKey = "";2425/**26* 口令 替换成自己的27*/28private final String passphrase = "";2930/**31* bitget open api 根路径32*/33private final String baseUrl = "https://api.bitget.com";3435private final ClientParameter parameter = ClientParameter.builder()36.apiKey(apiKey)37.secretKey(secretKey)38.passphrase(passphrase)39.baseUrl(baseUrl)40//.signType(SignTypeEnum.RSA) // 如果你的apikey是RSA类型则主动设置41.locale(SupportedLocaleEnum.ZH_CN.getName())42.build();43public BitgetRestClient bitgetRestClient;4445@Before46public void setup() {47bitgetRestClient = BitgetRestClient.builder().configuration(parameter).build();48}4950@After51public void tearDown() {52}53}545556