mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-18 23:16:49 +00:00
@@ -473,7 +473,7 @@ func (l *Lbank) GetWithdrawConfig(assetCode string) ([]WithdrawConfigResponse, e
|
||||
}
|
||||
|
||||
// Withdraw sends a withdrawal request
|
||||
func (l *Lbank) Withdraw(account, assetCode, amount, memo, mark string) (WithdrawResponse, error) {
|
||||
func (l *Lbank) Withdraw(account, assetCode, amount, memo, mark, withdrawType string) (WithdrawResponse, error) {
|
||||
var resp WithdrawResponse
|
||||
params := url.Values{}
|
||||
params.Set("account", account)
|
||||
@@ -485,6 +485,9 @@ func (l *Lbank) Withdraw(account, assetCode, amount, memo, mark string) (Withdra
|
||||
if mark != "" {
|
||||
params.Set("mark", mark)
|
||||
}
|
||||
if withdrawType != "" {
|
||||
params.Set("type", withdrawType)
|
||||
}
|
||||
path := fmt.Sprintf("%s/v%s/%s", l.APIUrl, lbankAPIVersion, lbankWithdraw)
|
||||
err := l.SendAuthHTTPRequest(http.MethodPost, path, params, &resp)
|
||||
if err != nil {
|
||||
|
||||
@@ -2,7 +2,8 @@ package lbank
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sync"
|
||||
"log"
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -19,35 +20,26 @@ const (
|
||||
)
|
||||
|
||||
var l Lbank
|
||||
var setupRan bool
|
||||
var m sync.Mutex
|
||||
|
||||
func TestSetup(t *testing.T) {
|
||||
t.Parallel()
|
||||
m.Lock()
|
||||
defer m.Unlock()
|
||||
|
||||
if setupRan {
|
||||
return
|
||||
}
|
||||
func TestMain(m *testing.M) {
|
||||
l.SetDefaults()
|
||||
cfg := config.GetConfig()
|
||||
err := cfg.LoadConfig("../../testdata/configtest.json")
|
||||
if err != nil {
|
||||
t.Errorf("Test Failed - Lbank Setup() init error:, %v", err)
|
||||
log.Fatal(err)
|
||||
}
|
||||
lbankConfig, err := cfg.GetExchangeConfig("Lbank")
|
||||
if err != nil {
|
||||
t.Errorf("Test Failed - Lbank Setup() init error: %v", err)
|
||||
log.Fatal(err)
|
||||
}
|
||||
lbankConfig.Websocket = true
|
||||
lbankConfig.AuthenticatedAPISupport = true
|
||||
lbankConfig.APISecret = testAPISecret
|
||||
lbankConfig.APIKey = testAPIKey
|
||||
l.Setup(&lbankConfig)
|
||||
setupRan = true
|
||||
}
|
||||
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
func areTestAPIKeysSet() bool {
|
||||
if l.APIKey != "" && l.APIKey != "Key" &&
|
||||
l.APISecret != "" && l.APISecret != "Secret" {
|
||||
@@ -57,55 +49,55 @@ func areTestAPIKeysSet() bool {
|
||||
}
|
||||
|
||||
func TestGetTicker(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
_, err := l.GetTicker("btc_usdt")
|
||||
if err != nil {
|
||||
t.Errorf("test failed: %v", err)
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetCurrencyPairs(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
_, err := l.GetCurrencyPairs()
|
||||
if err != nil {
|
||||
t.Errorf("test failed: %v", err)
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetMarketDepths(t *testing.T) {
|
||||
TestSetup(t)
|
||||
_, err := l.GetMarketDepths("btc_usdt", "60", "1")
|
||||
t.Parallel()
|
||||
_, err := l.GetMarketDepths("btc_usdt", "600", "1")
|
||||
if err != nil {
|
||||
t.Errorf("GetMarketDepth failed: %v", err)
|
||||
}
|
||||
a, _ := l.GetMarketDepths("btc_usdt", "60", "0")
|
||||
if len(a.Asks) != 60 {
|
||||
a, _ := l.GetMarketDepths("btc_usdt", "4", "0")
|
||||
if len(a.Asks) != 4 {
|
||||
t.Errorf("length requested doesnt match the output")
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetTrades(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
_, err := l.GetTrades("btc_usdt", "600", fmt.Sprintf("%v", time.Now().Unix()))
|
||||
if err != nil {
|
||||
t.Errorf("test failed: %v", err)
|
||||
t.Error(err)
|
||||
}
|
||||
a, err := l.GetTrades("btc_usdt", "600", "0")
|
||||
if len(a) != 600 && err != nil {
|
||||
t.Errorf("test failed: %v", err)
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetKlines(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
_, err := l.GetKlines("btc_usdt", "600", "minute1", fmt.Sprintf("%v", time.Now().Unix()))
|
||||
if err != nil {
|
||||
t.Errorf("test failed: %v", err)
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestUpdateOrderbook(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
p := currency.Pair{
|
||||
Delimiter: "_",
|
||||
Base: currency.ETH,
|
||||
@@ -118,7 +110,7 @@ func TestUpdateOrderbook(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetUserInfo(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
if !areTestAPIKeysSet() {
|
||||
t.Skip("API keys required but not set, skipping test")
|
||||
}
|
||||
@@ -129,22 +121,22 @@ func TestGetUserInfo(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCreateOrder(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
if !areTestAPIKeysSet() || !canManipulateRealOrders {
|
||||
t.Skip("skipping test, either api keys or manipulaterealorders isnt set correctly")
|
||||
}
|
||||
cp := currency.NewPairWithDelimiter(currency.BTC.String(), currency.USDT.String(), "_")
|
||||
_, err := l.CreateOrder(cp.Lower().String(), "what", 1231, 12314)
|
||||
if err == nil {
|
||||
t.Error("Test Failed - CreateOrder error cannot be nil")
|
||||
t.Error("CreateOrder error cannot be nil")
|
||||
}
|
||||
_, err = l.CreateOrder(cp.Lower().String(), "buy", 0, 0)
|
||||
if err == nil {
|
||||
t.Error("Test Failed - CreateOrder error cannot be nil")
|
||||
t.Error("CreateOrder error cannot be nil")
|
||||
}
|
||||
_, err = l.CreateOrder(cp.Lower().String(), "sell", 1231, 0)
|
||||
if err == nil {
|
||||
t.Error("Test Failed - CreateOrder error cannot be nil")
|
||||
t.Error("CreateOrder error cannot be nil")
|
||||
}
|
||||
_, err = l.CreateOrder(cp.Lower().String(), "buy", 58, 681)
|
||||
if err != nil {
|
||||
@@ -153,7 +145,7 @@ func TestCreateOrder(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRemoveOrder(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
if !areTestAPIKeysSet() || !canManipulateRealOrders {
|
||||
t.Skip("skipping test, either api keys or manipulaterealorders isnt set correctly")
|
||||
}
|
||||
@@ -165,7 +157,7 @@ func TestRemoveOrder(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestQueryOrder(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
if !areTestAPIKeysSet() {
|
||||
t.Skip("API keys required but not set, skipping test")
|
||||
}
|
||||
@@ -177,19 +169,19 @@ func TestQueryOrder(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestQueryOrderHistory(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
if !areTestAPIKeysSet() {
|
||||
t.Skip("API keys required but not set, skipping test")
|
||||
}
|
||||
cp := currency.NewPairWithDelimiter(currency.BTC.String(), currency.USDT.String(), "_")
|
||||
_, err := l.QueryOrderHistory(cp.Lower().String(), "1", "100")
|
||||
if err != nil {
|
||||
t.Errorf("test failed: %v", err)
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetPairInfo(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
_, err := l.GetPairInfo()
|
||||
if err != nil {
|
||||
t.Errorf("couldnt get pair info: %v", err)
|
||||
@@ -197,7 +189,7 @@ func TestGetPairInfo(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestOrderTransactionDetails(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
if !areTestAPIKeysSet() {
|
||||
t.Skip("API keys required but not set, skipping test")
|
||||
}
|
||||
@@ -208,7 +200,7 @@ func TestOrderTransactionDetails(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestTransactionHistory(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
if !areTestAPIKeysSet() {
|
||||
t.Skip("API keys required but not set, skipping test")
|
||||
}
|
||||
@@ -219,7 +211,7 @@ func TestTransactionHistory(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetOpenOrders(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
if !areTestAPIKeysSet() {
|
||||
t.Skip("API keys required but not set, skipping test")
|
||||
}
|
||||
@@ -231,7 +223,7 @@ func TestGetOpenOrders(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestUSD2RMBRate(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
_, err := l.USD2RMBRate()
|
||||
if err != nil {
|
||||
t.Error("unable to acquire the rate")
|
||||
@@ -239,7 +231,7 @@ func TestUSD2RMBRate(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetWithdrawConfig(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
_, err := l.GetWithdrawConfig("eth")
|
||||
if err != nil {
|
||||
t.Errorf("unable to get withdraw config: %v", err)
|
||||
@@ -247,18 +239,18 @@ func TestGetWithdrawConfig(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestWithdraw(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
if !areTestAPIKeysSet() || !canManipulateRealOrders {
|
||||
t.Skip("skipping test, either api keys or manipulaterealorders isnt set correctly")
|
||||
}
|
||||
_, err := l.Withdraw("", "", "", "", "")
|
||||
_, err := l.Withdraw("", "", "", "", "", "")
|
||||
if err != nil {
|
||||
t.Errorf("unable to withdraw: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetWithdrawRecords(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
if !areTestAPIKeysSet() {
|
||||
t.Skip("API keys required but not set, skipping test")
|
||||
}
|
||||
@@ -269,7 +261,7 @@ func TestGetWithdrawRecords(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestLoadPrivKey(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
if !areTestAPIKeysSet() {
|
||||
t.Skip("API keys required but not set, skipping test")
|
||||
}
|
||||
@@ -285,7 +277,7 @@ func TestLoadPrivKey(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSign(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
if !areTestAPIKeysSet() {
|
||||
t.Skip("API keys required but not set, skipping test")
|
||||
}
|
||||
@@ -293,24 +285,24 @@ func TestSign(t *testing.T) {
|
||||
l.loadPrivKey()
|
||||
_, err := l.sign("hello123")
|
||||
if err != nil {
|
||||
t.Errorf("test failed: %v", err)
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSubmitOrder(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
if !areTestAPIKeysSet() {
|
||||
t.Skip("API keys required but not set, skipping test")
|
||||
}
|
||||
cp := currency.NewPairWithDelimiter(currency.BTC.String(), currency.USDT.String(), "_")
|
||||
_, err := l.SubmitOrder(cp.Lower(), "BUY", "ANY", 2, 1312, "")
|
||||
if err != nil {
|
||||
t.Errorf("test failed: %v", err)
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCancelOrder(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
if !areTestAPIKeysSet() || !canManipulateRealOrders {
|
||||
t.Skip("skipping test, either api keys or manipulaterealorders isnt set correctly")
|
||||
}
|
||||
@@ -320,34 +312,34 @@ func TestCancelOrder(t *testing.T) {
|
||||
a.OrderID = "24f7ce27-af1d-4dca-a8c1-ef1cbeec1b23"
|
||||
err := l.CancelOrder(&a)
|
||||
if err != nil {
|
||||
t.Errorf("test failed: %v", err)
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetOrderInfo(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
if !areTestAPIKeysSet() {
|
||||
t.Skip("API keys required but not set, skipping test")
|
||||
}
|
||||
_, err := l.GetOrderInfo("9ead39f5-701a-400b-b635-d7349eb0f6b")
|
||||
if err != nil {
|
||||
t.Errorf("test failed: %v", err)
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetAllOpenOrderID(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
if !areTestAPIKeysSet() {
|
||||
t.Skip("API keys required but not set, skipping test")
|
||||
}
|
||||
_, err := l.getAllOpenOrderID()
|
||||
if err != nil {
|
||||
t.Errorf("test failed: %v", err)
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetFeeByType(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
cp := currency.NewPairWithDelimiter(currency.BTC.String(), currency.USDT.String(), "_")
|
||||
var input exchange.FeeBuilder
|
||||
input.Amount = 2
|
||||
@@ -355,7 +347,7 @@ func TestGetFeeByType(t *testing.T) {
|
||||
input.Pair = cp
|
||||
a, err := l.GetFeeByType(&input)
|
||||
if err != nil {
|
||||
t.Errorf("test failed. couldnt get fee: %v", err)
|
||||
t.Errorf("couldnt get fee: %v", err)
|
||||
}
|
||||
if a != 0.0005 {
|
||||
t.Errorf("testGetFeeByType failed. Expected: 0.0005, Received: %v", a)
|
||||
@@ -363,7 +355,7 @@ func TestGetFeeByType(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetAccountInfo(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
if !areTestAPIKeysSet() {
|
||||
t.Skip("API keys required but not set, skipping test")
|
||||
}
|
||||
@@ -374,7 +366,7 @@ func TestGetAccountInfo(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetOrderHistory(t *testing.T) {
|
||||
TestSetup(t)
|
||||
t.Parallel()
|
||||
if !areTestAPIKeysSet() {
|
||||
t.Skip("API keys required but not set, skipping test")
|
||||
}
|
||||
|
||||
@@ -28,13 +28,13 @@ func (l *Lbank) Start(wg *sync.WaitGroup) {
|
||||
// Run implements the Lbank wrapper
|
||||
func (l *Lbank) Run() {
|
||||
if l.Verbose {
|
||||
log.Debugf("%s Websocket: %s. (url: %s).\n", l.GetName(), common.IsEnabled(l.Websocket.IsEnabled()), l.Websocket.GetWebsocketURL())
|
||||
log.Debugf("%s polling delay: %ds.\n", l.GetName(), l.RESTPollingDelay)
|
||||
log.Debugf("%s %d currencies enabled: %s.\n", l.GetName(), len(l.EnabledPairs), l.EnabledPairs)
|
||||
log.Debugf("%s Websocket: %s. (url: %s).\n", l.Name, common.IsEnabled(l.Websocket.IsEnabled()), l.Websocket.GetWebsocketURL())
|
||||
log.Debugf("%s polling delay: %ds.\n", l.Name, l.RESTPollingDelay)
|
||||
log.Debugf("%s %d currencies enabled: %s.\n", l.Name, len(l.EnabledPairs), l.EnabledPairs)
|
||||
}
|
||||
exchangeCurrencies, err := l.GetCurrencyPairs()
|
||||
if err != nil {
|
||||
log.Errorf("%s Failed to get available symbols.\n", l.GetName())
|
||||
log.Errorf("%s Failed to get available symbols.\n", l.Name)
|
||||
} else {
|
||||
var newExchangeCurrencies currency.Pairs
|
||||
for _, p := range exchangeCurrencies {
|
||||
@@ -43,7 +43,7 @@ func (l *Lbank) Run() {
|
||||
}
|
||||
err = l.UpdateCurrencies(newExchangeCurrencies, false, true)
|
||||
if err != nil {
|
||||
log.Errorf("%s Failed to update available currencies %s.\n", l.GetName(), err)
|
||||
log.Errorf("%s Failed to update available currencies %s.\n", l.Name, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,7 +61,7 @@ func (l *Lbank) UpdateTicker(p currency.Pair, assetType string) (ticker.Price, e
|
||||
tickerPrice.Volume = tickerInfo.Ticker.Volume
|
||||
tickerPrice.Low = tickerInfo.Ticker.Low
|
||||
|
||||
err = ticker.ProcessTicker(l.GetName(), &tickerPrice, assetType)
|
||||
err = ticker.ProcessTicker(l.Name, &tickerPrice, assetType)
|
||||
if err != nil {
|
||||
return tickerPrice, err
|
||||
}
|
||||
@@ -71,7 +71,7 @@ func (l *Lbank) UpdateTicker(p currency.Pair, assetType string) (ticker.Price, e
|
||||
|
||||
// GetTickerPrice returns the ticker for a currency pair
|
||||
func (l *Lbank) GetTickerPrice(p currency.Pair, assetType string) (ticker.Price, error) {
|
||||
tickerNew, err := ticker.GetTicker(l.GetName(), exchange.FormatExchangeCurrency(l.Name, p), assetType)
|
||||
tickerNew, err := ticker.GetTicker(l.Name, exchange.FormatExchangeCurrency(l.Name, p), assetType)
|
||||
if err != nil {
|
||||
return l.UpdateTicker(p, assetType)
|
||||
}
|
||||
@@ -80,7 +80,7 @@ func (l *Lbank) GetTickerPrice(p currency.Pair, assetType string) (ticker.Price,
|
||||
|
||||
// GetOrderbookEx returns orderbook base on the currency pair
|
||||
func (l *Lbank) GetOrderbookEx(currency currency.Pair, assetType string) (orderbook.Base, error) {
|
||||
ob, err := orderbook.Get(l.GetName(), currency, assetType)
|
||||
ob, err := orderbook.Get(l.Name, currency, assetType)
|
||||
if err != nil {
|
||||
return l.UpdateOrderbook(currency, assetType)
|
||||
}
|
||||
@@ -105,7 +105,7 @@ func (l *Lbank) UpdateOrderbook(p currency.Pair, assetType string) (orderbook.Ba
|
||||
Amount: a.Bids[i][1]})
|
||||
}
|
||||
orderBook.Pair = p
|
||||
orderBook.ExchangeName = l.GetName()
|
||||
orderBook.ExchangeName = l.Name
|
||||
orderBook.AssetType = assetType
|
||||
err = orderBook.Process()
|
||||
if err != nil {
|
||||
@@ -145,7 +145,7 @@ func (l *Lbank) GetAccountInfo() (exchange.AccountInfo, error) {
|
||||
}
|
||||
|
||||
info.Accounts = append(info.Accounts, account)
|
||||
info.Exchange = l.GetName()
|
||||
info.Exchange = l.Name
|
||||
return info, nil
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ func (l *Lbank) GetOrderInfo(orderID string) (exchange.OrderDetail, error) {
|
||||
if err != nil {
|
||||
return resp, err
|
||||
}
|
||||
resp.Exchange = l.GetName()
|
||||
resp.Exchange = l.Name
|
||||
resp.CurrencyPair = currency.NewPairFromString(key)
|
||||
if strings.EqualFold(tempResp.Orders[0].Type, "buy") {
|
||||
resp.OrderSide = exchange.BuyOrderSide
|
||||
@@ -307,7 +307,9 @@ func (l *Lbank) GetDepositAddress(cryptocurrency currency.Code, accountID string
|
||||
// WithdrawCryptocurrencyFunds returns a withdrawal ID when a withdrawal is
|
||||
// submitted
|
||||
func (l *Lbank) WithdrawCryptocurrencyFunds(withdrawRequest *exchange.WithdrawRequest) (string, error) {
|
||||
resp, err := l.Withdraw(withdrawRequest.Address, withdrawRequest.Currency.String(), strconv.FormatFloat(withdrawRequest.Amount, 'f', -1, 64), "", withdrawRequest.Description)
|
||||
resp, err := l.Withdraw(withdrawRequest.Address, withdrawRequest.Currency.String(),
|
||||
strconv.FormatFloat(withdrawRequest.Amount, 'f', -1, 64), "",
|
||||
withdrawRequest.Description, "")
|
||||
return resp.WithdrawID, err
|
||||
}
|
||||
|
||||
@@ -343,7 +345,7 @@ func (l *Lbank) GetActiveOrders(getOrdersRequest *exchange.GetOrdersRequest) ([]
|
||||
if err != nil {
|
||||
return finalResp, err
|
||||
}
|
||||
resp.Exchange = l.GetName()
|
||||
resp.Exchange = l.Name
|
||||
resp.CurrencyPair = currency.NewPairFromString(key)
|
||||
if strings.EqualFold(tempResp.Orders[0].Type, "buy") {
|
||||
resp.OrderSide = exchange.BuyOrderSide
|
||||
@@ -418,7 +420,7 @@ func (l *Lbank) GetOrderHistory(getOrdersRequest *exchange.GetOrdersRequest) ([]
|
||||
return finalResp, err
|
||||
}
|
||||
for x := 0; x < len(tempResp.Orders); x++ {
|
||||
resp.Exchange = l.GetName()
|
||||
resp.Exchange = l.Name
|
||||
resp.CurrencyPair = currency.NewPairFromString(tempResp.Orders[x].Symbol)
|
||||
if strings.EqualFold(tempResp.Orders[x].Type, "buy") {
|
||||
resp.OrderSide = exchange.BuyOrderSide
|
||||
|
||||
Reference in New Issue
Block a user