mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-10 06:20:58 +08:00
23 lines
457 B
Go
23 lines
457 B
Go
package coinank
|
|
|
|
import (
|
|
"context"
|
|
"encoding/json"
|
|
"nofx/provider/coinank/coinank_enum"
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestKline(t *testing.T) {
|
|
client := NewCoinankClient(coinank_enum.MainUrl, TestApikey)
|
|
resp, err := client.Kline(context.TODO(), "BTCUSDT", coinank_enum.Binance, 0, time.Now().UnixMilli(), 10, coinank_enum.Hour1)
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
res, err := json.Marshal(resp)
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
t.Logf("%s", res)
|
|
}
|