feature: add public.com brokerage integration#9543
Open
Romazes wants to merge 1 commit into
Open
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Registers Public.com in Lean core: a brokerage model, a fee model, the
BrokerageName.Publicenum value, theCreateBrokerageModelswitch case, and thelive-publiclauncher environment. The brokerage plugin lives in the separateLean.Brokerages.Publicrepository; 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:
CanUpdateOrderrejects them.Fee model (
PublicFeeModel) per the Public.com fee schedule: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;GetFeeModelreturnsPublicFeeModel.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
Checklist:
bug-<issue#>-<description>orfeature-<issue#>-<description>