forked from VictorFrWu/bybit.go.api
-
Notifications
You must be signed in to change notification settings - Fork 14
/
broker.go
46 lines (42 loc) · 1.32 KB
/
broker.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
package bybit_connector
import (
"context"
"github.com/wuhewuhe/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 := 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 := 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 := SendRequest(ctx, opts, r, s, err)
return GetServerResponse(err, data)
}