Documentation
¶
Index ¶
- func RSASign(src []byte, priKey []byte, hash crypto.Hash) ([]byte, error)
- type OkxRestBaseClient
- func (p *OkxRestBaseClient) DoGet(uri string, params map[string]string) (string, error)
- func (p *OkxRestBaseClient) DoGetNoAuth(uri string, params map[string]string) (string, error)
- func (p *OkxRestBaseClient) DoPost(uri string, params string) (string, error)
- func (p *OkxRestBaseClient) Init(config *config.OkxConfig) *OkxRestBaseClient
- type OkxWsBaseClient
- func (p *OkxWsBaseClient) Connect()
- func (p *OkxWsBaseClient) ConnectWebSocket()
- func (p *OkxWsBaseClient) ExecuterPing()
- func (p *OkxWsBaseClient) GetListener(argJson interface{}) OnReceive
- func (p *OkxWsBaseClient) Init(config *config.OkxConfig) *OkxWsBaseClient
- func (p *OkxWsBaseClient) Login()
- func (p *OkxWsBaseClient) ReadLoop()
- func (p *OkxWsBaseClient) Send(data string)
- func (p *OkxWsBaseClient) SendByType(req model.WsBaseReq)
- func (p *OkxWsBaseClient) SetListener(msgListener OnReceive, errorListener OnReceive)
- func (p *OkxWsBaseClient) StartReadLoop()
- type OnReceive
- type Signer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OkxRestBaseClient ¶
type OkxRestBaseClient struct {
HttpClient http.Client
Signer *Signer
Config *config.OkxConfig
Auth bool
}
func (*OkxRestBaseClient) DoGetNoAuth ¶
func (*OkxRestBaseClient) DoPost ¶
func (p *OkxRestBaseClient) DoPost(uri string, params string) (string, error)
func (*OkxRestBaseClient) Init ¶
func (p *OkxRestBaseClient) Init(config *config.OkxConfig) *OkxRestBaseClient
type OkxWsBaseClient ¶
type OkxWsBaseClient struct {
NeedLogin bool
Connection bool
LoginStatus bool
Listener OnReceive
ErrorListener OnReceive
Ticker *time.Ticker
SendMutex *sync.Mutex
WebSocketClient *websocket.Conn
LastReceivedTime time.Time
AllSuribe *model.Set
Signer *Signer
ScribeMap map[model.SubscribeReq]OnReceive
Config *config.OkxConfig
}
func (*OkxWsBaseClient) Connect ¶
func (p *OkxWsBaseClient) Connect()
func (*OkxWsBaseClient) ConnectWebSocket ¶
func (p *OkxWsBaseClient) ConnectWebSocket()
func (*OkxWsBaseClient) ExecuterPing ¶
func (p *OkxWsBaseClient) ExecuterPing()
func (*OkxWsBaseClient) GetListener ¶
func (p *OkxWsBaseClient) GetListener(argJson interface{}) OnReceive
func (*OkxWsBaseClient) Init ¶
func (p *OkxWsBaseClient) Init(config *config.OkxConfig) *OkxWsBaseClient
func (*OkxWsBaseClient) Login ¶
func (p *OkxWsBaseClient) Login()
func (*OkxWsBaseClient) ReadLoop ¶
func (p *OkxWsBaseClient) ReadLoop()
func (*OkxWsBaseClient) Send ¶
func (p *OkxWsBaseClient) Send(data string)
func (*OkxWsBaseClient) SendByType ¶
func (p *OkxWsBaseClient) SendByType(req model.WsBaseReq)
func (*OkxWsBaseClient) SetListener ¶
func (p *OkxWsBaseClient) SetListener(msgListener OnReceive, errorListener OnReceive)
func (*OkxWsBaseClient) StartReadLoop ¶
func (p *OkxWsBaseClient) StartReadLoop()
Click to show internal directories.
Click to hide internal directories.