mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-09 07:26:48 +00:00
Fix order issues on GateIo, Huobi, OkGroup and Poloniex (#280)
* fix balance responce
* Fixed OrderHistory unmarshalling on the GateIo
* fix int convertation in the GetOrderHistory function
* fix issue on order submit : Binance exchange raw response: {"code":-1102,"msg":"Mandatory parameter 'timeInForce' was not sent, was empty/null, or malformed."}
* Okgroup: fix issue on empty notional GetSpotOrderResponse
* Okgroup: fix issue with empty order status. order start is required for orderHistory request
* HUOBU: fix order currency mapping in GetActiveOrders method
* OKGroup: fix currency name on GetAccountInfo
* ZB: fixed wrong error code on order send method
* OKGroup: add missing fields to GetActiveOrders mapping
* huobi: add missing fields to GetActiveOrders/GetOrderHistory response mapping
* gateio: add order status field to GetActiveOrders response
* gateio: fix orderId on SubmitOrder response
* - poloniex: fix 422 on private API call
- poloniex: fix empty order history
* - poloniex: fix 422 on private API call (revert)
* GateIo: Fix unmarshalling issue
* Huobi: removing redundant breaks
* Huobi: fix rangeValCopy in GetActiveOrders/GetOrderHistory methods
This commit is contained in:
committed by
Adrian Gallagher
parent
c449568f6d
commit
b02d03da8b
@@ -124,11 +124,12 @@ type SpotNewOrderRequestParams struct {
|
||||
|
||||
// SpotNewOrderResponse Order response
|
||||
type SpotNewOrderResponse struct {
|
||||
OrderNumber int64 `json:"orderNumber"` // OrderID number
|
||||
Price float64 `json:"rate,string"` // Order price
|
||||
LeftAmount float64 `json:"leftAmount,string"` // The remaining amount to fill
|
||||
FilledAmount float64 `json:"filledAmount,string"` // The filled amount
|
||||
Filledrate float64 `json:"filledRate,string"` // FilledPrice
|
||||
OrderNumber int64 `json:"orderNumber"` // OrderID number
|
||||
Price float64 `json:"rate,string"` // Order price
|
||||
LeftAmount float64 `json:"leftAmount,string"` // The remaining amount to fill
|
||||
FilledAmount float64 `json:"filledAmount,string"` // The filled amount
|
||||
Filledrate interface{} `json:"filledRate"` // FilledPrice. if we send a market order, the exchange returns float64.
|
||||
// if we set a limit order, which will remain in the order book, the exchange will return the string
|
||||
}
|
||||
|
||||
// OpenOrdersResponse the main response from GetOpenOrders
|
||||
|
||||
@@ -224,7 +224,7 @@ func (g *Gateio) SubmitOrder(p currency.Pair, side exchange.OrderSide, _ exchang
|
||||
response, err := g.SpotNewOrder(spotNewOrderRequestParams)
|
||||
|
||||
if response.OrderNumber > 0 {
|
||||
submitOrderResponse.OrderID = fmt.Sprintf("%v", response)
|
||||
submitOrderResponse.OrderID = fmt.Sprintf("%v", response.OrderNumber)
|
||||
}
|
||||
|
||||
if err == nil {
|
||||
@@ -371,6 +371,7 @@ func (g *Gateio) GetActiveOrders(getOrdersRequest *exchange.GetOrdersRequest) ([
|
||||
OrderSide: side,
|
||||
Exchange: g.Name,
|
||||
CurrencyPair: symbol,
|
||||
Status: resp.Orders[i].Status,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user