Documentation ¶
Index ¶
- func SplitAssetQuote(pair string) (asset string, quote string)
- type AssetQuote
- type AssetValue
- type PaperWallet
- func (p *PaperWallet) Account() (model.Account, error)
- func (p *PaperWallet) AssetValues(pair string) []AssetValue
- func (p *PaperWallet) AssetsInfo(pair string) model.AssetInfo
- func (p *PaperWallet) Cancel(order model.Order) error
- func (p *PaperWallet) CandlesByLimit(ctx context.Context, pair, period string, limit int) ([]model.Candle, error)
- func (p *PaperWallet) CandlesByPeriod(ctx context.Context, pair, period string, start, end time.Time) ([]model.Candle, error)
- func (p *PaperWallet) CandlesSubscription(ctx context.Context, pair, timeframe string) (chan model.Candle, chan error)
- func (p *PaperWallet) CreateOrderLimit(side model.SideType, pair string, size float64, limit float64) (model.Order, error)
- func (p *PaperWallet) CreateOrderMarket(side model.SideType, pair string, size float64) (model.Order, error)
- func (p *PaperWallet) CreateOrderMarketQuote(side model.SideType, pair string, quoteQuantity float64) (model.Order, error)
- func (p *PaperWallet) CreateOrderOCO(side model.SideType, pair string, size, price, stop, stopLimit float64) ([]model.Order, error)
- func (p *PaperWallet) CreateOrderStop(pair string, size float64, limit float64) (model.Order, error)
- func (p *PaperWallet) EquityValues() []AssetValue
- func (p *PaperWallet) ID() int64
- func (p *PaperWallet) LastQuote(ctx context.Context, pair string) (float64, error)
- func (p *PaperWallet) MaxDrawdown() (float64, time.Time, time.Time)
- func (p *PaperWallet) OnCandle(candle model.Candle)
- func (p *PaperWallet) Order(pair string, id int64) (model.Order, error)
- func (p *PaperWallet) Pairs() []string
- func (p *PaperWallet) Position(pair string) (asset, quote float64, err error)
- func (p *PaperWallet) Summary()
- type PaperWalletOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SplitAssetQuote ¶
Types ¶
type AssetQuote ¶
type AssetValue ¶
type PaperWallet ¶
func NewPaperWallet ¶
func NewPaperWallet(ctx context.Context, baseCoin string, options ...PaperWalletOption) *PaperWallet
func (*PaperWallet) AssetValues ¶
func (p *PaperWallet) AssetValues(pair string) []AssetValue
func (*PaperWallet) AssetsInfo ¶
func (p *PaperWallet) AssetsInfo(pair string) model.AssetInfo
func (*PaperWallet) CandlesByLimit ¶
func (*PaperWallet) CandlesByPeriod ¶
func (*PaperWallet) CandlesSubscription ¶
func (*PaperWallet) CreateOrderLimit ¶
func (*PaperWallet) CreateOrderMarket ¶
func (*PaperWallet) CreateOrderMarketQuote ¶
func (*PaperWallet) CreateOrderOCO ¶
func (*PaperWallet) CreateOrderStop ¶
func (*PaperWallet) EquityValues ¶
func (p *PaperWallet) EquityValues() []AssetValue
func (*PaperWallet) ID ¶
func (p *PaperWallet) ID() int64
func (*PaperWallet) MaxDrawdown ¶
func (*PaperWallet) OnCandle ¶
func (p *PaperWallet) OnCandle(candle model.Candle)
func (*PaperWallet) Pairs ¶
func (p *PaperWallet) Pairs() []string
func (*PaperWallet) Position ¶
func (p *PaperWallet) Position(pair string) (asset, quote float64, err error)
func (*PaperWallet) Summary ¶
func (p *PaperWallet) Summary()
type PaperWalletOption ¶
type PaperWalletOption func(*PaperWallet)
func WithDataFeed ¶
func WithDataFeed(feeder service.Feeder) PaperWalletOption
func WithPaperAsset ¶
func WithPaperAsset(pair string, amount float64) PaperWalletOption
func WithPaperFee ¶
func WithPaperFee(maker, taker float64) PaperWalletOption
Click to show internal directories.
Click to hide internal directories.