Documentation ¶
Index ¶
- func CalcSpread(bidMax float64, askMin float64) (spread float64, midPoint float64)
- func GetAssetString(assetType string, code string, issuer string) string
- func PanicIfError(e error)
- func SliceDiff(a, b []string) (diff []string)
- func TimeToRFC3339(t time.Time) string
- func TimeToUnixEpoch(t time.Time) int64
- func WriteJSONToFile(jsonBytes []byte, filename string) (numBytes int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcSpread ¶
CalcSpread calculates the spread stats for the given bidMax and askMin orderbook values
func GetAssetString ¶
GetAssetString returns a string representation of an asset
func PanicIfError ¶
func PanicIfError(e error)
PanicIfError is an utility function that panics if err != nil
func TimeToRFC3339 ¶
TimeToRFC3339 converts a time.Time to a string in RFC3339 format
func TimeToUnixEpoch ¶
TimeToTimestamp converts a time.Time into a Unix epoch
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.