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

get_acc_list() doesn't list any paper trading accounts #185

Open
wabzqem opened this issue Nov 27, 2024 · 4 comments
Open

get_acc_list() doesn't list any paper trading accounts #185

wabzqem opened this issue Nov 27, 2024 · 4 comments

Comments

@wabzqem
Copy link

wabzqem commented Nov 27, 2024

I have a moomoo AU account. I use

trd_ctx = OpenSecTradeContext(host='<redacted>', port=12345, is_encrypt=True, filter_trdmarket=TrdMarket.US, security_firm=SecurityFirm.FUTUAU) 
ret, data = trd_ctx.get_acc_list()
if ret == RET_OK:
    print(data)
else:
    print('get_acc_list error: ', data)

This only lists my REAL account, and not any paper trading accounts. In the app under paper trading, I have a "US Margin Account [Paper Trading]" account with active positions, I'm not sure why this doesn't show up.

In another account I have, it has the old "US Stock [Paper Trading]" trading account which does show up with this api, but it looks like that's being discontinued and it doesn't exist in my real account that can get quotes. I'd at least expect this to show the Margin account. Since no paper trading accounts exist, I can't test anything.

@lok0613
Copy link

lok0613 commented Dec 9, 2024

I think I might have the same issue. When I connect openD on my local it shows all accounts. However it's only showing real account when I deployed openD on cloud (same config).

The only diff I can see is it filters out the simAccType=3 or simAccType=null accounts at this API.

@lok0613
Copy link

lok0613 commented Dec 9, 2024

I updated openD and API version and it solved now.

@wabzqem
Copy link
Author

wabzqem commented Dec 9, 2024

Interesting. I didn't think of trying openD local, but that doesn't work for me either - still no US paper accounts are available.

I should have mentioned previously - I'm on the latest version, running remote command line version.

I can get a HK simulate account to show up along with my real account, but not a paper US account. I suspect it's a combination of having an AU moomoo account and the US Margin paper account only. But it all works fine in the app, just not via OpenD.

@aaalittlestar
Copy link

We provide two kinds of US paper trade account. One kind is the old account always been using . Another kind is the new margin account which support both stocks and options .
OpenAPI can only return the old account, recently the old account was set to invisble for those not currently in use, so the OpenAPI can not return the old account.
To solve this problem ,we need to set your old US paper account visible, Please send us your account ID through [email protected] or just comment down below.

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

3 participants