mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
* Adds signature to all exchange wrappers * Adds funky new OrderHistoryRequest type. Updates signature for GetOrderHistory to use funky new type. Adds tests for GetOrderHistory on all exchanges. Implements GetOrderHistory for ANX * Fixes alphapoint, bitstamp, itbit, zb tests. Adds exchange functions FilterOrdersByStatusAndType, FilterOrdersByTickRange, FilterOrdersByCurrencies to easily filter returned orders. Adds tests for filters. Implements GetOrderHistory wrapper for Binance, bitfinex, bithumb, bitmex. Adds new filter funcs to implementations. * Adds bitstamp wrapper support * Splits up GetOrderHistory into GetOpenOrders and GetOrderHistory wraapper functions to distinguish between active and past. Renames exchange.GetOrderHistoryRequest to exchange.GetOrdersRequest. Renames any API exchange method named GetOpenOrders to GetActiveOrders. Adds test function TestGetOpenOrders for each exchange * Reimplements the split GetOrders and GetOrderHistory for alphapoint, anx, binance, bitfinex, bithumb, bitmex, bitstamp and bittrex. Renames orderType, orderStatus constants. Adds new exchange.FilterOrdersBySide and exchange.FilterOrdersByType and removes old exchange.FilterOrdersByStatusAndType. * Changes orderHistoryRequest to use currencypair array instead of strings, also adds fees and trade breakdown. Removes if statement preventing ANX/BTCMarkets testing. Implements Active order + Order history retrieval for Bittrex and BTCMarkets. * Adds support for coinut and coinbasepro * Adds Exmo support * Adds GateIO support * Adds Gemini support * Adds hitbtc, huobi, hadax, itbit, kraken support for open orders & order history. Fixes switch case break and fallthroughs. Adds filtering to gateio and gemini results * Adds support for LakeBTC, Liqui, Localbitcoin, OKCoin, OKEX * Adds poloniex support * Adds Wex support * Adds Yobit support. Updates Wex support * Adds ZB support. Removes ArrangeActAssert from tests * Changes baseCurrency + quoteCurrency exchange.OrderDetail properties to a pair.CurrencyPair. Adds exchange name to all implementations. Fixes EXMO TestSetup * Removes verbose setting from tests as verbosity increases the amount of noise return when testing. Noise is only helpful when debugging tests to get more helpful information to resolve the issue and so it is unnecessary to have such lengthy output when testing in bulk or via Travis CI. This commit therefore improves readability when there are no issues * Fixes issue where gemini test sandbox api url was overridden. Handles blank response from Gemini * Fixes verbose typo * Removes spacing for old act assert test comments. Limits previous infinite loop to 10 * Fixes issue with filtering where orderside is never specified * Uses proper capitalisation for ServerOrderID and OpenOrders. Reverts commenting out orde_id param for bithumb.GetOrderDetails. Removes unnecessary int logic * Removes JSON ID fields. Uses map where appropriate for exchange order side/type. Updates OrderDetail/GetOrdersRequest type to use time fields. Remvoes comments. Removes inappropriate variable name. Adds AccountID field for alphapoint. Fixes log message formatting. Lowers errorfs to warnfs for time conversion * Adds missed files * Removes blank line * Adds sorting options for orders. Adds concurrency warnings in comments. Adds test for NewCurrencyPairWithDelimiter. Removes (e *Base) from filter funcs. Updates references to filter funcs * Fixes rebase issues. Condenses append loops. * Fixes more receive typos. Removes some inline strings. Adds AskOrderSide and BidOrderSide. Removes hypothetical infinite loop * Fixes issue where allTrades wasn't used in loop. Fixes assignment/typing issues * Fixes formatting
516 lines
13 KiB
Go
516 lines
13 KiB
Go
package bittrex
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/thrasher-/gocryptotrader/common"
|
|
"github.com/thrasher-/gocryptotrader/config"
|
|
"github.com/thrasher-/gocryptotrader/currency/pair"
|
|
"github.com/thrasher-/gocryptotrader/currency/symbol"
|
|
exchange "github.com/thrasher-/gocryptotrader/exchanges"
|
|
)
|
|
|
|
// Please supply you own test keys here to run better tests.
|
|
const (
|
|
apiKey = ""
|
|
apiSecret = ""
|
|
canManipulateRealOrders = false
|
|
)
|
|
|
|
var b Bittrex
|
|
|
|
func TestSetDefaults(t *testing.T) {
|
|
b.SetDefaults()
|
|
if b.GetName() != "Bittrex" {
|
|
t.Error("Test Failed - Bittrex - SetDefaults() error")
|
|
}
|
|
}
|
|
|
|
func TestSetup(t *testing.T) {
|
|
cfg := config.GetConfig()
|
|
cfg.LoadConfig("../../testdata/configtest.json")
|
|
bConfig, err := cfg.GetExchangeConfig("Bittrex")
|
|
if err != nil {
|
|
t.Error("Test Failed - Bittrex Setup() init error")
|
|
}
|
|
bConfig.APIKey = apiKey
|
|
bConfig.APISecret = apiSecret
|
|
bConfig.AuthenticatedAPISupport = true
|
|
|
|
b.Setup(bConfig)
|
|
|
|
if !b.IsEnabled() ||
|
|
b.RESTPollingDelay != time.Duration(10) || b.Verbose ||
|
|
b.Websocket.IsEnabled() || len(b.BaseCurrencies) < 1 ||
|
|
len(b.AvailablePairs) < 1 || len(b.EnabledPairs) < 1 {
|
|
t.Error("Test Failed - Bittrex Setup values not set correctly")
|
|
}
|
|
}
|
|
|
|
func TestGetMarkets(t *testing.T) {
|
|
t.Parallel()
|
|
_, err := b.GetMarkets()
|
|
if err != nil {
|
|
t.Errorf("Test Failed - Bittrex - GetMarkets() error: %s", err)
|
|
}
|
|
}
|
|
|
|
func TestGetCurrencies(t *testing.T) {
|
|
t.Parallel()
|
|
_, err := b.GetCurrencies()
|
|
if err != nil {
|
|
t.Errorf("Test Failed - Bittrex - GetCurrencies() error: %s", err)
|
|
}
|
|
}
|
|
|
|
func TestGetTicker(t *testing.T) {
|
|
t.Parallel()
|
|
btc := "btc-ltc"
|
|
|
|
_, err := b.GetTicker(btc)
|
|
if err != nil {
|
|
t.Errorf("Test Failed - Bittrex - GetTicker() error: %s", err)
|
|
}
|
|
}
|
|
|
|
func TestGetMarketSummaries(t *testing.T) {
|
|
t.Parallel()
|
|
_, err := b.GetMarketSummaries()
|
|
if err != nil {
|
|
t.Errorf("Test Failed - Bittrex - GetMarketSummaries() error: %s", err)
|
|
}
|
|
}
|
|
|
|
func TestGetMarketSummary(t *testing.T) {
|
|
t.Parallel()
|
|
pairOne := "BTC-LTC"
|
|
|
|
_, err := b.GetMarketSummary(pairOne)
|
|
if err != nil {
|
|
t.Errorf("Test Failed - Bittrex - GetMarketSummary() error: %s", err)
|
|
}
|
|
}
|
|
|
|
func TestGetOrderbook(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
_, err := b.GetOrderbook("btc-ltc")
|
|
if err != nil {
|
|
t.Errorf("Test Failed - Bittrex - GetOrderbook() error: %s", err)
|
|
}
|
|
}
|
|
|
|
func TestGetMarketHistory(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
_, err := b.GetMarketHistory("btc-ltc")
|
|
if err != nil {
|
|
t.Errorf("Test Failed - Bittrex - GetMarketHistory() error: %s", err)
|
|
}
|
|
}
|
|
|
|
func TestPlaceBuyLimit(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
_, err := b.PlaceBuyLimit("btc-ltc", 1, 1)
|
|
if err == nil {
|
|
t.Error("Test Failed - Bittrex - PlaceBuyLimit() error")
|
|
}
|
|
}
|
|
|
|
func TestPlaceSellLimit(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
_, err := b.PlaceSellLimit("btc-ltc", 1, 1)
|
|
if err == nil {
|
|
t.Error("Test Failed - Bittrex - PlaceSellLimit() error")
|
|
}
|
|
}
|
|
|
|
func TestGetOpenOrders(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
_, err := b.GetOpenOrders("")
|
|
if err == nil {
|
|
t.Error("Test Failed - Bittrex - GetOrder() error")
|
|
}
|
|
_, err = b.GetOpenOrders("btc-ltc")
|
|
if err == nil {
|
|
t.Error("Test Failed - Bittrex - GetOrder() error")
|
|
}
|
|
}
|
|
|
|
func TestCancelExistingOrder(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
_, err := b.CancelExistingOrder("blaaaaaaa")
|
|
if err == nil {
|
|
t.Error("Test Failed - Bittrex - CancelExistingOrder() error")
|
|
}
|
|
}
|
|
|
|
func TestGetAccountBalances(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
_, err := b.GetAccountBalances()
|
|
if err == nil {
|
|
t.Error("Test Failed - Bittrex - GetAccountBalances() error")
|
|
}
|
|
}
|
|
|
|
func TestGetAccountBalanceByCurrency(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
_, err := b.GetAccountBalanceByCurrency("btc")
|
|
if err == nil {
|
|
t.Error("Test Failed - Bittrex - GetAccountBalanceByCurrency() error")
|
|
}
|
|
}
|
|
|
|
func TestGetOrder(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
_, err := b.GetOrder("0cb4c4e4-bdc7-4e13-8c13-430e587d2cc1")
|
|
if err == nil {
|
|
t.Error("Test Failed - Bittrex - GetOrder() error")
|
|
}
|
|
_, err = b.GetOrder("")
|
|
if err == nil {
|
|
t.Error("Test Failed - Bittrex - GetOrder() error")
|
|
}
|
|
}
|
|
|
|
func TestGetOrderHistoryForCurrency(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
_, err := b.GetOrderHistoryForCurrency("")
|
|
if err == nil {
|
|
t.Error("Test Failed - Bittrex - GetOrderHistory() error")
|
|
}
|
|
_, err = b.GetOrderHistoryForCurrency("btc-ltc")
|
|
if err == nil {
|
|
t.Error("Test Failed - Bittrex - GetOrderHistory() error")
|
|
}
|
|
}
|
|
|
|
func TestGetwithdrawalHistory(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
_, err := b.GetWithdrawalHistory("")
|
|
if err == nil {
|
|
t.Error("Test Failed - Bittrex - GetWithdrawalHistory() error")
|
|
}
|
|
_, err = b.GetWithdrawalHistory("btc-ltc")
|
|
if err == nil {
|
|
t.Error("Test Failed - Bittrex - GetWithdrawalHistory() error")
|
|
}
|
|
}
|
|
|
|
func TestGetDepositHistory(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
_, err := b.GetDepositHistory("")
|
|
if err == nil {
|
|
t.Error("Test Failed - Bittrex - GetDepositHistory() error")
|
|
}
|
|
_, err = b.GetDepositHistory("btc-ltc")
|
|
if err == nil {
|
|
t.Error("Test Failed - Bittrex - GetDepositHistory() error")
|
|
}
|
|
}
|
|
|
|
func setFeeBuilder() exchange.FeeBuilder {
|
|
return exchange.FeeBuilder{
|
|
Amount: 1,
|
|
Delimiter: "",
|
|
FeeType: exchange.CryptocurrencyTradeFee,
|
|
FirstCurrency: symbol.BTC,
|
|
SecondCurrency: symbol.LTC,
|
|
IsMaker: false,
|
|
PurchasePrice: 1,
|
|
}
|
|
}
|
|
|
|
func TestGetFee(t *testing.T) {
|
|
b.SetDefaults()
|
|
TestSetup(t)
|
|
|
|
var feeBuilder = setFeeBuilder()
|
|
|
|
// CryptocurrencyTradeFee Basic
|
|
if resp, err := b.GetFee(feeBuilder); resp != float64(0.0025) || err != nil {
|
|
t.Error(err)
|
|
t.Errorf("Test Failed - GetFee() error. Expected: %f, Received: %f", float64(0.0025), resp)
|
|
}
|
|
|
|
// CryptocurrencyTradeFee High quantity
|
|
feeBuilder = setFeeBuilder()
|
|
feeBuilder.Amount = 1000
|
|
feeBuilder.PurchasePrice = 1000
|
|
if resp, err := b.GetFee(feeBuilder); resp != float64(2500) || err != nil {
|
|
t.Errorf("Test Failed - GetFee() error. Expected: %f, Received: %f", float64(2500), resp)
|
|
t.Error(err)
|
|
}
|
|
|
|
// CryptocurrencyTradeFee IsMaker
|
|
feeBuilder = setFeeBuilder()
|
|
feeBuilder.IsMaker = true
|
|
if resp, err := b.GetFee(feeBuilder); resp != float64(0.0025) || err != nil {
|
|
t.Errorf("Test Failed - GetFee() error. Expected: %f, Received: %f", float64(0.0025), resp)
|
|
t.Error(err)
|
|
}
|
|
|
|
// CryptocurrencyTradeFee Negative purchase price
|
|
feeBuilder = setFeeBuilder()
|
|
feeBuilder.PurchasePrice = -1000
|
|
if resp, err := b.GetFee(feeBuilder); resp != float64(0) || err != nil {
|
|
t.Errorf("Test Failed - GetFee() error. Expected: %f, Received: %f", float64(0), resp)
|
|
t.Error(err)
|
|
}
|
|
|
|
// CryptocurrencyWithdrawalFee Basic
|
|
feeBuilder = setFeeBuilder()
|
|
feeBuilder.FeeType = exchange.CryptocurrencyWithdrawalFee
|
|
if resp, err := b.GetFee(feeBuilder); resp != float64(0.0005) || err != nil {
|
|
t.Errorf("Test Failed - GetFee() error. Expected: %f, Received: %f", float64(0.0005), resp)
|
|
t.Error(err)
|
|
}
|
|
|
|
// CyptocurrencyDepositFee Basic
|
|
feeBuilder = setFeeBuilder()
|
|
feeBuilder.FeeType = exchange.CyptocurrencyDepositFee
|
|
if resp, err := b.GetFee(feeBuilder); resp != float64(0) || err != nil {
|
|
t.Errorf("Test Failed - GetFee() error. Expected: %f, Received: %f", float64(0), resp)
|
|
t.Error(err)
|
|
}
|
|
|
|
// InternationalBankDepositFee Basic
|
|
feeBuilder = setFeeBuilder()
|
|
feeBuilder.FeeType = exchange.InternationalBankDepositFee
|
|
feeBuilder.CurrencyItem = symbol.HKD
|
|
if resp, err := b.GetFee(feeBuilder); resp != float64(0) || err != nil {
|
|
t.Errorf("Test Failed - GetFee() error. Expected: %f, Received: %f", float64(0), resp)
|
|
t.Error(err)
|
|
}
|
|
|
|
// InternationalBankWithdrawalFee Basic
|
|
feeBuilder = setFeeBuilder()
|
|
feeBuilder.FeeType = exchange.InternationalBankWithdrawalFee
|
|
feeBuilder.CurrencyItem = symbol.HKD
|
|
if resp, err := b.GetFee(feeBuilder); resp != float64(0) || err != nil {
|
|
t.Errorf("Test Failed - GetFee() error. Expected: %f, Received: %f", float64(0), resp)
|
|
t.Error(err)
|
|
}
|
|
}
|
|
|
|
func TestFormatWithdrawPermissions(t *testing.T) {
|
|
b.SetDefaults()
|
|
expectedResult := exchange.AutoWithdrawCryptoWithAPIPermissionText + " & " + exchange.NoFiatWithdrawalsText
|
|
|
|
withdrawPermissions := b.FormatWithdrawPermissions()
|
|
|
|
if withdrawPermissions != expectedResult {
|
|
t.Errorf("Expected: %s, Received: %s", expectedResult, withdrawPermissions)
|
|
}
|
|
}
|
|
|
|
func TestGetActiveOrders(t *testing.T) {
|
|
b.SetDefaults()
|
|
TestSetup(t)
|
|
|
|
var getOrdersRequest = exchange.GetOrdersRequest{
|
|
OrderType: exchange.AnyOrderType,
|
|
Currencies: []pair.CurrencyPair{pair.NewCurrencyPair(symbol.BTC, symbol.LTC)},
|
|
}
|
|
|
|
getOrdersRequest.Currencies[0].Delimiter = "-"
|
|
|
|
_, err := b.GetActiveOrders(getOrdersRequest)
|
|
if areTestAPIKeysSet() && err != nil {
|
|
t.Errorf("Could not get open orders: %s", err)
|
|
} else if !areTestAPIKeysSet() && err == nil {
|
|
t.Error("Expecting an error when no keys are set")
|
|
}
|
|
}
|
|
|
|
func TestGetOrderHistory(t *testing.T) {
|
|
b.SetDefaults()
|
|
TestSetup(t)
|
|
|
|
var getOrdersRequest = exchange.GetOrdersRequest{
|
|
OrderType: exchange.AnyOrderType,
|
|
}
|
|
|
|
_, err := b.GetOrderHistory(getOrdersRequest)
|
|
if areTestAPIKeysSet() && err != nil {
|
|
t.Errorf("Could not get order history: %s", err)
|
|
} else if !areTestAPIKeysSet() && err == nil {
|
|
t.Error("Expecting an error when no keys are set")
|
|
}
|
|
}
|
|
|
|
// Any tests below this line have the ability to impact your orders on the exchange. Enable canManipulateRealOrders to run them
|
|
// ----------------------------------------------------------------------------------------------------------------------------
|
|
func areTestAPIKeysSet() bool {
|
|
if b.APIKey != "" && b.APIKey != "Key" &&
|
|
b.APISecret != "" && b.APISecret != "Secret" {
|
|
return true
|
|
}
|
|
return false
|
|
}
|
|
|
|
func TestSubmitOrder(t *testing.T) {
|
|
b.SetDefaults()
|
|
TestSetup(t)
|
|
|
|
if areTestAPIKeysSet() && !canManipulateRealOrders {
|
|
t.Skip("API keys set, canManipulateRealOrders false, skipping test")
|
|
}
|
|
|
|
var p = pair.CurrencyPair{
|
|
Delimiter: "-",
|
|
FirstCurrency: symbol.BTC,
|
|
SecondCurrency: symbol.LTC,
|
|
}
|
|
response, err := b.SubmitOrder(p, exchange.BuyOrderSide, exchange.LimitOrderType, 1, 1, "clientId")
|
|
if areTestAPIKeysSet() && (err != nil || !response.IsOrderPlaced) {
|
|
t.Errorf("Order failed to be placed: %v", err)
|
|
} else if !areTestAPIKeysSet() && err == nil {
|
|
t.Error("Expecting an error when no keys are set")
|
|
}
|
|
}
|
|
|
|
func TestCancelExchangeOrder(t *testing.T) {
|
|
b.SetDefaults()
|
|
TestSetup(t)
|
|
|
|
if areTestAPIKeysSet() && !canManipulateRealOrders {
|
|
t.Skip("API keys set, canManipulateRealOrders false, skipping test")
|
|
}
|
|
|
|
currencyPair := pair.NewCurrencyPair(symbol.LTC, symbol.BTC)
|
|
|
|
var orderCancellation = exchange.OrderCancellation{
|
|
OrderID: "1",
|
|
WalletAddress: "1F5zVDgNjorJ51oGebSvNCrSAHpwGkUdDB",
|
|
AccountID: "1",
|
|
CurrencyPair: currencyPair,
|
|
}
|
|
|
|
err := b.CancelOrder(orderCancellation)
|
|
if !areTestAPIKeysSet() && err == nil {
|
|
t.Error("Expecting an error when no keys are set")
|
|
}
|
|
if areTestAPIKeysSet() && err != nil {
|
|
t.Errorf("Could not cancel orders: %v", err)
|
|
}
|
|
}
|
|
|
|
func TestCancelAllExchangeOrders(t *testing.T) {
|
|
b.SetDefaults()
|
|
TestSetup(t)
|
|
|
|
if areTestAPIKeysSet() && !canManipulateRealOrders {
|
|
t.Skip("API keys set, canManipulateRealOrders false, skipping test")
|
|
}
|
|
|
|
currencyPair := pair.NewCurrencyPair(symbol.LTC, symbol.BTC)
|
|
|
|
var orderCancellation = exchange.OrderCancellation{
|
|
OrderID: "1",
|
|
WalletAddress: "1F5zVDgNjorJ51oGebSvNCrSAHpwGkUdDB",
|
|
AccountID: "1",
|
|
CurrencyPair: currencyPair,
|
|
}
|
|
|
|
resp, err := b.CancelAllOrders(orderCancellation)
|
|
|
|
if !areTestAPIKeysSet() && err == nil {
|
|
t.Error("Expecting an error when no keys are set")
|
|
}
|
|
if areTestAPIKeysSet() && err != nil {
|
|
t.Errorf("Could not cancel orders: %v", err)
|
|
}
|
|
|
|
if len(resp.OrderStatus) > 0 {
|
|
t.Errorf("%v orders failed to cancel", len(resp.OrderStatus))
|
|
}
|
|
}
|
|
|
|
func TestModifyOrder(t *testing.T) {
|
|
_, err := b.ModifyOrder(exchange.ModifyOrder{})
|
|
if err == nil {
|
|
t.Error("Test failed - ModifyOrder() error")
|
|
}
|
|
}
|
|
|
|
func TestWithdraw(t *testing.T) {
|
|
b.SetDefaults()
|
|
TestSetup(t)
|
|
var withdrawCryptoRequest = exchange.WithdrawRequest{
|
|
Amount: 100,
|
|
Currency: symbol.LTC,
|
|
Address: "1F5zVDgNjorJ51oGebSvNCrSAHpwGkUdDB",
|
|
Description: "WITHDRAW IT ALL",
|
|
}
|
|
|
|
if areTestAPIKeysSet() && !canManipulateRealOrders {
|
|
t.Skip("API keys set, canManipulateRealOrders false, skipping test")
|
|
}
|
|
|
|
_, err := b.WithdrawCryptocurrencyFunds(withdrawCryptoRequest)
|
|
if !areTestAPIKeysSet() && err == nil {
|
|
t.Error("Expecting an error when no keys are set")
|
|
}
|
|
if areTestAPIKeysSet() && err != nil {
|
|
t.Errorf("Withdraw failed to be placed: %v", err)
|
|
}
|
|
}
|
|
|
|
func TestWithdrawFiat(t *testing.T) {
|
|
b.SetDefaults()
|
|
TestSetup(t)
|
|
|
|
if areTestAPIKeysSet() && !canManipulateRealOrders {
|
|
t.Skip("API keys set, canManipulateRealOrders false, skipping test")
|
|
}
|
|
|
|
var withdrawFiatRequest = exchange.WithdrawRequest{}
|
|
|
|
_, err := b.WithdrawFiatFunds(withdrawFiatRequest)
|
|
if err != common.ErrFunctionNotSupported {
|
|
t.Errorf("Expected '%v', received: '%v'", common.ErrFunctionNotSupported, err)
|
|
}
|
|
}
|
|
|
|
func TestWithdrawInternationalBank(t *testing.T) {
|
|
b.SetDefaults()
|
|
TestSetup(t)
|
|
|
|
if areTestAPIKeysSet() && !canManipulateRealOrders {
|
|
t.Skip("API keys set, canManipulateRealOrders false, skipping test")
|
|
}
|
|
|
|
var withdrawFiatRequest = exchange.WithdrawRequest{}
|
|
|
|
_, err := b.WithdrawFiatFundsToInternationalBank(withdrawFiatRequest)
|
|
if err != common.ErrFunctionNotSupported {
|
|
t.Errorf("Expected '%v', received: '%v'", common.ErrFunctionNotSupported, err)
|
|
}
|
|
}
|
|
|
|
func TestGetDepositAddress(t *testing.T) {
|
|
if areTestAPIKeysSet() {
|
|
_, err := b.GetDepositAddress(symbol.BTC, "")
|
|
if err != nil {
|
|
t.Error("Test Failed - GetDepositAddress() error", err)
|
|
}
|
|
} else {
|
|
_, err := b.GetDepositAddress(symbol.BTC, "")
|
|
if err == nil {
|
|
t.Error("Test Failed - GetDepositAddress() error cannot be nil")
|
|
}
|
|
}
|
|
}
|