E.g., I bought 1 SPY stock on January 7th, 2021, then 1 SPY stock on January 8th, 2021. I'm planning to hold them for exactly one year. For tax purposes, can I sell the stock I bought on January 8th, 2021 first on IBKR?
I can't tell you how to do it in IBKR, but there should be an option that allows you to choose which lot you are selling, or an option that allows you to select a method for determining your cost basis... at least these options should be there if your account is based in the USA. Don't know about other countries. For example, Schwab gives you this screen, with a choice for "specified lots," meaning you choose exactly which shares you are selling. BMK
In TWS check out Account - Tax - Tax Optimizer. Or on the web page in the Account Portal - Reports - Tax Optimizer.
TDAmeritrade doesn't allow anything other than FIFO (First In First Out) in Singapore and I suspect in the rest of the world where they operate, except the US. It's one of my pet peeves with them...