This commit is contained in:
lz_db
2025-11-16 12:31:03 +08:00
commit 0fab423a18
1451 changed files with 743213 additions and 0 deletions

32
test/test2.py Normal file
View File

@@ -0,0 +1,32 @@
# -*- coding:utf-8 -*-
import asyncio
import ccxt.pro as ccxtpro
async def fetch_balance_demo():
async with ccxtpro.mt5({
'apiKey': '76888962',
'secret': 'LZ-trade666888',
'verbose': False, # 启用详细日志
'hostname': '43.167.188.220:5000',
'options': {
# 'server': '147.160.254.81:443', # 使用服务器名称
# 或者
'host': '18.163.85.196',
'port': 443,
},
}) as exchange:
try:
res = await exchange.watch_order()
print(res)
except Exception as e:
print(f"错误: {e}")
async def main():
print("开始测试...")
await fetch_balance_demo()
print("程序执行完成")
if __name__ == "__main__":
asyncio.run(main())