mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
use types.Exchange
This commit is contained in:
parent
8f129f0e0e
commit
64c9960882
|
@ -17,7 +17,7 @@ type Account struct {
|
|||
Balances map[string]types.Balance
|
||||
}
|
||||
|
||||
func LoadAccount(ctx context.Context, exchange *binance.Exchange) (*Account, error) {
|
||||
func LoadAccount(ctx context.Context, exchange types.Exchange) (*Account, error) {
|
||||
balances, err := exchange.QueryAccountBalances(ctx)
|
||||
return &Account{
|
||||
Balances: balances,
|
||||
|
|
|
@ -90,7 +90,7 @@ type Trader struct {
|
|||
// Context is trading Context
|
||||
Context *Context
|
||||
|
||||
Exchange *binance.Exchange
|
||||
Exchange types.Exchange
|
||||
|
||||
reportTimer *time.Timer
|
||||
|
||||
|
@ -103,7 +103,7 @@ type Trader struct {
|
|||
ExchangeSessions map[string]*ExchangeSession
|
||||
}
|
||||
|
||||
func New(db *sqlx.DB, exchange *binance.Exchange, symbol string) *Trader {
|
||||
func New(db *sqlx.DB, exchange types.Exchange, symbol string) *Trader {
|
||||
tradeService := &service.TradeService{DB: db}
|
||||
return &Trader{
|
||||
Symbol: symbol,
|
||||
|
|
Loading…
Reference in New Issue
Block a user