Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trade_um.open_market 4061报错 #3

Open
Maozhengtao opened this issue Mar 17, 2024 · 2 comments
Open

trade_um.open_market 4061报错 #3

Maozhengtao opened this issue Mar 17, 2024 · 2 comments

Comments

@Maozhengtao
Copy link

已确认账户设置为单向持仓,但是仍然4061报错
image
<Thread(Thread-17 (inner_func), started 13504)>

thread errorback
{'cancel_result': None,
'error_result': {'code': -4061,
'msg': "Order's position side does not match user's "
'setting.'},
'func_param': {'callback': <function callback5 at 0x000002168BE2E840>,
'cancel': True,
'delay': 0.2,
'errorback': <function errorback5 at 0x000002168BE2F600>,
'leverage': 1,
'marginType': 'CROSSED',
'meta': {},
'newClientOrderId': '',
'newThread': True,
'openMoney': None,
'positionSide': 'SHORT',
'quantity': 8,
'symbol': 'MANAUSDT',
'timeout': 60},
'get_order_result': None,
'meta': {},
'request_param': {'newClientOrderId': '',
'positionSide': 'SHORT',
'quantity': '8',
'side': 'SELL',
'symbol': 'MANAUSDT',
'type': 'MARKET'},
'set_order_result': {'code': -4061,
'msg': "Order's position side does not match user's "
'setting.'},
'status': None,
'symbol': 'MANAUSDT'}

@pyted
Copy link
Owner

pyted commented Mar 22, 2024

错误信息是:Order's position side does not match user's

首先这个问题不是框架本身引起的,应该是账号的设置,我一般都会设置账户为双向持仓,你的这个错误可能是已经开了MANA的多仓,然后又再次开空,引起的错误。

@Maozhengtao
Copy link
Author

错误信息是:Order's position side does not match user's

首先这个问题不是框架本身引起的,应该是账号的设置,我一般都会设置账户为双向持仓,你的这个错误可能是已经开了MANA的多仓,然后又再次开空,引起的错误。

是首次开仓的报错,原先并没有持仓哈,我测试了下发现,合约的open_market必须设置双向持仓才能开仓,如果账号是单向持仓的配置,就会报错,您可以测试下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants