Choosing a Platform for Pairs Trading and Stat Arb
Compare broker APIs for pairs trading and stat arb: spread execution, leg risk, borrow visibility, fractional shares, and what webhook automation can and cannot do.
Marketing
A pairs trade with one leg filled is a directional position you did not intend to hold. Before choosing a platform for pairs trading and stat arb, the question that matters most is not which broker has the lowest commissions: it is which broker can submit both legs as a single instrument, and what happens when none of them will do it the way you need. This article compares IBKR, tastytrade, TradeStation, Alpaca, and Tradier across the five requirements a stat arb workflow actually demands.
The five requirements, in priority order: simultaneous leg entry, short-side access with borrow visibility, machine-readable per-symbol borrow rates, dollar-neutral sizing mechanics, and low-latency data for spread monitoring. No single broker satisfies all five. The goal here is to show exactly where each one fails so you can decide which failure mode your strategy can tolerate.
One structural constraint affects every broker on this list equally: any webhook automation layer sends one order per signal, by design. That shapes what automation can and cannot do for pairs execution, and it is addressed directly before the broker-by-broker breakdown.
What the Workflow Actually Needs
Atomic vs. sequential leg execution
Atomic execution means both legs are submitted as a single net-priced instrument. The broker either fills both or neither. Sequential execution means the broker routes two independent orders: the second leg can fail, be delayed, or fill at a materially different price than the first. The wider the spread between first-leg submission and second-leg fill, the larger the unintended directional exposure. In fast markets, even a few hundred milliseconds of slippage between legs can open a gap that takes days of convergence profits to recover.
A half-filled pair is not a hedge. It is a naked directional position. Leg-risk management is therefore the first requirement, not an afterthought, and it determines which broker API you should use before any other factor is considered.
Requirement One: Simultaneous Leg Entry
Interactive Brokers: native spread contracts
IBKR's TWS API defines a spread as a BAG contract with two ComboLeg objects, each carrying a conId, ratio, and action (BUY or SELL), submitted as a single order to the SMART exchange.1 A stock-stock combo submitted this way is priced as a net spread, not as two independent orders, which eliminates the fill-gap risk present in sequential routing. The IBKR Web API documentation includes a dedicated section for combo and spread orders, and existing endpoints continue to receive features and updates alongside the unified Web API.2
TradeStation and tastytrade: legs accepted, separately routed
tastytrade's API accepts a PAIRS complex order type with a ratio-price-comparator and ratio-price-threshold, but the underlying legs are submitted and routed individually once the threshold triggers.3 Both brokers therefore carry leg risk: one leg can fill while the other is pending, rejected, or filled at a different price. Accepting both legs in a single request is not the same as atomic execution.
Tradier: no multi-leg equity spread support
Tradier's advanced order documentation covers OTO, OCO, and OTOCO, but its validations explicitly state that if both orders in an OCO are equities, the symbol must be the same.4 There is no cross-symbol equity spread order type at the API level. Traders using Tradier for pairs must submit each leg as a separate simple order and manage leg risk manually.
The Webhook Automation Constraint
One order per ticker, by design
A webhook payload carries a single ticker field, a single action field, and a single quantity. There is no structure for expressing two symbols in one signal. TradersPost routes one order per webhook signal, so a pairs entry requires two separate signals and two separate orders, arriving and routing sequentially rather than simultaneously. Atomic spread execution is not achievable through a webhook relay, regardless of which broker is connected, because the payload schema has no mechanism for a second leg.
What webhook automation is still useful for
For pairs traders who have already accepted leg risk, webhook routing can still automate entry and exit signals, stop-loss attachment via the stopLoss object, and order queueing. The cancelAfter field caps how long an entry order remains open before automatic cancellation, which limits how long a half-filled pair can persist. The bidAskSpreadFilter and bidAskSpreadFilterPercent fields can prevent entry when spread conditions are unfavorable. The practical ceiling for webhook-based pairs trading is semi-automated execution: signals fire the legs in sequence, and the trader monitors for partial fills.
Requirement Two: Short-Side Access and Borrow
Easy-to-borrow vs. hard-to-borrow mechanics
Alpaca's API distinguishes ETB from HTB at the asset level via the borrow_status field returned by GET /v2/assets/{symbol}. ETB shares carry zero locate and borrow fees for Trading API users, while HTB shares require a locate request before a short-sale order can be submitted.5 Alpaca's locate API (GET /v1/locates/quotes) returns available_qty and price per symbol, giving a machine-readable per-symbol borrow rate before the trade is placed.6
IBKR's SLB system displays quantity available, number of lenders, and current indicative borrow rate, updated periodically throughout the day, and is searchable by symbol, ISIN, or CUSIP.7 The SLB system also provides historical indicative borrow rates and downloadable lists of shortable securities grouped by country.
Tradier and TradeStation borrow visibility
Tradier publishes an ETB list endpoint (GET /markets/etb) that returns securities approved for short sale, with symbol, exchange, type, and description fields, but does not expose a per-symbol borrow rate.8 The Tradier ETB list confirms shortability but provides no cost data, so you cannot size the short leg against its carry cost from the API alone. TradeStation's documentation does not expose a machine-readable per-symbol borrow rate; shortability can be inferred from whether a sell-short order is accepted, but carry cost is not queryable programmatically.
tastytrade borrow visibility
tastytrade's instruments API supports filtering equities by lendability with values Easy To Borrow, Locate Required, and Preborrow, allowing a programmatic check of borrow status before order submission.9 This gives machine-readable borrow classification, though it returns a category rather than a numeric rate. Knowing a stock is Locate Required does not tell you the daily carry cost in basis points, which matters for sizing the short leg against its holding cost.
Requirement Three: Dollar-Neutral Sizing
The fractional share problem for the short leg
Alpaca explicitly states it does not support short sales in fractional orders; all fractional sell orders are marked long.10 According to that documentation, short-side fractional sizing is unavailable even though fractional long positions are supported. IBKR does not support fractional shares at all in the TradersPost integration (fractionalMaxDecimals is 0), so short-leg quantities must be whole numbers. TradeStation also has fractionalMaxDecimals of 0, meaning whole-share rounding is required on both legs.
Fitting the long leg to the short leg
Because the short leg must be in whole shares at most brokers, dollar-neutral sizing works in reverse: size the short leg first in whole shares, calculate the notional value, then fit the long leg to match that notional. The rounding error from whole-share constraints grows with price disparity between the pair. A $10 vs. $200 pair will have larger residual directional exposure than a $100 vs. $110 pair. Pairs traders should track and periodically rebalance this residual exposure rather than assuming the initial sizing remains dollar-neutral as prices diverge.
Requirement Four: Data for Spread Monitoring
IBKR market data lines and rate limits
IBKR Web API users receive 100 market data lines by default. After the first month, the allocation scales with the greater of monthly commissions divided by 8 or account equity divided by 10,000.2 The snapshot endpoint is rate-limited to 10 requests per second per authenticated session, and the historical market data endpoint allows only 5 concurrent requests.2 A spread monitor polling multiple pairs simultaneously must respect these limits or face a 429 status code and a potential 10-minute IP penalty.
Alpaca market data tiers
Alpaca's Basic plan provides real-time data from IEX only, with historical data limited to the latest 15 minutes and 200 API calls per minute. The Algo Trader Plus plan at $99 per month unlocks all US exchanges, unlimited WebSocket subscriptions, and 10,000 API calls per minute.11 For stat arb requiring consolidated tape data rather than IEX-only quotes, the Basic plan is insufficient: spread calculations built on IEX prints can diverge from NBBO in illiquid names. Alpaca's market data API supports real-time stock data via WebSocket, which is the practical path for monitoring multiple pairs simultaneously without polling.
Where Each Broker Lands
Broker comparison: key dimensions
- IBKR: Only commonly used retail broker that submits a two-symbol equity pair as a single net-priced BAG contract, eliminating atomic leg risk. Exposes indicative borrow rates via its SLB system. Does not support fractional shares in the TradersPost integration.
- tastytrade: Accepts both legs in one PAIRS complex order request but routes them as separate orders under the threshold trigger, so leg risk is not eliminated. Provides machine-readable lendability classification (Easy To Borrow, Locate Required, Preborrow) but not a numeric borrow rate. Supports fractional shares (
fractionalMaxDecimals: 8). - Alpaca: Provides the most detailed machine-readable borrow workflow including per-symbol locate quotes with price and available quantity. Supports fractional long positions; does not support fractional shorts. Routes each leg independently.
- Tradier and TradeStation: their documentation describes no cross-symbol spread order type and no machine-readable borrow rate feed. Both require whole-share sizing on both legs.
No broker satisfies all five requirements
IBKR wins on atomic execution but loses on fractional sizing and numeric borrow rates at the API level. Alpaca wins on borrow rate visibility, but its documentation states that fractional shares cannot be shorted and describes no atomic spread execution. tastytrade sits between the two: better borrow classification than Tradier or TradeStation, fractional sizing available on the long leg, but still sequential routing under the hood. The practical choice depends on which failure mode is more costly for your strategy: residual leg risk on entry, or imprecise dollar-neutral sizing from whole-share rounding.
If you are routing signals through a webhook automation platform, that choice is made for you on the execution side: leg risk is unavoidable, so the decision shifts to borrow visibility and sizing precision.
Managing Leg Risk When You Cannot Avoid It
Limit orders reduce, not eliminate, gap risk
Submitting both legs as limit orders at the current spread price limits the worst-case fill deviation but does not guarantee simultaneous execution. One leg may fill and the other may rest unfilled if the market moves. A tighter limit on the second leg increases the probability that both legs fill at the intended spread, at the cost of a higher probability of one-sided partial fills. Setting a short cancelAfter window on the entry signal caps how long a half-filled pair persists before the stale leg is automatically canceled.
Monitoring and unwinding partial fills
A one-leg fill should trigger an immediate review: either complete the pair at the current market price or unwind the filled leg to return to flat. Maintaining a position monitor that tracks net delta across both legs continuously, not just at entry, is essential for any strategy that relies on market neutrality. Wider bid-ask spreads at entry increase the cost of an emergency unwind. Using the bidAskSpreadFilter or bidAskSpreadFilterPercent fields in a webhook payload can prevent entry when spread conditions are unfavorable, reducing the cost of a potential unwind before it is needed.
Bottom Line
- IBKR is the only commonly used retail broker that submits a stock-stock pair as a single net-priced BAG contract, eliminating fill-gap risk between legs.
- tastytrade and Alpaca offer the most useful machine-readable borrow data: tastytrade provides lendability categories; Alpaca provides per-symbol locate quotes with numeric pricing.
- Each vendor's documentation states that fractional short positions are unavailable at Alpaca, IBKR, and TradeStation; size the short leg in whole shares first, then fit the long leg to the resulting notional.
- Webhook automation sends one order per signal, which means leg risk is structurally unavoidable when routing pairs trades through any webhook-based platform, regardless of broker.
- No single broker satisfies all five stat arb requirements simultaneously; match your broker choice to the failure mode your strategy can most afford to accept.
Frequently Asked Questions
Which broker actually executes both legs of a stock pair as a single order?
Interactive Brokers is the only commonly used retail broker that supports a native stock-stock spread contract (BAG type with ComboLeg objects), submitted as a single net-priced instrument to the SMART exchange.1 tastytrade's PAIRS complex order type accepts two legs in one request but routes them individually once the ratio-price threshold triggers, so leg risk is not eliminated.3 No broker reachable through a webhook automation layer provides atomic two-leg execution, because webhook payloads are single-ticker by design.
Can I get a machine-readable borrow rate before placing the short leg?
Alpaca exposes a locate quotes endpoint (GET /v1/locates/quotes) that returns available_qty and price per symbol for hard-to-borrow names, giving a numeric rate before order submission.6 tastytrade's instruments endpoint returns a lendability category (Easy To Borrow, Locate Required, Preborrow) but not a numeric rate.9 Tradier's ETB list endpoint confirms whether a symbol is shortable but contains no cost data.8 TradeStation does not expose borrow rates programmatically.
Can I short fractional shares to achieve dollar-neutral sizing?
Alpaca's documentation states that short sales are not supported in fractional orders; all fractional sell orders are treated as long closes.10 IBKR and TradeStation do not support fractional shares at all in their TradersPost integrations, requiring whole-share rounding on both legs. tastytrade does support fractional shares (fractionalMaxDecimals: 8), but the short leg in a pairs strategy is still subject to lendability constraints. The practical workaround for most brokers is to size the short leg first in whole shares, then fit the long leg to match the resulting notional, accepting a small residual directional exposure from the rounding.
Does using a webhook platform eliminate leg risk for pairs trades?
No. A webhook payload carries one ticker per signal, so a pairs entry requires two separate signals that are processed and routed sequentially. The gap between the first-leg fill and the second-leg submission creates the same leg risk as manually entering orders one at a time. Traders who require atomic spread execution must use a broker's native API directly and build the BAG or PAIRS order structure in their own code.
What happens if one leg fills and the other does not?
The filled leg becomes an unhedged directional position until the second leg fills or the first leg is closed. Setting a cancelAfter value on the entry signal limits how long the stale leg order remains open before automatic cancellation. An emergency unwind of the filled leg will cost at least the bid-ask spread plus any commissions. Entries made when spreads are wide are more expensive to unwind, which is why filtering on bid-ask spread before entry reduces the cost of this failure mode.
References
1 IBKR TWS API - Spread Contracts
2 IBKR Web API Documentation
3 tastytrade - Orders and Order Types
4 Tradier - Advanced Orders
5 Alpaca - Margin and Short Selling
6 Alpaca - Short Selling and Locates API Guide
7 IBKR - Short Securities Availability
8 Tradier - ETB List
9 tastytrade Instruments API - Lendability Filter
10 Alpaca - Fractional Trading
11 Alpaca - About Market Data API