mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-18 18:04:32 +08:00
feat: implement coinank free base coin interface (#1293)
- implement coinank free base coin interface in coinank_api.BaseCoinSymbols
This commit is contained in:
43
provider/coinank/coinank_api/base_coin_test.go
Normal file
43
provider/coinank/coinank_api/base_coin_test.go
Normal file
@@ -0,0 +1,43 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user