print a pretty table with correct country coder

This commit is contained in:
2025-11-18 16:07:41 +00:00
parent 05a981b3a0
commit d097b01288
13 changed files with 318 additions and 160 deletions

View File

@@ -0,0 +1,7 @@
package trading212
import (
"github.com/biter777/countries"
)
const Country = countries.Cyprus

View File

@@ -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
}