Skip to content

Commit

Permalink
correct spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
rcholic committed Jun 8, 2024
1 parent 37d6447 commit 00f1ce2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cschwabpy/SchwabAsyncClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ 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()
target_url = f"{SCHWAB_TRADER_API_BASE_URL}/accounts"
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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 00f1ce2

Please sign in to comment.