Skip to content

Instantly share code, notes, and snippets.

@Ichinga-Samuel
Created April 28, 2024 21:34
Show Gist options
  • Save Ichinga-Samuel/701031681cf7fcffe6e53079d86d72f4 to your computer and use it in GitHub Desktop.
Save Ichinga-Samuel/701031681cf7fcffe6e53079d86d72f4 to your computer and use it in GitHub Desktop.
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