Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bitgetlimited
GitHub Repository: bitgetlimited/v3-bitget-api-sdk
Path: blob/master/bitget-java-sdk-api/src/test/java/com/bitget/openapi/BaseTest.java
518 views
1
package com.bitget.openapi;
2
3
import com.bitget.openapi.common.client.BitgetRestClient;
4
import com.bitget.openapi.common.domain.ClientParameter;
5
import com.bitget.openapi.common.enums.SignTypeEnum;
6
import com.bitget.openapi.common.enums.SupportedLocaleEnum;
7
import org.junit.After;
8
import org.junit.Before;
9
10
/**
11
* @author bitget-sdk-team
12
* @date 2019-01-15
13
*/
14
public class BaseTest {
15
16
/**
17
* 用户 apiKey 替换成自己的
18
*/
19
private final String apiKey = "";
20
21
/**
22
* 用户 secretKey 替换成自己的
23
*/
24
private final String secretKey = "";
25
26
/**
27
* 口令 替换成自己的
28
*/
29
private final String passphrase = "";
30
31
/**
32
* bitget open api 根路径
33
*/
34
private final String baseUrl = "https://api.bitget.com";
35
36
private final ClientParameter parameter = ClientParameter.builder()
37
.apiKey(apiKey)
38
.secretKey(secretKey)
39
.passphrase(passphrase)
40
.baseUrl(baseUrl)
41
//.signType(SignTypeEnum.RSA) // 如果你的apikey是RSA类型则主动设置
42
.locale(SupportedLocaleEnum.ZH_CN.getName())
43
.build();
44
public BitgetRestClient bitgetRestClient;
45
46
@Before
47
public void setup() {
48
bitgetRestClient = BitgetRestClient.builder().configuration(parameter).build();
49
}
50
51
@After
52
public void tearDown() {
53
}
54
}
55
56