quantconnect / lean.brokerages.tdameritrade Goto Github PK
View Code? Open in Web Editor NEWTD Ameritrade Brokerage Plugin
TD Ameritrade Brokerage Plugin
All order types available in both Lean and TD Ameritrade are supported.
https://developer.tdameritrade.com/account-access/apis/post/accounts/%7BaccountId%7D/orders-0
master
supports MarketOrder, LimitOrder, StopMarketOrder, StopLimitOrder
while Lean and TD Ameritrade supports also support MarketOnOpen (MOO), MarketOnClose (MOC) and ExerciseOption.
Implement MOC and MOO orders.
master
branchDoes this takeover affect this integration? Should the integration be phased-out or renamed?
Per tdameritrade.com
In most cases, it makes sense to open a new account at Schwab, since the best of TD Ameritrade is now available at Schwab, and more. Now you get access to thinkorswim trading platforms and robust trading education at Schwab, along with Schwab's great service, commitment to low costs, and a wide range of wealth management and investing solutions.
However, if you're interested in trading futures and forex products, or using portfolio margin, we recommend that you open a TD Ameritrade account for the best experience.
Futures trading, forex trading and portfolio margin will be available at Schwab in early 2024. Once available, we will move your account to Schwab.
Please note that futures trading, forex trading, and portfolio margin in a TD Ameritrade account is subject to approval. Futures and forex trading services are provided by Charles Schwab Futures and Forex LLC.
Unhandled exceptions should be avoided.
The code is trying to access the index of an empty collection:
var symbol = order.OrderLegCollections[0].Instrument.Symbol;
Runtime error:
2023-04-21T18:47:22.5256253Z ERROR:: BrokerageSetupHandler.LoadExistingHoldingsAndOrders(): System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at System.Collections.Generic.List`1.get_Item(Int32 index)
at QuantConnect.Brokerages.TDAmeritrade.Utils.Extensions.ConvertOrder(OrderModel order) in /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean.Brokerages.TDAmeritrade/QuantConnect.TDAmeritrade/Utils/Extensions.cs:line 198
at QuantConnect.Brokerages.TDAmeritrade.TDAmeritradeBrokerage.GetOpenOrders() in /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean.Brokerages.TDAmeritrade/QuantConnect.TDAmeritrade/TDAmeritradeBrokerage.cs:line 248
at QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler.GetOpenOrders(IAlgorithm algorithm, IResultHandler resultHandler, ITransactionHandler transactionHandler, IBrokerage brokerage, HashSet`1 supportedSecurityTypes) in /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Engine/Setup/BrokerageSetupHandler.cs:line 524
at QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler.LoadExistingHoldingsAndOrders(IBrokerage brokerage, IAlgorithm algorithm, SetupHandlerParameters parameters) in /LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/Engine/Setup/BrokerageSetupHandler.cs:line 399
N/A
Live algorithm fetching open order.
master
branchA declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.