moonmath/coindesk/lib_test.go

30 lines
563 B
Go
Raw Normal View History

2024-03-17 09:10:05 +00:00
package coindesk_test
import (
"context"
"fmt"
"testing"
"time"
"code.humancabbage.net/moonmath/coindesk"
)
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()
}