-
Notifications
You must be signed in to change notification settings - Fork 239
Expand file tree
/
Copy pathMixTraceServiceTest.java
More file actions
90 lines (76 loc) · 3.23 KB
/
MixTraceServiceTest.java
File metadata and controls
90 lines (76 loc) · 3.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
package com.bitget.openapi.mix;
import com.alibaba.fastjson.JSON;
import com.bitget.openapi.BaseTest;
import com.bitget.openapi.common.enums.mix.MixProductTypeEnum;
import com.bitget.openapi.dto.request.mix.MixCloseTrackOrderRequest;
import com.bitget.openapi.dto.response.ResponseResult;
import org.junit.Test;
import java.io.IOException;
public class MixTraceServiceTest extends BaseTest {
static String symbol = "BTCUSDT_UMCBL";
static long trackingNo = 0L;
static int pageSize = 10;
static int pageNo = 1;
static String date = "";
static String startTime = "";
static String endTime = "";
@Test
public void closeTraceOrder() throws IOException {
MixCloseTrackOrderRequest build = MixCloseTrackOrderRequest.builder()
.symbol(symbol)
.trackingNo(trackingNo)
.build();
ResponseResult result = bitgetRestClient.mix().bitget().trace().closeTraceOrder(build);
System.out.println(JSON.toJSONString(result));
}
@Test
public void currentTrack() throws IOException {
ResponseResult result = bitgetRestClient.mix().bitget().trace().currentTrack(symbol, MixProductTypeEnum.UMCBL.getCode(),pageSize,pageNo);
System.out.println(JSON.toJSONString(result));
}
@Test
public void historyTrack() throws IOException {
ResponseResult result = bitgetRestClient.mix().bitget().trace().historyTrack(startTime,endTime,pageSize,pageNo);
System.out.println(JSON.toJSONString(result));
}
//passed
@Test
public void summary() throws IOException {
ResponseResult result = bitgetRestClient.mix().bitget().trace().summary();
System.out.println(JSON.toJSONString(result));
}
//passed
@Test
public void profitSettleTokenIdGroup() throws IOException {
ResponseResult result = bitgetRestClient.mix().bitget().trace().profitSettleTokenIdGroup();
System.out.println(JSON.toJSONString(result));
}
//passed
@Test
public void profitDateGroupList() throws IOException {
ResponseResult result = bitgetRestClient.mix().bitget().trace().profitDateGroupList(pageSize,pageNo);
System.out.println(JSON.toJSONString(result));
}
@Test
public void profitDateList() throws IOException {
ResponseResult result = bitgetRestClient.mix().bitget().trace().profitDateList(symbol,date,pageSize,pageNo);
System.out.println(JSON.toJSONString(result));
}
//passed
@Test
public void waitProfitDateList() throws IOException {
ResponseResult result = bitgetRestClient.mix().bitget().trace().waitProfitDateList(pageSize,pageNo);
System.out.println(JSON.toJSONString(result));
}
@Test
public void followerHistoryOrders() throws IOException {
ResponseResult result = bitgetRestClient.mix().bitget().trace().followerHistoryOrders("10","1","1635782400000","1635852263953");
System.out.println(JSON.toJSONString(result));
}
//passed
@Test
public void followerOpenOrders() throws IOException {
ResponseResult result = bitgetRestClient.mix().bitget().trace().followerOpenOrders(symbol,MixProductTypeEnum.UMCBL.getCode(),10,1);
System.out.println(JSON.toJSONString(result));
}
}