wealthsimple package

Submodules

wealthsimple.requestor module

class wealthsimple.requestor.APIRequestor(session, APIMainURL)

Bases: object

A class to simplify request calls to REST API

session : session
A requests Session object to be associated with the class
APIMainURL : str
Main URL endpoint for API
makeRequest(method, endpoint, params=None, returnValue=None)
Make a request to a given API endpoint
post(URL, params=None)
Make a POST request to a given API endpoint
get(URL, params=None)
Make a GET request to a given API endpoint
get(URL, params=None)

Make a GET request to a given API endpoint

URL : str
Full URL endpoint of API
params : dict
Dictionary of parameters to be passed with request
Response : Response
A requests response object
makeRequest(method, endpoint, params=None, returnValue=None)

Make a request to a given API endpoint

method : str
Specify POST or GET request
endpoint : str
URL endpoint oof API (Does not include base URL)
params : dict
Dictionary of parameters to be passed with request
Response : Response
A requests response object
post(URL, params=None)

Make a POST request to a given API endpoint

URL : str
Full URL endpoint of API
params : dict
Dictionary of parameters to be passed with request
Response : Response
A requests response object

wealthsimple.wealthsimple module

class wealthsimple.wealthsimple.WSTrade(email: str, password: str, two_factor_callback: callable = None)

Bases: object

Wealthsimple Trade API wrapper

session : session
A requests Session object to be associated with the class
APIMainURL : str
Main URL endpoint for API
TradeAPI : APIRequester
APIRequester object to handle API calls
login(email=None, password=None, two_factor_callback=None)
Login to Wealthsimple Trade account
get_accounts()
Get Wealthsimple Trade accounts
get_account_ids()
Get Wealthsimple Trade account ids
get_account(id)
Get a Wealthsimple Trade account given an id
get_account_history(id, time=”all”)
Get Wealthsimple Trade account history
get_activities()
Get Wealthsimple Trade activities
get_orders(symbol=None)
Get Wealthsimple Trade orders
get_security(symbol)
Get information about a security
get_positions(id)
Get positions
get_person()
Get Wealthsimple Trade person object
get_me()
Get Wealthsimple Trade user object
get_bank_accounts():
Get list of bank accounts tied to Wealthsimple Trade account
get_deposits()
Get list of deposits
get_forex()
Get foreign exchange rate
get_account(id: str) → dict

Get a Wealthsimple Trade account given an id

id : str
Wealthsimple Trade account id
dict
A dictionary containing the Wealthsimple Trade account
get_account_history(id: str, time: str = 'all') → dict

Get Wealthsimple Trade account history

id : str
Wealthsimple Trade account id
time : str
String containing time interval for history
dict
A dictionary containing the historical Trade account data
get_account_ids() → list

Get Wealthsimple Trade account ids

list
A list of Wealthsimple Trade account ids
get_accounts() → list

Get Wealthsimple Trade accounts

list
A list of Wealthsimple Trade account dictionary objects
get_activities() → list

Get Wealthsimple Trade activities

list
A list of dictionaries containing Wealthsimple Trade activities
get_bank_accounts() → list

Get list of bank accounts tied to Wealthsimple Trade account

list
A list of dictionaries containing bank account objects
get_deposits() → list

Get list of deposits

list
A list of dictionaries containing deposit objects
get_forex() → dict

Get foreign exchange rate

dict
A dictionary containing foreign exchange rates
get_me() → dict

Get Wealthsimple Trade user object

dict
A dictionary containing a user object
get_orders(symbol: str = None) → list

Get Wealthsimple Trade orders

symbol : str
Symbol for security to filter orders on
list
A list containing Wealthsimple Trade order dictionaries
get_person() → dict

Get Wealthsimple Trade person object

dict
A dictionary containing a person object
get_positions(id: str) → list

Get positions

id : str
Wealthsimple Trade account id
list
A list containing positions
get_securities_from_ticker(symbol: str) → list

Get information about a securitys with matching ticker symbols

symbol : str
Symbol for security to search on
list
A list containing matching securities
get_security(id: str) → dict

Get information about a security

id : str
Wealthsimple Security ID to search on
dict
Dictionary containing information for security
login(email: str = None, password: str = None, two_factor_callback: callable = None) → None

Login to Wealthsimple Trade account

email : str
Wealthsimple Trade account email
password : str
Wealthsimple Trade account password
two_factor_callback: function
Callback function that returns user input for 2FA code

None

Module contents