-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy pathbroker.go
More file actions
88 lines (80 loc) · 2.61 KB
/
broker.go
File metadata and controls
88 lines (80 loc) · 2.61 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
package bybit_connector
import (
"context"
"github.com/bybit-exchange/bybit.go.api/handlers"
"net/http"
)
func (s *BybitClientRequest) GetBrokerEarning(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/broker/earnings-info",
secType: secTypeSigned,
}
data, err := SendRequest(ctx, opts, r, s, err)
return GetServerResponse(err, data)
}
func (s *BybitClientRequest) GetBrokerAccountInfo(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/broker/account-info",
secType: secTypeSigned,
}
data, err := SendRequest(ctx, opts, r, s, err)
return GetServerResponse(err, data)
}
func (s *BybitClientRequest) GetAllSubMembersDepositRecords(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/broker/asset/query-sub-member-deposit-record",
secType: secTypeSigned,
}
data, err := SendRequest(ctx, opts, r, s, err)
return GetServerResponse(err, data)
}
// Broker Reward
func (s *BybitClientRequest) QueryBrokerVoucherSpec(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) {
if err = handlers.ValidateParams(s.params); err != nil {
return nil, err
}
r := &request{
method: http.MethodPost,
endpoint: "/v5/broker/award/info",
secType: secTypeSigned,
}
data, err := SendRequest(ctx, opts, r, s, err)
return GetServerResponse(err, data)
}
func (s *BybitClientRequest) DistributeBrokerVoucher(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) {
if err = handlers.ValidateParams(s.params); err != nil {
return nil, err
}
r := &request{
method: http.MethodPost,
endpoint: "/v5/broker/award/distribute-award",
secType: secTypeSigned,
}
data, err := SendRequest(ctx, opts, r, s, err)
return GetServerResponse(err, data)
}
func (s *BybitClientRequest) QueryDistributedBrokerVoucher(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) {
if err = handlers.ValidateParams(s.params); err != nil {
return nil, err
}
r := &request{
method: http.MethodPost,
endpoint: "/v5/broker/award/distribution-record",
secType: secTypeSigned,
}
data, err := SendRequest(ctx, opts, r, s, err)
return GetServerResponse(err, data)
}
// Broker Reward End