Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/common/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -352,4 +352,4 @@ export class TargetBasePositionValue {

export class CancelAllOrdersRequest {
constructor() {}
}
}