Documentation
¶
Index ¶
Constants ¶
View Source
const (
WSS_URL = "wss://wss.tiqs.trading"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DepthLevel ¶
type DepthLevel struct {
Quantity int64 `json:"quantity"`
Price int32 `json:"price"`
Orders int16 `json:"orders"`
}
DepthLevel represents a single level in the market depth
type MarketDepth ¶
type MarketDepth struct {
Bids [5]DepthLevel `json:"bids"`
Asks [5]DepthLevel `json:"asks"`
}
MarketDepth represents the full market depth with bids and asks
type TickData ¶
type TickData struct {
Token int32 `json:"token"`
LTP int32 `json:"ltp"`
NetChangeIndicator int32 `json:"net_change_indicator"`
NetChange int32 `json:"net_change"`
LTQ int32 `json:"ltq"`
AvgPrice int32 `json:"avg_price"`
TotalBuyQty int64 `json:"total_buy_qty"`
TotalSellQty int64 `json:"total_sell_qty"`
Open int32 `json:"open"`
High int32 `json:"high"`
Close int32 `json:"close"`
Low int32 `json:"low"`
Volume int64 `json:"volume"`
LTT int32 `json:"ltt"`
Time int32 `json:"time"`
OI int32 `json:"oi"`
OIDayHigh int32 `json:"oi_day_high"`
OIDayLow int32 `json:"oi_day_low"`
LowerLimit int32 `json:"lower_limit"`
UpperLimit int32 `json:"upper_limit"`
MarketDepth MarketDepth `json:"market_depth"`
}
TickData represents the complete market data for a token
type WS ¶
type WS struct {
AppID string
Token string
TokenList []int
Conn *websocket.Conn
URL string
RetryDelay time.Duration
MaxRetries int
DataChan chan TickData
// contains filtered or unexported fields
}
WS represents the WebSocket client
func (*WS) GetDataChannel ¶
GetDataChannel returns the channel for receiving market data
func (*WS) GetErrorChannel ¶
GetErrorChannel returns the channel for receiving errors
Click to show internal directories.
Click to hide internal directories.