moonmath/coindesk/lib_test.go

30 lines
567 B
Go
Raw Normal View History

2024-03-17 09:10:05 +00:00
package coindesk_test
import (
"context"
"fmt"
"testing"
"time"
2024-03-19 21:29:37 +00:00
"code.humancabbage.net/sam/moonmath/coindesk"
2024-03-17 09:10:05 +00:00
)
func TestXxx(t *testing.T) {
now := time.Now()
then := now.Add(time.Duration(-24) * time.Hour)
values, err := coindesk.GetPriceValues(context.Background(), coindesk.BTC, then, now)
if err != nil {
t.Errorf("test failure: %v", err)
}
_ = values
fmt.Println()
tickers, err := coindesk.GetAssetTickers(context.Background(), coindesk.BTC, coindesk.ETH)
if err != nil {
t.Errorf("test failure: %v", err)
}
_ = tickers
fmt.Println()
}