rest

package
v0.14.17 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NamedOrder added in v0.14.17

type NamedOrder struct {
	Name string
	Order
}

func (*NamedOrder) Clear added in v0.14.17

func (o *NamedOrder) Clear()

type Order added in v0.14.17

type Order struct {
	Id            uint64 `bson:"_id"`
	ClientOrderId string `bson:"clientOrderId"`
	Type          string `bson:",omitempty"`
	Price         string `bson:",omitempty"`
	StopPrice     string `bson:"stopPrice,omitempty"`
	Amount        string `bson:",omitempty"`
	Total         string `bson:",omitempty"`
	Time          string `bson:",omitempty"`

	// created (not submitted),
	// submitted,
	// partial-filled, filled,
	// partial-canceled, canceled
	Status string `bson:",omitempty"`

	Trades []Trade `bson:",omitempty"`

	Updated time.Time `bson:",omitempty"`
}

for mongodb

type ReinforceOrder added in v0.14.17

type ReinforceOrder = NamedOrder

type SellStopOrder added in v0.14.17

type SellStopOrder = NamedOrder

type SqueezeMomentumConfig added in v0.11.11

type SqueezeMomentumConfig struct {
	Exchange hs.ExchangeConf
	Mongo    hs.MongoConf
	Strategy SqueezeMomentumStrategyConf
	Robots   []hs.BroadcastConf
}

type SqueezeMomentumStrategyConf added in v0.11.11

type SqueezeMomentumStrategyConf struct {
	Total    float64
	Interval string
	Factor   float64
	Period   int
}

type SqueezeMomentumTrader added in v0.11.11

type SqueezeMomentumTrader struct {
	LongTimes  int
	ShortTimes int
	// contains filtered or unexported fields
}

type Trade added in v0.14.17

type Trade struct {
	Id     uint64
	Price  string `bson:",omitempty"`
	Amount string `bson:",omitempty"`
	Total  string `bson:",omitempty"`
	Remain string `bson:",omitempty"`

	Time time.Time `bson:",omitempty"`
}

type Trader

type Trader interface {
	Init(ctx context.Context)
	Close(ctx context.Context)
	Print(ctx context.Context) error
	Clear(ctx context.Context) error
	Start(ctx context.Context) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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