fyerswatch

package
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

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 PacketMsgMarketDepth struct {
	Price  uint32 `struc:"uint32"` //I | unsigned int | integer | 4 byte
	Qty    uint32 `struc:"uint32"` //I | unsigned int | integer | 4 byte
	NumOrd uint32 `struc:"uint32"` //I | unsigned int | integer | 4 byte
}

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

type WsTextMsg

type WsTextMsg struct {
	Code    int    `json:"code,omitempty" yaml:"code,omitempty"`
	Message string `json:"message,omitempty" yaml:"message,omitempty"`
	Status  string `json:"s,omitempty" yaml:"s,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL