mirror of
https://github.com/Ichinga-Samuel/aiomql.git
synced 2026-08-24 09:18:07 +00:00
v3.19
This commit is contained in:
@@ -6,6 +6,7 @@ from aiomql import ForexSymbol, Account, Positions, History, SimpleTrader as Tra
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
|
||||
async def main():
|
||||
# Account details are in the aiomql.json file
|
||||
async with Account():
|
||||
@@ -36,7 +37,7 @@ async def main():
|
||||
|
||||
# get the number of open positions
|
||||
total = await pos.positions_total()
|
||||
print(f'{total} Open positions') # 2
|
||||
print(f'{total} Open positions') # 2
|
||||
|
||||
# close all open positions
|
||||
await pos.close_all()
|
||||
@@ -59,4 +60,4 @@ async def main():
|
||||
# print(f'{total_deals} Deals')
|
||||
|
||||
|
||||
asyncio.run(main())
|
||||
asyncio.run(main())
|
||||
|
||||
Reference in New Issue
Block a user