Form 1040-NR. Before you can file a tax return, you'll need to obtain a tax ID number, by filing Form W-7. To file Form W-7, you either need to enclose original identification documents, which are then returned to you, or you need to file the form through a Certifying Acceptance Agent that has the authority to review your identification documents in a face-to-face meeting. These forms are used by individuals. If you have a foreign business entity, e.g., a corporation, partnership, or trust, that is a completely different conversation, and it gets really complicated really fast. These forms cannot be used by a business entity. Also: the term tax return refers to the form that you file with the Internal Revenue Service, and that is what the form is called, regardless of whether you get a refund. A refund is not a return, and a return is not a refund. Even if you owe tax to the US government, the form that you file is still called a tax return. This is a common misunderstanding even among US citizens.
You’ve stated your professional history before… you are literally the only person on here who can give tax advice without just making stuff up.
Since I'm with python and selenium for web queries (because most stuff is dynamic), that's almost what I use myself. But yes, on Linux your solution is simpler.
Yeah... I'm also a fan of both python and selenium. But, with due respect, what ticked me off about the code you posted was that it didn't "stand alone". That is, a user couldn't just copy and paste it and have it work without going to some significant extra effort. Of course this could be said about any snippet of code posted in a forum, but there's varying degrees. Nonetheless, your sample got the point across. Many thanks for that. I just thought I'd try and take it a little further in case someone in the future was interested in an simpler alternative.
As much as I like Python, that seems to be par on its course. The package installer for Python (pip) addresses this to some degree but there's no cure-all... c'est la vie. Don't even get me started about the transition from Python2 to Python3.
I have zero knowledge in programing*, can you simplify to me how and where to use this codes? *The only language I use is thinkscript which I think is not considered a programing language
The only reason you'd use those codes is if you wanted to highly automate your processing. For example, if you traded hundreds of transactions and/or wanted to write software that helped prepare your taxes year after year or for multiple accounts. So, if you have "zero knowledge of programming" there's no point in explaining further details. As a beginner you can just copy and paste the list from the web-site into a spreadsheet and work from there. There's no point in putting the cart before the horse.
Are this codes related to the Interactive Brokers API ? if yes, I trade with td ameritrade which has an API but it is not as comprehensive as IB, does it work with them too? (I'm also a beginner with API)
No, the code @d08 and I posted has nothing to do with the IB or TD APIs. It operates more broadly on web APIs and the technique can work with any web-based data. This is known as web scraping and, honestly, I only suggest web scraping as a last resort. It's not a "data API" meant for analysis in any conventional sense and can be ephemeral. Web scraping is like unrequited love... only one party is aware of the relationship. Because of this there's a much higher chance that one day the layout will change or the data will disappear altogether. So, it can end up being more trouble than it's worth. Sometimes it does actually work out well but more often than not it ends in disappointment. Of course, if you get good at it and the data isn't available anywhere else or at a reasonable price, then yeah... scrape away. Just beware it's a double-edged sword.