You do. On your cash balances. You should earn around 1.75% on that usd cash. Margin does not earn interest for obvious reasons. https://www.interactivebrokers.com/en/accounts/fees/pricing-interest-rates.php
Depending on how much cash is pledged as margin to the position. When it's a cash-secured spread, the amount of cash pledged into the position is exactly equal to the maximum potential loss you can incur from the option position. Only whatever cash that's left over earns interest. If you look at your "Account Window" in TWS, only the cash under "Current Excess Liquidity" is eligible to earn interest.
i got it figured on the interest money market sweep. you need to be sure that you have the securities account selected as the fund for cash on hand. i had it all in the us commodities section. so excess funds need to sweep to the us securities section to get the money market rates. a large portion of my account still weeps to the commodity side as i have for some time now been a seller of credit spreads on the es contract. (my holy grail is to find steady income stream, but the quest brings to mind a story of windmills and took brushes. a topic for another thread)