Skip to content

feature: add public.com brokerage integration#9543

Open
Romazes wants to merge 1 commit into
QuantConnect:masterfrom
Romazes:feature-brokerage-public
Open

feature: add public.com brokerage integration#9543
Romazes wants to merge 1 commit into
QuantConnect:masterfrom
Romazes:feature-brokerage-public

Conversation

@Romazes

@Romazes Romazes commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Description

Registers Public.com in Lean core: a brokerage model, a fee model, the BrokerageName.Public enum value, the CreateBrokerageModel switch case, and the live-public launcher environment. The brokerage plugin lives in the separate Lean.Brokerages.Public repository; this PR adds the core models it relies on.

Supported security types: Equity, Option, IndexOption, Crypto.
Supported order types: Market, Limit, StopMarket, StopLimit, ComboLimit (multi-leg combos are limit only).

Order validation notes:

  • Cross-zero orders are accepted. Public.com handles crossing a zero position natively, so the model does not split or reject them.
  • Combo (multi-leg) orders cannot be updated — Public.com has no multi-leg replace endpoint — so CanUpdateOrder rejects them.

Fee model (PublicFeeModel) per the Public.com fee schedule:

Asset Fee
Equity — regular hours $0
Equity — extended hours $2.99 per trade
Option (stocks/ETFs) $0
Index option $0.50 per contract
Crypto tiered by order amount: $0.49 / $0.69 / $1.19 / $1.69 / $3.29 / $6.29 up to $500, then 1.25% above $500

The regular member tier is modeled. OTC stocks are not detected separately.

Related PR(s)

N/A

Related Issue

N/A

Motivation and Context

Public.com needs the core brokerage and fee models so algorithms can validate orders and model fees for this brokerage.

Requires Documentation Change

No

How Has This Been Tested?

New unit tests:

  • PublicBrokerageModelTests: valid security/order-type combinations; unsupported security types (Forex, Cfd, Future, FutureOption); unsupported order types (MarketOnClose, MarketOnOpen, TrailingStop, ComboMarket); ComboLimit accepted; cross-zero accepted for single and combo orders; combo order update rejected; GetFeeModel returns PublicFeeModel.
  • PublicFeeModelTests: equity regular hours ($0) vs extended hours ($2.99); equity options ($0); index options ($0.50/contract); crypto tiered fees including the $10/$500 boundaries and the 1.25% band.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (non-breaking change which improves implementation)
  • Performance (non-breaking change which improves performance)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Non-functional change (xml comments/documentation/etc)

Checklist:

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

- add PublicBrokerageModel with supported security and order types
- add PublicFeeModel: free equity in regular hours, $2.99 extended, $0.50/contract index options, tiered crypto
- register Public in BrokerageName enum and CreateBrokerageModel switch
- add live-public environment and config keys to launcher config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant