mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-24 23:16:52 +00:00
Getting closed orders implementation, fixed Binance MARKET order creation, expanded SubmitOrder response (#572)
* 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 Co-authored-by: Vazha Bezhanishvili <vazha.bezhanishvili@elegro.eu>
This commit is contained in:
@@ -106,7 +106,7 @@ func (w Wrapper) Pairs(exch string, _ bool, _ asset.Item) (*currency.Pairs, erro
|
||||
}
|
||||
|
||||
// QueryOrder validator for test execution/scripts
|
||||
func (w Wrapper) QueryOrder(exch, _ string) (*order.Detail, error) {
|
||||
func (w Wrapper) QueryOrder(exch, _ string, _ currency.Pair, _ asset.Item) (*order.Detail, error) {
|
||||
if exch == exchError.String() {
|
||||
return nil, errTestFailed
|
||||
}
|
||||
|
||||
@@ -137,12 +137,12 @@ func TestWrapper_Pairs(t *testing.T) {
|
||||
func TestWrapper_QueryOrder(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
_, err := testWrapper.QueryOrder(exchName, orderID)
|
||||
_, err := testWrapper.QueryOrder(exchName, orderID, currency.Pair{}, assetType)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
_, err = testWrapper.QueryOrder(exchError.String(), "")
|
||||
_, err = testWrapper.QueryOrder(exchError.String(), "", currency.Pair{}, assetType)
|
||||
if err == nil {
|
||||
t.Fatal("expected QueryOrder to return error on invalid name")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user