Documentation
¶
Index ¶
- type BinaryUtils
- type CustomInterval
- type Error
- type KlineInterval
- type Utils
- func (*Utils) CreateQueryString(params map[string]interface{}, sorted bool) string
- func (*Utils) DetectDotNumIndexes(numStr string) (dotIndex int, numIndex int)
- func (*Utils) Format_TickSize_str(priceStr string, tickSize string) string
- func (*Utils) GetIntervalFromString(intervalStr string, customIntervals ...CustomInterval) (interval *KlineInterval, isComplex bool, err error)
- func (*Utils) GetOpenCloseTimes(currentTime int64, interval string, customIntervals ...CustomInterval) (openTime int64, closeTime int64, err error)
- func (*Utils) GetStringNumberPrecision(numStr string) int
- func (*Utils) ParseFloat(floatStr string) (float64, error)
- func (*Utils) ParseInt(intStr string) (int64, error)
- func (*Utils) RemoveDuplicates(input []string) []string
- func (*Utils) Round_priceStr(priceStr string, precision int) string
- func (*Utils) ToFixed_Ceil(price float64, precision int) float64
- func (*Utils) ToFixed_Floor(price float64, precision int) float64
- func (*Utils) ToFixed_Round(price float64, precision int) float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryUtils ¶
type BinaryUtils struct{}
func (*BinaryUtils) DeserializeNumber ¶
func (*BinaryUtils) DeserializeNumber(data []byte, value interface{}) error
Deserializes any number into binary format Accepts any type (int, uint, float) and any size (8, 16, 32, 64)
func (*BinaryUtils) DeserializeString ¶
func (*BinaryUtils) DeserializeString(data []byte) (string, error)
Deserialize a string from binary to string format
func (*BinaryUtils) SerializeNumber ¶
func (*BinaryUtils) SerializeNumber(value interface{}) ([]byte, error)
Serializes any number into binary format Accepts any type (int, uint, float) and any size (8, 16, 32, 64)
func (*BinaryUtils) SerializeString ¶
func (*BinaryUtils) SerializeString(value string) ([]byte, error)
Serialize a string from string to binary format
type CustomInterval ¶
type Error ¶
type Error struct {
// false => Error originating from binance's side
// true => Originating from the Binance-Go library
IsLocalError bool
StatusCode int
Code int
Message string
}
func BinanceError ¶
Processes an erroneous 4XX HTTP Response Returns the library Error type In the case of an error parsing the error body, it returns a secondaly unmarshall error
func LocalError ¶
type KlineInterval ¶
type Utils ¶
type Utils struct{}
func (*Utils) CreateQueryString ¶
CreateQueryString transforms a map[string]interface{} into a query string
func (*Utils) DetectDotNumIndexes ¶
func (*Utils) Format_TickSize_str ¶
func (*Utils) GetIntervalFromString ¶
func (*Utils) GetIntervalFromString(intervalStr string, customIntervals ...CustomInterval) (interval *KlineInterval, isComplex bool, err error)