Files
nofx/provider/coinank/coinank_api/base_coin_test.go
wqqqqqq 04e0cbad83 feat: implement coinank free base coin interface (#1293)
- implement coinank free base coin interface in coinank_api.BaseCoinSymbols
2025-12-30 23:25:08 +08:00

44 lines
766 B
Go

package coinank_api
import (
"context"
"encoding/json"
"testing"
)
func TestBaseCoinSymbolsNoArgs(t *testing.T) {
resp, err := BaseCoinSymbols(context.TODO(), "", "", "")
if err != nil {
t.Error(err)
}
res, err := json.Marshal(resp)
if err != nil {
t.Error(err)
}
t.Logf("%s", res)
}
func TestBaseCoinSymbolsBTC(t *testing.T) {
resp, err := BaseCoinSymbols(context.TODO(), "", "", "BTC")
if err != nil {
t.Error(err)
}
res, err := json.Marshal(resp)
if err != nil {
t.Error(err)
}
t.Logf("%s", res)
}
func TestBaseCoinSymbolsBTCUSDT(t *testing.T) {
resp, err := BaseCoinSymbols(context.TODO(), "", "BTCUSDT", "")
if err != nil {
t.Error(err)
}
res, err := json.Marshal(resp)
if err != nil {
t.Error(err)
}
t.Logf("%s", res)
}