print a pretty table with correct country coder
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/biter777/countries"
|
||||
"github.com/nmoniz/any2anexoj/internal"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
@@ -26,6 +27,14 @@ func (r Record) Symbol() string {
|
||||
return r.symbol
|
||||
}
|
||||
|
||||
func (r Record) BrokerCountry() int64 {
|
||||
return int64(Country)
|
||||
}
|
||||
|
||||
func (r Record) AssetCountry() int64 {
|
||||
return int64(countries.ByName(r.Symbol()[:2]).Info().Code)
|
||||
}
|
||||
|
||||
func (r Record) Side() internal.Side {
|
||||
return r.side
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user