Skip to content

matt77hias/Skatteverket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

Skatteverket

Features

Compute dividends from E*Trade

Script: Scripts/EtradeDividends.ps1

Usage:

  1. Log into E*Trade.
  2. Go to Stock Plan -> Holdings -> Other Holdings.
  3. Open the web browser inspector (e.g., press F12 in Google Chrome).
  4. Use the Network tab to record the outgoing HTTP requests.
  5. Optionally click the Clear button to get rid of the clutter.
  6. Expand the Cash section. A getCashTransactions.json should appear in the Network view.
  7. Click getCashTransactions.json. The view will change, switch to the Response tab.
  8. Copy-paste the contents of that tab, save it as getCashTransactions.json.
  9. Run the ./EtradeDividends.ps1 in the directory containing the getCashTransactions.json. This can take a while since it asks Riksbank's API for the exchange rates at the different dates.
  10. Enjoy a clear list with SEK-converted values, rounded to full kronor.
  11. Cross-check the USD amounts with the 1042-S form from E*Trade. (getCashTransactions.json only looks back 365 days.)

Compute K4 from E*Trade

Script: Scripts/EtradeK4.ps1

Usage:

  1. Log into E*Trade.
  2. Go to Stock Plan -> Tax Information -> Cost Basis.
  3. Open the web browser inspector (e.g., press F12 in Google Chrome).
  4. Use the Network tab to record the outgoing HTTP requests.
  5. Optionally click the Clear button to get rid of the clutter.
  6. Select the tax year and click Apply. A gainsLosses.json should appear in the Network view.
  7. Click gainsLosses.json. The view will change, switch to the Response tab.
  8. Copy-paste the contents of that tab, save it as gainsLosses.json.
  9. Run the ./EtradeK4.ps1 in the directory containing the gainsLosses.json. This can take a while since it asks Riksbank's API for the exchange rates at the different dates.
  10. Enjoy a clear table with SEK-converted values, rounded to full kronor, and ready to be copied into the K4 form.