add
This commit is contained in:
32
test/test2.py
Normal file
32
test/test2.py
Normal 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())
|
||||
Reference in New Issue
Block a user