Documentation ¶
Index ¶
- Constants
- type WsGrid
- func (g *WsGrid) CancelOrders()
- func (g *WsGrid) Init(ctx context.Context) error
- func (g *WsGrid) OrderUpdateHandler(resp interface{})
- func (g *WsGrid) PlaceOrders(ctx context.Context, last float64)
- func (g *WsGrid) Run(ctx context.Context) error
- func (g *WsGrid) Shutdown(ctx context.Context) error
- func (g *WsGrid) Truncate(value float64, precision int) float64
Constants ¶
View Source
const (
ClientId = "ws-grid-v0.1.0"
)
View Source
const CollName = "grid_status"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WsGrid ¶
type WsGrid struct { ExchangeName string `bson:"exchange"` Label string `bson:"label"` Pair string `bson:"pair"` APIKeyPair exchange.APIKeyPair `bson:"-"` ExClient exchange.Exchange `bson:"-"` MongClient *mongo.Database `bson:"-"` GormClient *gorm.DB `bson:"-"` Percentage float64 `bson:"-"` Fund float64 `bson:"-"` MaxGrid int `bson:"-"` PricePrecision int `bson:"-"` AmountPrecision int `bson:"-"` Base float64 `bson:"base"` Position int `bson:"position"` UpTimes int `bson:"upTimes"` DownTimes int `bson:"downTimes"` TopOrderId uint64 `bson:"topOrderId"` BottomOrderId uint64 `bson:"bottomOrderId"` }
func (*WsGrid) CancelOrders ¶
func (g *WsGrid) CancelOrders()
func (*WsGrid) OrderUpdateHandler ¶
func (g *WsGrid) OrderUpdateHandler(resp interface{})
Response handler
Click to show internal directories.
Click to hide internal directories.