util

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const CoinbaseTimeFormat string = "2006-01-02T15:04:05.000Z"

CoinbaseTimeFormat taken from the Coinbase Pro API reference: https://docs.pro.coinbase.com/#timestamps

Variables

This section is empty.

Functions

func ParseTimestampFromString

func ParseTimestampFromString(s string) time.Time

ParseTimestampFromString takes a timestamp string from a Coinbase Pro API response and returns a time.Time object.

func StringToDecimal

func StringToDecimal(s string) decimal.Decimal

StringToDecimal parses a string into a decimal.Decimal, panicking if it fails.

func TimeToTimestampString

func TimeToTimestampString(t time.Time) string

TimeToTimestampString returns the string representation of a time.Time object, formatted using CoinbaseTimeFormat.

Types

This section is empty.

Directories

Path Synopsis
Package secrets contains functions for loading various secrets from the environment.
Package secrets contains functions for loading various secrets from the environment.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL