Created
April 28, 2024 21:34
-
-
Save Ichinga-Samuel/701031681cf7fcffe6e53079d86d72f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from aiomql import Account | |
async def main(): | |
# since our login details are defined in aiomql.json | |
# we can just call Account() without any arguments | |
async with Account() as acc: | |
print(acc.balance) | |
# perform some transactions refresh and check the balance | |
await acc.refresh() | |
# get only margin, equity, balance | |
acc_details = acc.get_dict(include={'margin', 'equity', 'balance'}) | |
print(acc_details) | |
asyncio.run(main()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment