Documentation ¶
Index ¶
- Constants
- Variables
- func ArrKLines(klines []*banexg.Kline) [][]float64
- func CalcInd(name string, kline [][]float64, params []float64) (interface{}, error)
- func ErrHandler(c *fiber.Ctx, err error) error
- func GetExg(name, market, ctType string, load bool) (banexg.BanExchange, *errs.Error)
- func InitExg(exchange banexg.BanExchange) *errs.Error
- func RegApiKline(api fiber.Router)
- func RegApiWebsocket(api fiber.Router)
- func RunReceiver()
- func SetKlineSub(client *WsClient, isSub, lock bool, keys ...string)
- func VerifyArg(c *fiber.Ctx, out interface{}, from int) error
- type AdvInd
- type BadField
- type BadFields
- type DrawInd
- type Figure
- type WsClient
Constants ¶
View Source
const ( ArgQuery = 1 ArgBody = 2 )
Variables ¶
View Source
var (
IndsCache = make([]map[string]interface{}, 0)
)
Functions ¶
func ErrHandler ¶
func RegApiKline ¶
func RegApiKline(api fiber.Router)
func RegApiWebsocket ¶
func RegApiWebsocket(api fiber.Router)
func RunReceiver ¶
func RunReceiver()
func SetKlineSub ¶
Types ¶
type DrawInd ¶
type DrawInd struct { Name string Title string IsMain bool CalcParams []float64 // 参数 Figures []*Figure FigureTpl string // 客户端会使用此模板动态生成Figures FigureType string // 默认空,客户端默认line // contains filtered or unexported fields }
type WsClient ¶
type WsClient struct { Conn *websocket.Conn Subs map[string]bool // contains filtered or unexported fields }
func NewWsClient ¶
func (*WsClient) HandleForever ¶
func (c *WsClient) HandleForever()
func (*WsClient) UnSubscribe ¶
Click to show internal directories.
Click to hide internal directories.