-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathapi_limit.go
More file actions
36 lines (32 loc) · 927 Bytes
/
api_limit.go
File metadata and controls
36 lines (32 loc) · 927 Bytes
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
package bybit_connector
import (
"context"
"net/http"
"github.com/bybit-exchange/bybit.go.api/handlers"
)
// QueryCap
func (s *BybitClientRequest) QueryCap(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/apilimit/query-cap",
secType: secTypeSigned,
}
data, err := SendRequest(ctx, opts, r, s, err)
return GetServerResponse(err, data)
}
// QueryAll
func (s *BybitClientRequest) QueryAll(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/apilimit/query-all",
secType: secTypeSigned,
}
data, err := SendRequest(ctx, opts, r, s, err)
return GetServerResponse(err, data)
}