Documentation ¶
Index ¶
Constants ¶
View Source
const ( // BaseURL is the base URL for the Bybit API BaseURL = "https://api.bybit.com" // TestnetBaseURL is the base URL for the Bybit Testnet API TestnetBaseURL = "https://api-testnet.bybit.com" // ApiVersion is the version of the Bybit API ApiVersion = "v5" GET Method = "GET" POST Method = "POST" )
Variables ¶
This section is empty.
Functions ¶
func GetCurrentTime ¶ added in v0.0.8
func GetCurrentTime() int64
Types ¶
type Client ¶
type Client struct { IsTestNet bool QueryParams url.Values // contains filtered or unexported fields }
type EndpointRateLimiter ¶ added in v0.0.10
type EndpointRateLimiter struct {
// contains filtered or unexported fields
}
func NewEndpointRateLimiter ¶ added in v0.0.10
func NewEndpointRateLimiter() *EndpointRateLimiter
func (*EndpointRateLimiter) GetLimiter ¶ added in v0.0.10
func (e *EndpointRateLimiter) GetLimiter(endpointKey string) *rate.Limiter
GetLimiter fetches or creates a new limiter for the given endpointKey. GetLimiter retrieves an existing limiter for the endpoint. Returns nil if not found.
func (*EndpointRateLimiter) SetLimiter ¶ added in v0.0.10
func (e *EndpointRateLimiter) SetLimiter(endpointKey string, limiter *rate.Limiter)
SetLimiter sets a new limiter for the endpoint.
type Response ¶
type Response interface { Unmarshal(v interface{}) error Data() []byte Status() string StatusCode() int Error() error }
func NewResponse ¶
type ResponseImpl ¶
type ResponseImpl struct {
// contains filtered or unexported fields
}
func (*ResponseImpl) Data ¶
func (r *ResponseImpl) Data() []byte
func (*ResponseImpl) Error ¶
func (r *ResponseImpl) Error() error
func (*ResponseImpl) Status ¶
func (r *ResponseImpl) Status() string
func (*ResponseImpl) StatusCode ¶
func (r *ResponseImpl) StatusCode() int
func (*ResponseImpl) Unmarshal ¶
func (r *ResponseImpl) Unmarshal(v interface{}) error
Click to show internal directories.
Click to hide internal directories.