-
Notifications
You must be signed in to change notification settings - Fork 33
/
pre_upgrade.go
85 lines (78 loc) · 2.58 KB
/
pre_upgrade.go
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
package bybit_connector
import (
"context"
"github.com/wuhewuhe/bybit.go.api/handlers"
"net/http"
)
func (s *BybitClientRequest) GetPreUpgradeOrderHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) {
if err = handlers.ValidateParams(s.params); err != nil {
return nil, err
}
r := &request{
method: http.MethodGet,
endpoint: "/v5/pre-upgrade/order/history",
secType: secTypeSigned,
}
data := SendRequest(ctx, opts, r, s, err)
return GetServerResponse(err, data)
}
func (s *BybitClientRequest) GetPreUpgradeTradeHistory(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) {
if err = handlers.ValidateParams(s.params); err != nil {
return nil, err
}
r := &request{
method: http.MethodGet,
endpoint: "/v5/pre-upgrade/execution/list",
secType: secTypeSigned,
}
data := SendRequest(ctx, opts, r, s, err)
return GetServerResponse(err, data)
}
func (s *BybitClientRequest) GetPreUpgradeClosedPnl(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) {
if err = handlers.ValidateParams(s.params); err != nil {
return nil, err
}
r := &request{
method: http.MethodGet,
endpoint: "/v5/pre-upgrade/position/closed-pnl",
secType: secTypeSigned,
}
data := SendRequest(ctx, opts, r, s, err)
return GetServerResponse(err, data)
}
func (s *BybitClientRequest) GetPreUpgradeTransactionLog(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) {
if err = handlers.ValidateParams(s.params); err != nil {
return nil, err
}
r := &request{
method: http.MethodGet,
endpoint: "/v5/pre-upgrade/account/transaction-log",
secType: secTypeSigned,
}
data := SendRequest(ctx, opts, r, s, err)
return GetServerResponse(err, data)
}
func (s *BybitClientRequest) GetPreUpgradeOptionDeliveryRecord(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) {
if err = handlers.ValidateParams(s.params); err != nil {
return nil, err
}
r := &request{
method: http.MethodGet,
endpoint: "/v5/pre-upgrade/asset/delivery-record",
secType: secTypeSigned,
}
data := SendRequest(ctx, opts, r, s, err)
return GetServerResponse(err, data)
}
func (s *BybitClientRequest) GetPreUpgradeUsdcSettlement(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) {
if err = handlers.ValidateParams(s.params); err != nil {
return nil, err
}
r := &request{
method: http.MethodGet,
endpoint: "/v5/pre-upgrade/asset/settlement-record",
secType: secTypeSigned,
}
data := SendRequest(ctx, opts, r, s, err)
return GetServerResponse(err, data)
}