mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-02 15:10:46 +00:00
Bugfix: Submit/Cancel order scripting errors + Ordermanager GetOrder & CancelOrder improvements (#584)
* Fixes Submit and Cancel order functions for scripting. Adds tests to ensure that wrapper functions actually execute as expected. Adds more coverage. Fixes a few other tests * Fixes issues * Simplifies tests * Update cancel order to properly cancel an order. Adds example script. Adds sweet tests. * Fixes bad test setup for cancelling orders * Adds new order manager GetOrderInfo function to call the wrapper function and then store it in the order manager * Addresses order concerns * LOWERS THE CASE OF ALL EXCHANGE NAMES BECAUSE ORDER MANAGER NEVER CARED ABOUT CASING OR YOUR FAMILY * Removes asset and currency requirement from cancelling orders via validation test * Fixes old cancel order assumptions that had requirements for currency and asset * Moves all the logs and events to the dedicated Cancel function instead of exclusively doing it in CancelAllOrders * Adds more detail logging. Fixes lbank fee test * Addresses comms manager issues * Removes go routine for pushing events. Better to let them fail
This commit is contained in:
9
gctscript/examples/exchange/cancel_order.gct
Normal file
9
gctscript/examples/exchange/cancel_order.gct
Normal file
@@ -0,0 +1,9 @@
|
||||
fmt := import("fmt")
|
||||
exch := import("exchange")
|
||||
|
||||
load := func() {
|
||||
info := exch.ordercancel("binance","13371337", "btc-usdt", "spot")
|
||||
fmt.println(info)
|
||||
}
|
||||
|
||||
load()
|
||||
@@ -2,7 +2,7 @@ fmt := import("fmt")
|
||||
exch := import("exchange")
|
||||
|
||||
load := func() {
|
||||
info := exch.ordersubmit("BTC Markets","BTC-AUD","-","LIMIT","SELL",1000000, 1,"", SPOT)
|
||||
info := exch.ordersubmit("BTC Markets","BTC-AUD","-","LIMIT","SELL",1000000, 1,"", "spot")
|
||||
fmt.println(info)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user