Documentation ¶
Index ¶
- Constants
- func JsonUnmarshal[V any](jsonBlob []byte) V
- func ParseProxy(proxy string) (*url.URL, error)
- type Client
- func (o *Client) Delete(path string, param any, ret any) error
- func (o *Client) Get(path string, param any, ret any) error
- func (o *Client) GetPublic(path string, param any, ret any) error
- func (o *Client) HasProxy() bool
- func (o *Client) Key() string
- func (o *Client) Post(path string, param any, ret any) error
- func (o *Client) Request(method string, path string, param any, ret any, sign bool) (err error)
- func (o *Client) RequestPrivate(method string, path string, param any, ret any) error
- func (o *Client) RequestPublic(method string, path string, param any, ret any) error
- func (o *Client) Secret() string
- func (o *Client) WithAuth(key, secret string) *Client
- func (o *Client) WithByTickUrl() *Client
- func (o *Client) WithLog(log *ulog.Log) *Client
- func (o *Client) WithLogRequest(logRequest bool) *Client
- func (o *Client) WithLogResponse(logResponse bool) *Client
- func (o *Client) WithLogUri(logUri bool) *Client
- func (o *Client) WithOnTransportError(f OnTransportError) *Client
- func (o *Client) WithProxy(proxy string) *Client
- func (o *Client) WithTimeout(timeout time.Duration) *Client
- func (o *Client) WithUrl(url string) *Client
- type Err
- type Error
- type Float64
- type HeaderSign
- type OnTransportError
- type Param
- type ParamTag
- type PreRateLimitError
- type TimeMs
- type WsClient
- func (o *WsClient) Conf() *WsConf
- func (o *WsClient) Connected() bool
- func (o *WsClient) Run()
- func (o *WsClient) Send(cmd any) bool
- func (o *WsClient) SetOnConnected(onConnected func())
- func (o *WsClient) SetOnDialError(onDialError func(error) bool)
- func (o *WsClient) SetOnDisconnected(onDisconnected func())
- func (o *WsClient) SetOnMessage(onMessage func(string, []byte))
- func (o *WsClient) Shutdown()
- func (o *WsClient) WithByTickUrl() *WsClient
- func (o *WsClient) WithLog(log *ulog.Log) *WsClient
- func (o *WsClient) WithProxy(proxy string) *WsClient
- func (o *WsClient) WithUrl(url string) *WsClient
- type WsConf
- type WsConn
- func (o *WsConn) Conf() *WsConf
- func (o *WsConn) Connected() bool
- func (o *WsConn) Do() bool
- func (o *WsConn) ID() string
- func (o *WsConn) Run()
- func (o *WsConn) Send(v any) bool
- func (o *WsConn) SetOnConnected(onConnected func())
- func (o *WsConn) SetOnDialError(onDialError func(error) bool)
- func (o *WsConn) SetOnDisconnected(onDisconnected func())
- func (o *WsConn) SetOnMessage(onMessage func([]byte))
- func (o *WsConn) Shutdown()
- func (o *WsConn) Sleep(duration time.Duration)
- func (o *WsConn) WithByTickUrl() *WsConn
- func (o *WsConn) WithLog(log *ulog.Log) *WsConn
- func (o *WsConn) WithUrl(url string) *WsConn
Constants ¶
View Source
const ( // Mainnet base url: MainBaseUrl = "https://api.bybit.com" // Mainnet base bytick url: MainBaseByTickUrl = "https://api.bytick.com" // Mainnet base websocket url: MainBaseWsUrl = "wss://stream.bybit.com" // Mainnet base bytick websocket url: MainBaseByTickWsUrl = "wss://stream.bytick.com" )
Variables ¶
This section is empty.
Functions ¶
func JsonUnmarshal ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) RequestPrivate ¶
func (*Client) RequestPublic ¶
func (*Client) WithByTickUrl ¶
func (*Client) WithLogRequest ¶
func (*Client) WithLogResponse ¶
func (*Client) WithLogUri ¶
func (*Client) WithOnTransportError ¶ added in v0.3.2
func (o *Client) WithOnTransportError(f OnTransportError) *Client
type HeaderSign ¶
type HeaderSign struct { }
type OnTransportError ¶ added in v0.3.2
type ParamTag ¶
func GetParamTag ¶
func GetParamTag(f reflect.StructField) (tag ParamTag)
type PreRateLimitError ¶
func (*PreRateLimitError) Error ¶
func (o *PreRateLimitError) Error() string
type TimeMs ¶
func (*TimeMs) UnmarshalJSON ¶
type WsClient ¶
type WsClient struct {
// contains filtered or unexported fields
}
func NewWsClient ¶
func (*WsClient) SetOnConnected ¶
func (o *WsClient) SetOnConnected(onConnected func())
func (*WsClient) SetOnDialError ¶
func (*WsClient) SetOnDisconnected ¶
func (o *WsClient) SetOnDisconnected(onDisconnected func())
func (*WsClient) SetOnMessage ¶
func (*WsClient) WithByTickUrl ¶
type WsConf ¶
type WsConn ¶
type WsConn struct {
// contains filtered or unexported fields
}
func (*WsConn) SetOnConnected ¶
func (o *WsConn) SetOnConnected(onConnected func())
func (*WsConn) SetOnDialError ¶
func (*WsConn) SetOnDisconnected ¶
func (o *WsConn) SetOnDisconnected(onDisconnected func())
func (*WsConn) SetOnMessage ¶
func (*WsConn) WithByTickUrl ¶
Click to show internal directories.
Click to hide internal directories.