WealthsimpleDownloader

2.0.2

Swift library to download data from Wealthsimple using the API
Nef10/WealthsimpleDownloader

What's New

2.0.2 Online Bill Payment

2024-07-13T21:51:58Z

Changes

📈 Enhancements

🧰 Maintenance

  • Update coverage comment @file-sync-app (#215)
  • Update swiftlint config for 0.53.0 @file-sync-app (#201)
  • SwiftLint: ignore Protocol Buffer files @file-sync-app (#189)
  • Update copyright year @file-sync-app (#187)
  • Release Drafter: Move dependencies to separate section @file-sync-app (#186)
  • Update SwiftLint config for 0.51.0 @file-sync-app (#183)
  • Migrate deprecated set-output to environment files @file-sync-app (#176)
  • Update SwiftLint config for 0.52.2 @file-sync-app (#190)
  • Update SwiftLint config for 0.50.3 @file-sync-app (#161)
  • Pin SwiftLint version to 0.50.0 @file-sync-app (#157)
  • Fix swift lint errors @Nef10 (#156)
  • Update SwiftLint config for 0.49.1 @file-sync-app (#132)
  • Update SwiftLint config for 0.49.0 @file-sync-app (#131)
  • Allow specifying macOS version @file-sync-app (#125)
  • Update copyright year @file-sync-app (#122)
  • Update SwiftLint config for 0.47.1 @file-sync-app (#121)
  • Update SwiftLint config for 0.46.1 @file-sync-app (#94)
  • Update SwiftLint config for 0.45.1 @file-sync-app (#86)
  • Update SwiftLint config for 0.45.0 @file-sync-app (#79)

📦 Dependencies

  • Bump setup-swift from 2.0.0 to 2.1.0 @file-sync-app (#225)
  • Bump peaceiris/actions-gh-pages to 4.0.0 @file-sync-app (#224)
  • Bump setup-swift from 1.26.0 to 2.0.0 @file-sync-app (#223)
  • Bump very_good_coverage from 2.2.0 to 3.0.0 @file-sync-app (#221)
  • Bump release-drafter from 5.25.0 to 6.0.0 @file-sync-app (#219)
  • Bump sticky-pull-request-comment from 2.8.0 to 2.9.0 @file-sync-app (#218)
  • Bump setup-swift from 1.25.0 to 1.26.0 @file-sync-app (#214)
  • Bump actions/upload-artifact from 3 to 4 @file-sync-app (#212)
  • Bump very_good_coverage from 2.1.0 to 2.2.0 @file-sync-app (#210)
  • Bump github-script from 6.4.1 to 7.0.1 @file-sync-app (#209)
  • Bump SwiftLint to 0.54.0 @file-sync-app (#206)
  • Bump release-drafter from 5.24.0 to 5.25.0 @file-sync-app (#205)
  • Bump swift-actions/setup-swift from 1.24.0 to 1.25.0 @file-sync-app (#204)
  • Bump SwiftLint to 0.53.0 @file-sync-app (#202)
  • Bump tibdex/github-app-token from 2.0.0 to 2.1.0 @file-sync-app (#200)
  • Bump tibdex/github-app-token from 1.8.0 to 2.0.0 @file-sync-app (#199)
  • Bump actions/checkout from 3 to 4 @file-sync-app (#198)
  • Bump setup-swift from 1.23.0 to 1.24.0 @file-sync-app (#197)
  • Bump sticky-pull-request-comment to 2.8.0 @file-sync-app (#196)
  • Bump sticky-pull-request-comment to 2.7.0 @file-sync-app (#195)
  • Bump SwiftLint to 0.52.4 @file-sync-app (#194)
  • Bump Release Drafter to 5.24.0 @file-sync-app (#193)
  • Bump SwiftLint to 0.52.3 @file-sync-app (#192)
  • Bump SwiftLint to 0.52.2 @file-sync-app (#191)
  • Bump sticky-pull-request-comment to 2.6.2 @file-sync-app (#188)
  • Bump setup-swift to 1.21.0 @file-sync-app (#162)
  • Bump swift-actions/setup-swift from 1.22.0 to 1.23.0 @file-sync-app (#185)
  • Bump actions/github-script from 6.4.0 to 6.4.1 @file-sync-app (#184)
  • Update SwiftLint to 0.51.0 @file-sync-app (#182)
  • Bump peaceiris/actions-gh-pages from 3.9.2 to 3.9.3 @file-sync-app (#181)
  • Bump release-drafter from 5.22.0 to 5.23.0 @file-sync-app (#180)
  • Bump swift-actions/setup-swift to 1.22.0 @file-sync-app (#178)
  • Bump sticky-pull-request-comment to 2.5.0 @file-sync-app (#175)
  • Bump sticky-pull-request-comment to 2.4.0 @file-sync-app (#173)
  • Bump tibdex/github-app-token from 1.7.0 to 1.8.0 @file-sync-app (#172)
  • Bump actions/github-script from 6.3.3 to 6.4.0 @file-sync-app (#171)
  • Bump peaceiris/actions-gh-pages to 3.9.2 @file-sync-app (#168)
  • Bump peaceiris/actions-gh-pages to 3.9.1 @file-sync-app (#166)
  • Bump release-drafter from 5.21.1 to 5.22.0 @file-sync-app (#165)
  • Bump sticky-pull-request-comment to 2.3.1 @file-sync-app (#160)
  • Bump peaceiris/actions-gh-pages to 3.9.0 @file-sync-app (#159)
  • Bump very_good_coverage to 2.1.0 @file-sync-app (#158)
  • Bump swift-actions/setup-swift to 1.20.0 @file-sync-app (#155)
  • Bump sticky-pull-request-comment to 2.3.0 @file-sync-app (#149)
  • Bump release-drafter from 5.21.0 to 5.21.1 @file-sync-app (#148)
  • Bump tibdex/github-app-token from 1.6.0 to 1.7.0 @file-sync-app (#147)
  • Update Nef10/lcov-reporter-action to 0.4.0 @file-sync-app (#144)
  • Bump actions/github-script from 6.3.1 to 6.3.3 @file-sync-app (#143)
  • Bump sticky-pull-request-comment to 2.2.1 @file-sync-app (#142)
  • Bump very_good_coverage from 1.2.1 to 2.0.0 @file-sync-app (#139)
  • Bump actions/github-script from 6.2.0 to 6.3.1 @file-sync-app (#138)
  • Bump Nef10/lcov-reporter-action to 0.3.2 @file-sync-app (#137)
  • Bump swift-actions/setup-swift to 1.18.0 @file-sync-app (#136)
  • Bump release-drafter from 5.20.1 to 5.21.0 @file-sync-app (#135)
  • Bump actions/github-script from 6.1.1 to 6.2.0 @file-sync-app (#130)
  • Bump release-drafter from 5.20.0 to 5.20.1 @file-sync-app (#128)
  • Bump actions/github-script from 6.1.0 to 6.1.1 @file-sync-app (#127)
  • Bump tibdex/github-app-token from 1.5.2 to 1.6.0 @file-sync-app (#124)
  • Bump actions/github-script from 6.0.0 to 6.1.0 @file-sync-app (#120)
  • Bump release-drafter from 5.19.0 to 5.20.0 @file-sync-app (#119)
  • Update setup-swift to 1.15.0 @file-sync-app (#116)
  • Bump tibdex/github-app-token from 1.5.1 to 1.5.2 @file-sync-app (#115)
  • Bump actions/upload-artifact from 2 to 3 @file-sync-app (#113)
  • Bump setup-swift from 1.13.1 to 1.14.0 @file-sync-app (#112)
  • Bump release-drafter from 5.18.1 to 5.19.0 @file-sync-app (#109)
  • Bump actions/checkout from 2 to 3 @file-sync-app (#107)
  • Bump fwal/setup-swift to 1.13.1 @file-sync-app (#106)
  • Bump setup-swift from 1.11.0 to 1.12.0 @file-sync-app (#104)
  • Bump actions/github-script from 5.1.0 to 6.0.0 @file-sync-app (#103)
  • Bump release-drafter from 5.18.0 to 5.18.1 @file-sync-app (#102)
  • Bump very_good_coverage from 1.2.0 to 1.2.1 @file-sync-app (#101)
  • Bump release-drafter from 5.17.6 to 5.18.0 @file-sync-app (#96)
  • Bump release-drafter from 5.16.2 to 5.17.6 @file-sync-app (#93)
  • Bump release-drafter from 5.15.0 to 5.16.2 @file-sync-app (#91)
  • Bump actions/github-script from 5.0.0 to 5.1.0 @file-sync-app (#89)
  • Bump tibdex/github-app-token from 1.5.0 to 1.5.1 @file-sync-app (#87)
  • Bump fwal/setup-swift from 1.9.0 to 1.10.0 @file-sync-app (#85)
  • Bump fwal/setup-swift to 1.9.0 @file-sync-app (#83)
  • Bump fwal/setup-swift from 1.10.0 to 1.11.0 @file-sync-app (#88)
  • Bump tibdex/github-app-token from 1.4.0 to 1.5.0 @dependabot (#82)

WealthsimpleDownloader

CI Status Documentation percentage License: MIT Latest version platforms supported: linux | macOS | iOS | watchOS | tvOS SPM compatible

What

This is a small library to download data from Wealthsimple. It does not support Wealthsimple Trade and currently only supports downloading accounts, positions and transactions. The documentation of the Wealthsimple API I am using can be found at https://developers.wealthsimple.com/. To authenticate I am using the same client id as their web site, which uses the same API as backend.

How

  1. Implement a CredentialStore
Example using the KeychainAccess library
import KeychainAccess
  
class KeyChainCredentialStorage: CredentialStorage {

  let keychain = Keychain(service: "XYZ")

  func save(_ value: String, for key: String) {
      keychain[key] = value
  }

  func read(_ key: String) -> String? {
      keychain[key]
  }

}
  1. Implement an AuthenticationCallback which will ask the user for their username, password and one time password.
  2. Initialize WealthsimpleDownloader with your two implementations: let wealthsimpleDownloader = WealthsimpleDownloader(authenticationCallback: myAuthenticationCallback, credentialStorage: myCredentialStorage)
  3. Call wealthsimpleDownloader.authenticate() { } and wait for the callback
  4. Now you can start retreiving data with the other methods provided on WealthsimpleDownloader like getAccounts or getPositions

Please check out the complete documentation here. You can also have a look at the SwiftBeanCountImporterApp which uses this library. If you want to convert the downloaded data into Beancount format, also check out SwiftBeanCountWealthsimpleMapper

Usage

The library supports the Swift Package Manger, so simply add a dependency in your Package.swift:

.package(url: "https://github.com/Nef10/WealthsimpleDownloader.git", .upToNextMajor(from: "X.Y.Z")),

Limitations

Please note that I developed this library for my own needs and there may be bugs. It currently only accesses a very limited scope of the API. Even for the endpoints it implements, there are further limitations:

  • Paging is not supported
  • Only works on Accounts with 2FA enabled

Pull requests to extend the scope or remove limitations are very welcome.

Copyright

While my code is licensed under the MIT License, the source repository may include names or other trademarks of Wealthsimple or other entities; potential usage restrictions for these elements still apply and are not touched by the software license. Same applies for the API design. I am in no way affilliated with Wealthsimple other than beeing customer.

Description

  • Swift Tools 5.2.0
View More Packages from this Author

Dependencies

  • None
Last updated: Mon May 19 2025 03:50:40 GMT-0900 (Hawaii-Aleutian Daylight Time)