mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-29 15:10:37 +00:00
exchanges/engine: Add multichain deposit/withdrawal support (#794)
* Add exchange multichain support * Start tidying up * Add multichain transfer support for Bitfinex and fix poloniex bug * Add Coinbene multichain support * Start adjusting the deposit address manager * Fix deposit tests and further enhancements * Cleanup * Add bypass flag, expand tests plus error coverage for Huobi Adjust helpers * Address nitterinos * BFX wd changes * Address nitterinos * Minor fixes rebasing on master * Fix BFX acceptableMethods test * Add some TO-DOs for 2 tests WRT races * Fix acceptableMethods test round 2 * Address nitterinos
This commit is contained in:
@@ -46,6 +46,7 @@ const (
|
||||
getBalances = "/balances"
|
||||
getBalance = "/balances/%s"
|
||||
getDepositAddress = "/addresses/%s"
|
||||
depositAddresses = "/addresses/"
|
||||
getAllOpenOrders = "/orders/open"
|
||||
getOpenOrders = "/orders/open?marketSymbol=%s"
|
||||
getOrder = "/orders/%s"
|
||||
@@ -235,12 +236,26 @@ func (b *Bittrex) GetAccountBalanceByCurrency(ctx context.Context, currency stri
|
||||
return resp, b.SendAuthHTTPRequest(ctx, exchange.RestSpot, http.MethodGet, fmt.Sprintf(getBalance, currency), nil, nil, &resp, nil)
|
||||
}
|
||||
|
||||
// GetCryptoDepositAddresses is used to retrieve all deposit addresses
|
||||
func (b *Bittrex) GetCryptoDepositAddresses(ctx context.Context) ([]AddressData, error) {
|
||||
var resp []AddressData
|
||||
return resp, b.SendAuthHTTPRequest(ctx, exchange.RestSpot, http.MethodGet, depositAddresses, nil, nil, &resp, nil)
|
||||
}
|
||||
|
||||
// GetCryptoDepositAddress is used to retrieve an address for a specific currency
|
||||
func (b *Bittrex) GetCryptoDepositAddress(ctx context.Context, currency string) (AddressData, error) {
|
||||
var resp AddressData
|
||||
return resp, b.SendAuthHTTPRequest(ctx, exchange.RestSpot, http.MethodGet, fmt.Sprintf(getDepositAddress, currency), nil, nil, &resp, nil)
|
||||
}
|
||||
|
||||
// ProvisionNewDepositAddress provisions a new deposit address for a specific currency
|
||||
func (b *Bittrex) ProvisionNewDepositAddress(ctx context.Context, currency string) (*ProvisionNewAddressData, error) {
|
||||
req := make(map[string]interface{}, 1)
|
||||
req["currencySymbol"] = currency
|
||||
var resp ProvisionNewAddressData
|
||||
return &resp, b.SendAuthHTTPRequest(ctx, exchange.RestSpot, http.MethodPost, depositAddresses, nil, req, &resp, nil)
|
||||
}
|
||||
|
||||
// Withdraw is used to withdraw funds from your account.
|
||||
func (b *Bittrex) Withdraw(ctx context.Context, currency, paymentID, address string, quantity float64) (WithdrawalData, error) {
|
||||
req := make(map[string]interface{})
|
||||
|
||||
Reference in New Issue
Block a user