Types: Switch convert.StringToFloat64 to types.Number (#1415)

* Types: Add Number type

* Types: Switch StringToFloat64 for Number

This change mostly just renames the type.
convert package and StringToFloat64 represent actions, not types,
and make it misleading to use outside of the API context,
especially when using it for a Float64ToString operation.

* Common: Remove StringToFloat64

Replaced by types.Number

* fixup! Types: Switch StringToFloat64 for Number

Second pass at Okx

* Spellcheck: Fix whitespace handling for okx line
This commit is contained in:
Gareth Kirwan
2023-12-20 03:01:27 +01:00
committed by GitHub
parent 5042bf9790
commit f05f24da8b
21 changed files with 3158 additions and 3140 deletions

View File

@@ -1,8 +1,8 @@
package gemini
import (
"github.com/thrasher-corp/gocryptotrader/common/convert"
"github.com/thrasher-corp/gocryptotrader/currency"
"github.com/thrasher-corp/gocryptotrader/types"
)
const (
@@ -32,17 +32,17 @@ type Ticker struct {
// SymbolDetails contains additional symbol details
type SymbolDetails struct {
Symbol string `json:"symbol"`
BaseCurrency string `json:"base_currency"`
QuoteCurrency string `json:"quote_currency"`
TickSize float64 `json:"tick_size"`
QuoteIncrement float64 `json:"quote_increment"`
MinOrderSize convert.StringToFloat64 `json:"min_order_size"`
Status string `json:"status"`
WrapEnabled bool `json:"wrap_enabled"`
ProductType string `json:"product_type"`
ContractType string `json:"contract_type"`
ContractPriceCurrency string `json:"contract_price_currency"`
Symbol string `json:"symbol"`
BaseCurrency string `json:"base_currency"`
QuoteCurrency string `json:"quote_currency"`
TickSize float64 `json:"tick_size"`
QuoteIncrement float64 `json:"quote_increment"`
MinOrderSize types.Number `json:"min_order_size"`
Status string `json:"status"`
WrapEnabled bool `json:"wrap_enabled"`
ProductType string `json:"product_type"`
ContractType string `json:"contract_type"`
ContractPriceCurrency string `json:"contract_price_currency"`
}
// TickerV2 holds returned ticker data from the exchange