ahmedsakr / wstrade-api

API Wrapper for Wealthsimple Trade

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deconstruct getAccounts() array into a simple object

ahmedsakr opened this issue · comments

Currently, getAccounts() will return an array of account ids available under your WealthSimple Trade account.

It'll make everyone's life easier if getAccounts() can instead return an object with tfsa, rrsp, crypto, and personal properties instead, like this:

{
    tfsa: "tfsa-XXXX",
    rrsp: "rrsp-XXXX",
    crypto: "crypto-XXXX",
    rrsp: "rrsp-XXXX"
}

that way, when you're using the getAccounts() API, you'll be able to do getAccounts().tfsa to get your TFSA id, rather than parse through the array manually.