Skip to content

Commit

Permalink
Fix unit tests (adshao#549)
Browse files Browse the repository at this point in the history
Signed-off-by: adshao <[email protected]>
  • Loading branch information
adshao authored Mar 10, 2024
1 parent d8fca1e commit d3e61bd
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 25 deletions.
2 changes: 1 addition & 1 deletion v2/exchange_info_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ func (s *Symbol) MarketLotSizeFilter() *MarketLotSizeFilter {
return nil
}

//For specific meanings, please refer to the type definition MaxNumOrders
// For specific meanings, please refer to the type definition MaxNumOrders
func (s *Symbol) MaxNumOrdersFilter() *MaxNumOrdersFilter {
for _, filter := range s.Filters {
if filter["filterType"].(string) == string(SymbolFilterTypeMaxNumOrders) {
Expand Down
51 changes: 27 additions & 24 deletions v2/futures/order_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -665,30 +665,33 @@ func (s *orderServiceTestSuite) TestCreateBatchOrders() {
N: 3,
Orders: []*Order{
{
Symbol: "BTCUSDT",
OrderID: 22542179,
ClientOrderID: "testOrder",
Price: "100",
ReduceOnly: false,
OrigQuantity: "10",
ExecutedQuantity: "0",
CumQuantity: "0",
CumQuote: "0",
Status: "NEW",
TimeInForce: "GTC",
Type: "TRAILING_STOP_MARKET",
Side: "BUY",
StopPrice: "9300",
Time: 0,
UpdateTime: 1566818724722,
WorkingType: "CONTRACT_PRICE",
ActivatePrice: "9020",
PriceRate: "0.3",
AvgPrice: "0.00000",
OrigType: "TRAILING_STOP_MARKET",
PositionSide: "SHORT",
PriceProtect: false,
ClosePosition: false,
Symbol: "BTCUSDT",
OrderID: 22542179,
ClientOrderID: "testOrder",
Price: "100",
ReduceOnly: false,
OrigQuantity: "10",
ExecutedQuantity: "0",
CumQuantity: "0",
CumQuote: "0",
Status: "NEW",
TimeInForce: "GTC",
Type: "TRAILING_STOP_MARKET",
Side: "BUY",
StopPrice: "9300",
Time: 0,
UpdateTime: 1566818724722,
WorkingType: "CONTRACT_PRICE",
ActivatePrice: "9020",
PriceRate: "0.3",
AvgPrice: "0.00000",
OrigType: "TRAILING_STOP_MARKET",
PositionSide: "SHORT",
PriceProtect: false,
ClosePosition: false,
PriceMatch: "NONE",
SelfTradePreventionMode: "NONE",
GoodTillDate: 0,
},
},
Errors: []error{
Expand Down

0 comments on commit d3e61bd

Please sign in to comment.