mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
types: move fiat currency list to types
This commit is contained in:
parent
fd2928fc82
commit
2614b25de3
|
@ -16,8 +16,6 @@ import (
|
|||
"github.com/c9s/bbgo/pkg/util"
|
||||
)
|
||||
|
||||
var fiatCurrencies = []string{"USDC", "USDT", "USD", "TWD", "EUR", "GBP", "BUSD"}
|
||||
|
||||
type StandardIndicatorSet struct {
|
||||
Symbol string
|
||||
// Standard indicators
|
||||
|
@ -589,7 +587,7 @@ func (session *ExchangeSession) FindPossibleSymbols() (symbols []string, err err
|
|||
var balances = session.Account.Balances()
|
||||
var fiatAssets []string
|
||||
|
||||
for _, currency := range fiatCurrencies {
|
||||
for _, currency := range types.FiatCurrencies {
|
||||
if balance, ok := balances[currency]; ok && balance.Total() > 0 {
|
||||
fiatAssets = append(fiatAssets, currency)
|
||||
}
|
||||
|
|
|
@ -5,3 +5,6 @@ import "github.com/leekchan/accounting"
|
|||
var USD = accounting.Accounting{Symbol: "$ ", Precision: 2}
|
||||
var BTC = accounting.Accounting{Symbol: "BTC ", Precision: 2}
|
||||
var BNB = accounting.Accounting{Symbol: "BNB ", Precision: 4}
|
||||
|
||||
var FiatCurrencies = []string{"USDC", "USDT", "USD", "TWD", "EUR", "GBP", "BUSD"}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user