-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathapilimit.go
More file actions
28 lines (25 loc) · 787 Bytes
/
apilimit.go
File metadata and controls
28 lines (25 loc) · 787 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
package bybit_connector
import (
"context"
"net/http"
)
// SetApiRateLimit sets the API rate limit
func (s *BybitClientRequest) SetApiRateLimit(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) {
r := &request{
method: http.MethodPost,
endpoint: "/v5/apilimit/set",
secType: secTypeSigned,
}
data, err := SendRequest(ctx, opts, r, s, err)
return GetServerResponse(err, data)
}
// GetApiRateLimit queries the API rate limit
func (s *BybitClientRequest) GetApiRateLimit(ctx context.Context, opts ...RequestOption) (res *ServerResponse, err error) {
r := &request{
method: http.MethodGet,
endpoint: "/v5/apilimit/query",
secType: secTypeSigned,
}
data, err := SendRequest(ctx, opts, r, s, err)
return GetServerResponse(err, data)
}