diff --git a/cschwabpy/SchwabAsyncClient.py b/cschwabpy/SchwabAsyncClient.py index 5879438..a5eca7f 100644 --- a/cschwabpy/SchwabAsyncClient.py +++ b/cschwabpy/SchwabAsyncClient.py @@ -122,7 +122,7 @@ async def get_account_numbers_async(self) -> List[AccountNumberModel]: await client.aclose() async def get_accounts_async( - self, includ_positions: bool = True, with_account_number: Optional[str] = None + self, include_positions: bool = True, with_account_number: Optional[str] = None ) -> List[Account]: """get all accounts except a specific account_number is provided.""" await self._ensure_valid_access_token() @@ -130,7 +130,7 @@ async def get_accounts_async( if with_account_number is not None: target_url = f"{target_url}/{with_account_number}" - if includ_positions: + if include_positions: target_url = f"{target_url}?fields=positions" client = httpx.AsyncClient() if self.__client is None else self.__client @@ -164,7 +164,7 @@ async def get_single_account_async( ) -> Optional[Account]: """Convenience method to get a single account by account number.""" account = await self.get_accounts_async( - includ_positions=include_positions, with_account_number=with_account_number + include_positions=include_positions, with_account_number=with_account_number ) if account is None or len(account) == 0: return None diff --git a/tests/test_models.py b/tests/test_models.py index a360841..221702e 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -123,7 +123,7 @@ async def test_get_securities_account(httpx_mock: HTTPXMock): http_client=client, ) securities_accounts = await cschwab_client.get_accounts_async( - includ_positions=True + include_positions=True ) assert securities_accounts is not None