Keyboard Shortcuts
Likes
Search
Trade Log for the last 7 days
How does one get?Trade Log for the last 7 days programmatically, and are there any working examples in ruby or python?
1) TWS API As per? "Important:?only those executions occurring since midnight for that particular account will be delivered." I have Positions, Balances, and trades inplemented, so the TWS API would be preferred. 2) I have been web scraping webtrader, but it's going away 10/1/2021 3) REST API "Returns a list of trades for the currently selected account for current day and six previous days." 4) Set up "Daily Trade Report" in Client Portal, have posting to ftp enabled, parse the html once a day after it posts around 5:30 pm EST |
I am not aware of TWS API requests for trade executions that go back several days, Mark. But maybe the built-in TWS "Export Trade Reports Periodically" feature works for you. In TWS take a look at 'File -> Global Configuration -.> Configuration -> Export Trade Reports'. The default columns contain only the most basic fields (not even the execution ID) but you can add additional fields as needed. You will have one CSV file per day named "trades.YYYYMMDD.csv" and TWS does not delete any of these files. 闯ü谤驳别苍 On Mon, Aug 30, 2021 at 05:16 PM, Mark Dabrowski wrote:How does one get?Trade Log for the last 7 days programmatically, |
开云体育You can get executions for up to the past 7 days via the API from TWS (but not the Gateway) by setting the 'Show trades for' dropdown in the Trades Log window to 'Last 7 Days'. ? Richard ? ? From: [email protected] <[email protected]> On Behalf Of 闯ü谤驳别苍 Reinold via groups.io
Sent: 31 August 2021 00:01 To: [email protected] Subject: Re: [TWS API] Trade Log for the last 7 days ? I am not aware of TWS API requests for trade executions that go back several days, Mark. But maybe the built-in TWS "Export Trade Reports Periodically" feature works for you. In TWS take a look at 'File -> Global Configuration -.> Configuration -> Export Trade Reports'. The default columns contain only the most basic fields (not even the execution ID) but you can add additional fields as needed. You will have one CSV file per day named "trades.YYYYMMDD.csv" and TWS does not delete any of these files. 闯ü谤驳别苍 On Mon, Aug 30, 2021 at 05:16 PM, Mark Dabrowski wrote:
|
Thank you, Richard.? I do have the 'Last 7 days' checked in the TWS UI under Trade Log.? If I figure out how to get?reqExecutions to return something via python implementation, it would confirm that their documentation stating "only those executions occurring since midnight for that particular account will be delivered" is not accurate..
|
On Mon, Aug 30, 2021 at 06:16 PM, Mark Dabrowski wrote:
"Important:?only those executions occurring since midnight for that particular account will be delivered."They're inaccurate about this. It actually returns the same executions as you have selected for "Show trades for ... " (today, last 2 days, last 3 days....) in the gooey |