You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

28 lines
558 B

package vmts
import (
"sig-pub/api/pb"
"sig-pub/pkg/config"
"sig-pub/pkg/types"
"sig-pub/pkg/zlog"
"testing"
)
var test_addr = "http://127.0.0.1:8428"
func TestGetRangeKline(t *testing.T) {
vmdb := NewVictoriaMetricsTSDB(config.VictoriaMetricsConfig{Addr: test_addr})
inst := types.TradeInstance{
InstId: "BTC_USDT",
Exchange: pb.ExchangeType_OKX,
}
klines, err := vmdb.ListRangeKline(inst, types.Interval1m, 1758968460000, 1758968700000)
if err != nil {
t.Error(err)
return
}
for _, k := range klines {
zlog.Infof("%#v", k)
}
}