request_accounts_refresh_and_wait
Type: mutation
Convenience method for forcing an accounts refresh on Monarch, as well as waiting for the refresh to complete. Returns True if all accounts are refreshed within the timeout specified, False otherwise.
Signature
async def request_accounts_refresh_and_wait(
account_ids: List[str] | None = None,
timeout: int = 300,
delay: int = 10
) -> Dict[str, Any]
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
account_ids | `List[str] | None` | No |
timeout | int | No | The number of seconds to wait for the refresh to complete |
delay | int | No | The number of seconds to wait for each check on the refresh request |
Example
from monarchmoney import MonarchMoney
mm = MonarchMoney()
await mm.login(email, password)
result = await mm.request_accounts_refresh_and_wait()
print(result)
Try It Out
To test this API method locally:
- Install the package:
pip install monarchmoney - Create a Python script with the example code above
- Replace
emailandpasswordwith your Monarch Money credentials - Run the script
See the Authentication Guide for details on logging in.