mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-30 07:26:46 +00:00
gRPC/Engine/Exchanges: Implement direct getwithdrawalshistory method (#600)
* GetClosedOrder implemented for Kraken and Binance, fixed Binance MARKET order creaton, added rate, fee and cost fileds on SubmitOrder responce * return Trades on Binance SubmitOrder, new validation methods on Binance and kraken GetClosedOrderInfo * removed the Binance extra method GetClosedOrder * func description corrected * removed price, fee and cost from SimulateOrder response, as we get all necessary info in response to calculate them on client side * GetClosedOrder implementation moved to GetOrderInfo * changed GetOrderInfo params * removed Canceled order.Type used for Kraken * update QueryOrder in gctscript * add missed params to QueryOrder validator (gctscript) * fixed testing issues * GetClosedOrder implemented for Kraken and Binance, fixed Binance MARKET order creaton, added rate, fee and cost fileds on SubmitOrder responce * return Trades on Binance SubmitOrder, new validation methods on Binance and kraken GetClosedOrderInfo * removed the Binance extra method GetClosedOrder * func description corrected * removed price, fee and cost from SimulateOrder response, as we get all necessary info in response to calculate them on client side * GetClosedOrder implementation moved to GetOrderInfo * changed GetOrderInfo params * removed Canceled order.Type used for Kraken * update QueryOrder in gctscript * add missed params to QueryOrder validator (gctscript) * fixed testing issues * pull previous changes * linter issues fix * updated query_order exmple in gctscript, fixed params check * removed orderPair unnecessary conversion * added wsCancelAllOrders, fixed bugs * fixed Kraken wsAddOrder method * cleanup * CancelBatchOrders implementation * changed CancelBatchOrders signature * fixed tests and wrappers * btcmarkets_test fix * cleanup * cleanup * changed CancelBatchOrders signature * fmt * Update configtest.json * Update configtest.json * rollback configtest * refactored Kraken wsHandleData to allow tests * removed unnecessary error test in TestWsAddOrderJSON * dependencies updates * fixed issue with PortfolioSleepDelay set on startup * add GetWithdrawalsHistory method to exchanges interface * param name changes * add extra params for Binance WithdrawStatus method * add Binance TestWithdrawHistory * linter errors fix Co-authored-by: Vazha Bezhanishvili <vazha.bezhanishvili@elegro.eu>
This commit is contained in:
@@ -324,6 +324,11 @@ func ({{.Variable}} *{{.CapitalName}}) GetFundingHistory() ([]exchange.FundHisto
|
||||
return nil, common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
// GetWithdrawalsHistory returns previous withdrawals data
|
||||
func ({{.Variable}} *{{.CapitalName}}) GetWithdrawalsHistory(c currency.Code) (resp []exchange.WithdrawalHistory, err error) {
|
||||
return nil, common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
// GetRecentTrades returns the most recent trades for a currency and asset
|
||||
func ({{.Variable}} *{{.CapitalName}}) GetRecentTrades(p currency.Pair, assetType asset.Item) ([]trade.Data, error) {
|
||||
return nil, common.ErrNotYetImplemented
|
||||
|
||||
@@ -2690,6 +2690,10 @@ var withdrawalRequestCommand = cli.Command{
|
||||
Name: "limit",
|
||||
Usage: "<limit>",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "currency",
|
||||
Usage: "<currency>",
|
||||
},
|
||||
},
|
||||
Action: withdrawlRequestByExchangeID,
|
||||
},
|
||||
@@ -2767,7 +2771,7 @@ func withdrawlRequestByExchangeID(c *cli.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
var exchange string
|
||||
var exchange, currency string
|
||||
if c.IsSet("exchange") {
|
||||
exchange = c.String("exchange")
|
||||
} else {
|
||||
@@ -2800,6 +2804,10 @@ func withdrawlRequestByExchangeID(c *cli.Context) error {
|
||||
}
|
||||
limit = limitStr
|
||||
}
|
||||
|
||||
if c.IsSet("currency") {
|
||||
currency = c.String("currency")
|
||||
}
|
||||
}
|
||||
|
||||
conn, err := setupClient()
|
||||
@@ -2815,6 +2823,7 @@ func withdrawlRequestByExchangeID(c *cli.Context) error {
|
||||
Exchange: exchange,
|
||||
Id: ID,
|
||||
Limit: int32(limit),
|
||||
Currency: currency,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user