Documentation ¶
Index ¶
- type PacketHeader
- type PacketMsg
- type PacketMsgExtra
- type PacketMsgMarketDepth
- type WatchNotifier
- func (w *WatchNotifier) Disconnect()
- func (w *WatchNotifier) IsConnected() bool
- func (w *WatchNotifier) OnBinaryMessage(socket gowebsocket.Socket, nt api.NotificationType, data []byte)
- func (w *WatchNotifier) OnConnectError(err error, socket gowebsocket.Socket)
- func (w *WatchNotifier) OnDisconnected(err error, socket gowebsocket.Socket)
- func (w *WatchNotifier) OnPingReceived(data string, socket gowebsocket.Socket)
- func (w *WatchNotifier) OnPongReceived(data string, socket gowebsocket.Socket)
- func (w *WatchNotifier) OnTextMessage(msg string, socket gowebsocket.Socket)
- func (w *WatchNotifier) Subscribe(ctx context.Context, nt api.NotificationType, symbols ...string)
- func (w *WatchNotifier) Unsubscribe(symbols ...string)
- func (w *WatchNotifier) WithOnCloseFunc(f func()) *WatchNotifier
- func (w *WatchNotifier) WithOnConnectFunc(f func()) *WatchNotifier
- func (w *WatchNotifier) WithOnErrorFunc(f func(err error)) *WatchNotifier
- func (w *WatchNotifier) WithOnMessageFunc(f func(api.Notification)) *WatchNotifier
- type WsTextMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PacketHeader ¶
type PacketHeader struct { FyersToken uint64 `struc:"uint64"` //Q | unsigned long long | integer | 8 byte Timestamp uint32 `struc:"uint32"` //L | unsigned long | integer | 4 byte FyersCode uint16 `struc:"uint16"` //H | unsigned short | integer | 2 byte Flag uint16 `struc:"uint16"` //H | unsigned short | integer | 2 byte PacketLength uint16 `struc:"uint16"` //H | unsigned short | integer | 2 byte }
type PacketMsg ¶
type PacketMsg struct { Pc uint32 `struc:"uint32"` //I | unsigned int | integer | 4 byte Ltp uint32 `struc:"uint32"` //I | unsigned int | integer | 4 byte Op uint32 `struc:"uint32"` //I | unsigned int | integer | 4 byte Hp uint32 `struc:"uint32"` //I | unsigned int | integer | 4 byte Lp uint32 `struc:"uint32"` //I | unsigned int | integer | 4 byte Cp uint32 `struc:"uint32"` //I | unsigned int | integer | 4 byte Mop uint32 `struc:"uint32"` //I | unsigned int | integer | 4 byte Mhp uint32 `struc:"uint32"` //I | unsigned int | integer | 4 byte Mlp uint32 `struc:"uint32"` //I | unsigned int | integer | 4 byte Mcp uint32 `struc:"uint32"` //I | unsigned int | integer | 4 byte Mv uint64 `struc:"uint64"` //Q | unsigned long long | integer | 8 byte }
type PacketMsgExtra ¶
type PacketMsgExtra struct { Ltq uint32 `struc:"uint32"` //I | unsigned int | integer | 4 byte Ltt uint32 `struc:"uint32"` //I | unsigned int | integer | 4 byte Atp uint32 `struc:"uint32"` //I | unsigned int | integer | 4 byte Vtt uint32 `struc:"uint32"` //I | unsigned int | integer | 4 byte TotBuy uint64 `struc:"uint64"` //Q | unsigned long long | integer | 8 byte TotSell uint64 `struc:"uint64"` //Q | unsigned long long | integer | 8 byte }
type PacketMsgMarketDepth ¶
type WatchNotifier ¶
type WatchNotifier struct {
// contains filtered or unexported fields
}
func NewNotifier ¶
func NewNotifier(apiKey, accessToken string) *WatchNotifier
func (*WatchNotifier) Disconnect ¶
func (w *WatchNotifier) Disconnect()
func (*WatchNotifier) IsConnected ¶
func (w *WatchNotifier) IsConnected() bool
func (*WatchNotifier) OnBinaryMessage ¶
func (w *WatchNotifier) OnBinaryMessage(socket gowebsocket.Socket, nt api.NotificationType, data []byte)
func (*WatchNotifier) OnConnectError ¶
func (w *WatchNotifier) OnConnectError(err error, socket gowebsocket.Socket)
func (*WatchNotifier) OnDisconnected ¶
func (w *WatchNotifier) OnDisconnected(err error, socket gowebsocket.Socket)
func (*WatchNotifier) OnPingReceived ¶
func (w *WatchNotifier) OnPingReceived(data string, socket gowebsocket.Socket)
func (*WatchNotifier) OnPongReceived ¶
func (w *WatchNotifier) OnPongReceived(data string, socket gowebsocket.Socket)
func (*WatchNotifier) OnTextMessage ¶
func (w *WatchNotifier) OnTextMessage(msg string, socket gowebsocket.Socket)
func (*WatchNotifier) Subscribe ¶
func (w *WatchNotifier) Subscribe(ctx context.Context, nt api.NotificationType, symbols ...string)
func (*WatchNotifier) Unsubscribe ¶
func (w *WatchNotifier) Unsubscribe(symbols ...string)
func (*WatchNotifier) WithOnCloseFunc ¶
func (w *WatchNotifier) WithOnCloseFunc(f func()) *WatchNotifier
func (*WatchNotifier) WithOnConnectFunc ¶
func (w *WatchNotifier) WithOnConnectFunc(f func()) *WatchNotifier
func (*WatchNotifier) WithOnErrorFunc ¶
func (w *WatchNotifier) WithOnErrorFunc(f func(err error)) *WatchNotifier
func (*WatchNotifier) WithOnMessageFunc ¶
func (w *WatchNotifier) WithOnMessageFunc(f func(api.Notification)) *WatchNotifier
Click to show internal directories.
Click to hide internal directories.