diff --git a/src/common/models.ts b/src/common/models.ts index 2d1ed8586..9c5b34f74 100644 --- a/src/common/models.ts +++ b/src/common/models.ts @@ -33,7 +33,7 @@ export class GatewayMarketTrade implements ITimestamped { export function marketSideEquals(t: MarketSide, other: MarketSide, tol?: number) { tol = tol || 1e-4; if (other == null) return false; - return Math.abs(t.price - other.price) > tol && Math.abs(t.size - other.size) > tol; + return Math.abs(t.price - other.price) < tol && Math.abs(t.size - other.size) < tol; } export class Market implements ITimestamped { @@ -352,4 +352,4 @@ export class TargetBasePositionValue { export class CancelAllOrdersRequest { constructor() {} -} \ No newline at end of file +}