Skip to content

Commit 377b102

Browse files
committed
remove UUID from bitget
1 parent f993214 commit 377b102

File tree

4 files changed

+0
-21
lines changed

4 files changed

+0
-21
lines changed

pkg/exchange/bitget/convert.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"errors"
55
"fmt"
66
"math"
7-
"strconv"
87
"time"
98

109
v2 "github.com/c9s/bbgo/pkg/exchange/bitget/bitgetapi/v2"
@@ -231,7 +230,6 @@ func unfilledOrderToGlobalOrder(order v2.UnfilledOrder) (*types.Order, error) {
231230
},
232231
Exchange: types.ExchangeBitget,
233232
OrderID: uint64(order.OrderId),
234-
UUID: strconv.FormatInt(int64(order.OrderId), 10),
235233
Status: status,
236234
ExecutedQuantity: order.BaseVolume,
237235
IsWorking: order.Status.IsWorking(),
@@ -282,7 +280,6 @@ func toGlobalOrder(order v2.OrderDetail) (*types.Order, error) {
282280
},
283281
Exchange: types.ExchangeBitget,
284282
OrderID: uint64(order.OrderId),
285-
UUID: strconv.FormatInt(int64(order.OrderId), 10),
286283
Status: status,
287284
ExecutedQuantity: order.BaseVolume,
288285
IsWorking: order.Status.IsWorking(),
@@ -470,7 +467,6 @@ func (o *Order) toGlobalOrder() (types.Order, error) {
470467
},
471468
Exchange: types.ExchangeBitget,
472469
OrderID: uint64(o.OrderId),
473-
UUID: strconv.FormatInt(int64(o.OrderId), 10),
474470
Status: status,
475471
ExecutedQuantity: o.AccBaseVolume,
476472
IsWorking: o.Status.IsWorking(),

pkg/exchange/bitget/convert_test.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package bitget
22

33
import (
4-
"strconv"
54
"testing"
65
"time"
76

@@ -243,7 +242,6 @@ func Test_unfilledOrderToGlobalOrder(t *testing.T) {
243242
},
244243
Exchange: types.ExchangeBitget,
245244
OrderID: uint64(orderId),
246-
UUID: strconv.FormatInt(int64(orderId), 10),
247245
Status: types.OrderStatusNew,
248246
ExecutedQuantity: fixedpoint.NewFromFloat(0),
249247
IsWorking: true,
@@ -274,7 +272,6 @@ func Test_unfilledOrderToGlobalOrder(t *testing.T) {
274272
},
275273
Exchange: types.ExchangeBitget,
276274
OrderID: uint64(orderId),
277-
UUID: strconv.FormatInt(int64(orderId), 10),
278275
Status: types.OrderStatusNew,
279276
ExecutedQuantity: fixedpoint.Zero,
280277
IsWorking: true,
@@ -304,7 +301,6 @@ func Test_unfilledOrderToGlobalOrder(t *testing.T) {
304301
},
305302
Exchange: types.ExchangeBitget,
306303
OrderID: uint64(orderId),
307-
UUID: strconv.FormatInt(int64(orderId), 10),
308304
Status: types.OrderStatusNew,
309305
ExecutedQuantity: fixedpoint.Zero,
310306
IsWorking: true,
@@ -374,7 +370,6 @@ func Test_toGlobalOrder(t *testing.T) {
374370
},
375371
Exchange: types.ExchangeBitget,
376372
OrderID: uint64(orderId),
377-
UUID: strconv.FormatInt(int64(orderId), 10),
378373
Status: types.OrderStatusFilled,
379374
ExecutedQuantity: fixedpoint.NewFromFloat(5),
380375
IsWorking: false,
@@ -447,7 +442,6 @@ func Test_toGlobalOrder(t *testing.T) {
447442
},
448443
Exchange: types.ExchangeBitget,
449444
OrderID: uint64(orderId),
450-
UUID: strconv.FormatInt(int64(orderId), 10),
451445
Status: types.OrderStatusFilled,
452446
ExecutedQuantity: fixedpoint.NewFromFloat(5),
453447
IsWorking: false,
@@ -887,7 +881,6 @@ func TestOrder_toGlobalOrder(t *testing.T) {
887881
},
888882
Exchange: types.ExchangeBitget,
889883
OrderID: uint64(newO.OrderId),
890-
UUID: strconv.FormatInt(int64(newO.OrderId), 10),
891884
Status: types.OrderStatusPartiallyFilled,
892885
ExecutedQuantity: newO.AccBaseVolume,
893886
IsWorking: newO.Status.IsWorking(),
@@ -944,7 +937,6 @@ func TestOrder_toGlobalOrder(t *testing.T) {
944937
},
945938
Exchange: types.ExchangeBitget,
946939
OrderID: uint64(newO.OrderId),
947-
UUID: strconv.FormatInt(int64(newO.OrderId), 10),
948940
Status: types.OrderStatusPartiallyFilled,
949941
ExecutedQuantity: newO.AccBaseVolume,
950942
IsWorking: newO.Status.IsWorking(),
@@ -1003,7 +995,6 @@ func TestOrder_toGlobalOrder(t *testing.T) {
1003995
},
1004996
Exchange: types.ExchangeBitget,
1005997
OrderID: uint64(newO.OrderId),
1006-
UUID: strconv.FormatInt(int64(newO.OrderId), 10),
1007998
Status: types.OrderStatusPartiallyFilled,
1008999
ExecutedQuantity: newO.AccBaseVolume,
10091000
IsWorking: newO.Status.IsWorking(),
@@ -1062,7 +1053,6 @@ func TestOrder_toGlobalOrder(t *testing.T) {
10621053
},
10631054
Exchange: types.ExchangeBitget,
10641055
OrderID: uint64(newO.OrderId),
1065-
UUID: strconv.FormatInt(int64(newO.OrderId), 10),
10661056
Status: types.OrderStatusPartiallyFilled,
10671057
ExecutedQuantity: newO.AccBaseVolume,
10681058
IsWorking: newO.Status.IsWorking(),

pkg/exchange/bitget/exchange.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@ func (e *Exchange) SubmitOrder(ctx context.Context, order types.SubmitOrder) (cr
378378
SubmitOrder: order,
379379
Exchange: types.ExchangeBitget,
380380
OrderID: intOrderId,
381-
UUID: res.OrderId,
382381
Status: types.OrderStatusNew,
383382
ExecutedQuantity: fixedpoint.Zero,
384383
IsWorking: true,

pkg/exchange/bitget/exchange_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,6 @@ func TestExchange_SubmitOrder(t *testing.T) {
573573
},
574574
Exchange: types.ExchangeBitget,
575575
OrderID: 1148903850645331968,
576-
UUID: "1148903850645331968",
577576
Status: types.OrderStatusNew,
578577
ExecutedQuantity: fixedpoint.Zero,
579578
IsWorking: true,
@@ -950,7 +949,6 @@ func TestExchange_QueryOpenOrders(t *testing.T) {
950949
},
951950
Exchange: types.ExchangeBitget,
952951
OrderID: 1148903850645331968,
953-
UUID: "1148903850645331968",
954952
Status: types.OrderStatusNew,
955953
ExecutedQuantity: fixedpoint.Zero,
956954
IsWorking: true,
@@ -1145,7 +1143,6 @@ func TestExchange_QueryClosedOrders(t *testing.T) {
11451143
},
11461144
Exchange: types.ExchangeBitget,
11471145
OrderID: 1148903850645331968,
1148-
UUID: "1148903850645331968",
11491146
Status: types.OrderStatusCanceled,
11501147
ExecutedQuantity: fixedpoint.MustNewFromString("0"),
11511148
IsWorking: false,
@@ -1164,7 +1161,6 @@ func TestExchange_QueryClosedOrders(t *testing.T) {
11641161
},
11651162
Exchange: types.ExchangeBitget,
11661163
OrderID: 1148914989018062853,
1167-
UUID: "1148914989018062853",
11681164
Status: types.OrderStatusFilled,
11691165
ExecutedQuantity: fixedpoint.MustNewFromString("0.000089"),
11701166
IsWorking: false,
@@ -1222,7 +1218,6 @@ func TestExchange_QueryClosedOrders(t *testing.T) {
12221218
},
12231219
Exchange: types.ExchangeBitget,
12241220
OrderID: 1148903850645331968,
1225-
UUID: "1148903850645331968",
12261221
Status: types.OrderStatusCanceled,
12271222
ExecutedQuantity: fixedpoint.MustNewFromString("0"),
12281223
IsWorking: false,
@@ -1241,7 +1236,6 @@ func TestExchange_QueryClosedOrders(t *testing.T) {
12411236
},
12421237
Exchange: types.ExchangeBitget,
12431238
OrderID: 1148914989018062853,
1244-
UUID: "1148914989018062853",
12451239
Status: types.OrderStatusFilled,
12461240
ExecutedQuantity: fixedpoint.MustNewFromString("0.000089"),
12471241
IsWorking: false,

0 commit comments

Comments
 (0)