mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-07 15:11:03 +00:00
Engine changes
Add addr helpers (will be split off into own package) Engine status updates (log and data dir display) Use GetPairFormat for various exchanges instead of calling the config QA fixes Implement GCTRPC exchange deposit address handling
This commit is contained in:
@@ -505,6 +505,9 @@ func (b *Bitstamp) OpenInternationalBankWithdrawal(amount float64, currency,
|
||||
// crypto - example "btc", "ltc", "eth", "xrp" or "bch"
|
||||
func (b *Bitstamp) GetCryptoDepositAddress(crypto currency.Code) (string, error) {
|
||||
var resp string
|
||||
v2Resp := struct {
|
||||
Address string `json:"address"`
|
||||
}{}
|
||||
|
||||
switch crypto {
|
||||
case currency.BTC:
|
||||
@@ -512,20 +515,20 @@ func (b *Bitstamp) GetCryptoDepositAddress(crypto currency.Code) (string, error)
|
||||
b.SendAuthenticatedHTTPRequest(bitstampAPIBitcoinDeposit, false, nil, &resp)
|
||||
|
||||
case currency.LTC:
|
||||
return resp,
|
||||
b.SendAuthenticatedHTTPRequest(bitstampAPILitecoinDeposit, true, nil, &resp)
|
||||
return v2Resp.Address,
|
||||
b.SendAuthenticatedHTTPRequest(bitstampAPILitecoinDeposit, true, nil, &v2Resp)
|
||||
|
||||
case currency.ETH:
|
||||
return resp,
|
||||
b.SendAuthenticatedHTTPRequest(bitstampAPIEthereumDeposit, true, nil, &resp)
|
||||
return v2Resp.Address,
|
||||
b.SendAuthenticatedHTTPRequest(bitstampAPIEthereumDeposit, true, nil, &v2Resp)
|
||||
|
||||
case currency.XRP:
|
||||
return resp,
|
||||
b.SendAuthenticatedHTTPRequest(bitstampAPIXrpDeposit, true, nil, &resp)
|
||||
return v2Resp.Address,
|
||||
b.SendAuthenticatedHTTPRequest(bitstampAPIXrpDeposit, true, nil, &v2Resp)
|
||||
|
||||
case currency.BCH:
|
||||
return resp,
|
||||
b.SendAuthenticatedHTTPRequest(bitstampAPIBitcoinCashDeposit, true, nil, &resp)
|
||||
return v2Resp.Address,
|
||||
b.SendAuthenticatedHTTPRequest(bitstampAPIBitcoinCashDeposit, true, nil, &v2Resp)
|
||||
|
||||
default:
|
||||
return resp, fmt.Errorf("unsupported cryptocurrency string %s", crypto)
|
||||
|
||||
Reference in New Issue
Block a user