Merge branch 'master' into engine

This commit is contained in:
Adrian Gallagher
2019-06-06 14:57:32 +10:00
2 changed files with 5 additions and 10 deletions

View File

@@ -78,7 +78,7 @@ type OrderToGo struct {
// Order holds order information
type Order struct {
ID string `json:"id"`
ID int64 `json:"id"`
Currency string `json:"currency"`
Instrument string `json:"instrument"`
OrderSide string `json:"orderSide"`

View File

@@ -323,12 +323,7 @@ func (b *BTCMarkets) CancelAllOrders(_ *exchange.OrderCancellation) (exchange.Ca
var orderList []int64
for i := range openOrders {
orderIDInt, err := strconv.ParseInt(openOrders[i].ID, 10, 64)
if err != nil {
cancelAllOrdersResponse.OrderStatus[openOrders[i].ID] = err.Error()
continue
}
orderList = append(orderList, orderIDInt)
orderList = append(orderList, openOrders[i].ID)
}
if len(orderList) > 0 {
@@ -381,7 +376,7 @@ func (b *BTCMarkets) GetOrderInfo(orderID string) (exchange.OrderDetail, error)
OrderDetail.Amount = orders[i].Volume
OrderDetail.OrderDate = orderDate
OrderDetail.Exchange = b.GetName()
OrderDetail.ID = orders[i].ID
OrderDetail.ID = strconv.FormatInt(orders[i].ID, 10)
OrderDetail.RemainingAmount = orders[i].OpenVolume
OrderDetail.OrderSide = side
OrderDetail.OrderType = orderType
@@ -453,7 +448,7 @@ func (b *BTCMarkets) GetActiveOrders(getOrdersRequest *exchange.GetOrdersRequest
orderType := exchange.OrderType(strings.ToUpper(resp[i].OrderType))
openOrder := exchange.OrderDetail{
ID: resp[i].ID,
ID: strconv.FormatInt(resp[i].ID, 10),
Amount: resp[i].Volume,
Exchange: b.Name,
RemainingAmount: resp[i].OpenVolume,
@@ -522,7 +517,7 @@ func (b *BTCMarkets) GetOrderHistory(getOrdersRequest *exchange.GetOrdersRequest
orderType := exchange.OrderType(strings.ToUpper(respOrders[i].OrderType))
openOrder := exchange.OrderDetail{
ID: respOrders[i].ID,
ID: strconv.FormatInt(respOrders[i].ID, 10),
Amount: respOrders[i].Volume,
Exchange: b.Name,
RemainingAmount: respOrders[i].OpenVolume,