Exchanges: Convert bespoke Number types to types.Number (#1429)

* Kucoin: Rename WsSpotTicker => WsSnapshot

* Kucoin: Replace kucoinNumber => types.Number

* Okcoin: Convert to types.Number

* Gateio: Convert to types.Number

* Okx: Convert to types.Number
This commit is contained in:
Gareth Kirwan
2023-12-28 04:55:23 +01:00
committed by GitHub
parent 9986e80e2d
commit 2b3c63c5b3
14 changed files with 334 additions and 583 deletions

View File

@@ -71,3 +71,8 @@ func (f Number) Int64() int64 {
func (f Number) Decimal() decimal.Decimal {
return decimal.NewFromFloat(float64(f))
}
// String returns a string representation of the number
func (f Number) String() string {
return strconv.FormatFloat(float64(f), 'f', -1, 64)
}