Documentation ¶
Index ¶
- func GetCAGR[V TradesGetter](trades []V) float64
- func GetTimeRange(r *http.Request) (time.Time, time.Time, error)
- func GetXIRR[V TradesGetter](trades []V) float64
- func MomentBinarySearch[V TimeGetter](timestamps []V, target time.Time) int
- func ReadCSV(tradeFiles []string) ([][]string, error)
- func ReadDir(dir string) ([]string, error)
- func RespondWithJSON(w http.ResponseWriter, status int, payload interface{})
- type TimeGetter
- type TradesGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCAGR ¶
func GetCAGR[V TradesGetter](trades []V) float64
func GetXIRR ¶
func GetXIRR[V TradesGetter](trades []V) float64
func MomentBinarySearch ¶
func MomentBinarySearch[V TimeGetter](timestamps []V, target time.Time) int
func RespondWithJSON ¶
func RespondWithJSON(w http.ResponseWriter, status int, payload interface{})
Types ¶
type TimeGetter ¶
type TradesGetter ¶
Click to show internal directories.
Click to hide internal directories.