Pro Feature. Requires a Pro or Ultra subscription. Get started at api.mathematicalcompany.com
Parity Arbitrage
When the YES ask + NO ask on the same exchange sums to less than $1.00, buying both sides locks in guaranteed profit. This is the simplest and lowest-risk arbitrage method.How It Works
In a binary prediction market, one outcome must resolve to $1.00. If you can buy YES at $0.45 and NO at $0.48, your total cost is $0.93, guaranteeing $0.07 profit (minus fees).Engine Methods
scan_parity_arb
ParityArbitrageOpportunity or None.
execute_parity_arb
Pipeline: parity_arb_scanner
| Parameter | Type | Default | Description |
|---|---|---|---|
market_id | str | required | Market to scan |
exchange | str | "paper" | Exchange name |
feed_name | str or None | None | Feed to read (defaults to exchange name) |
min_edge | float | 0.005 | Minimum net edge |
max_size | float | 50.0 | Maximum trade size |
fee_rate | float | 0.002 | Fee rate per trade |
auto_execute | bool | False | Auto-execute opportunities |
cooldown | float | 5.0 | Seconds between executions |
ParityArbitrageOpportunity in ctx.params["last_parity_arb"].
One-Shot: parity_arb_sweep
ArbResult or None.
Rust Type: ParityArbitrageOpportunity
| Field | Type | Description |
|---|---|---|
market_id | str | Market identifier |
exchange | str | Exchange name |
yes_ask | float | YES ask price |
no_ask | float | NO ask price |
total_cost | float | YES + NO cost |
raw_edge | float | 1.0 - total_cost |
net_edge | float | Edge after fees |
max_size | float | Maximum executable size |
is_executable | bool | Whether edge > 0 and size > 0 |