gehtsoft / forex-connect

For
http://www.fxcodebase.com/wiki/index.php/Category:ForexConnect
48 stars 48 forks source link

'terminate called without an active exception' when launching a second script using the same credentials on real account #22

Closed illi4 closed 4 years ago

illi4 commented 4 years ago

I am experience an issue with using two (or more) Python scripts connecting to the same trading account. This is not happening for practice accounts. The api fails when I launch a second script as soon as I connect to fxconnect using the same account (run fxcm.login(...)).

My Python version is 3.6.8, I'm on Ubuntu 18.04.2 LTS. I have tried different releases of forecxonnect (1.6.3 and 1.6.0).

On 1.6.3 and 1.6.2: When I run one script connected to fxcm and launch a second one, the first one fails with the error 'terminate called without an active exception'. On 1.6.0: When I run one script connected to fxcm and launch a second one, the second one works and the first one just hangs without any error messages. If I try to cancel it by pressing Ctrl+C, nothing happens. If I launch the first one again in new terminal, it works (but this is still a problem because I need the first one running). So, evey time I launch a new script, the running one fails.

FXCMAPI commented 4 years ago

Hi illi4 we have single/multiple setting on account level. single session is the default. which only allow one session working. looks like it is your case, please provide your account number we will take a look.

thanks Lei

illi4 commented 4 years ago

My account id is 2705094378. Is it possible to get / change this setting through API or on the website?

FXCMAPI commented 4 years ago

Hi

yes, you can make a request via myfxcm.com under account setting tab.

thanks Lei

illi4 commented 4 years ago

This is it, it works now. However, I would need to check this sessing through code when new accounts are added to my scripts (otherwise, all the running scripts will break if they do not have multi-session setting). Is this possible. If not, could you consider adding a proper exception / error message to the code? Thank you.

FXCMAPI commented 4 years ago

Hi

I can report to our project management but I am not sure if or when we can implement this. For now, you can check it via myfxcm.com You can also provide all your accounts and ask Vincent in CC to check on our backend.

Best regards Lei

CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage.

70.24% of retail investor accounts lose money when trading CFDs with this provider.

You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money.

Trading Forex/CFDs on margin carries a high level of risk and may not be suitable for all investors. Leverage can work against you. The products are intended for retail, professional and eligible counterparty clients. Retail clients who maintain account(s) with Forex Capital Markets Limited ("FXCM LTD") could sustain a total loss of deposited funds but are not subject to subsequent payment obligations beyond the deposited funds but professional clients and eligible counterparty clients could sustain losses in excess of deposits. Clients who maintain account(s) with FXCM Australia Pty. Limited (“FXCM AU”), FXCM South Africa (PTY) Ltd (“FXCM ZA”) or FXCM Markets Limited (“FXCM Markets”) could sustain losses in excess of deposits. Prior to trading any products offered by FXCM LTDhttps://www.fxcm.com/uk/, inclusive of all EU branches, FXCM AUhttps://www.fxcm.com/au/, FXCM ZAhttps://www.fxcm.com/za/, any affiliates of aforementioned firms, or other firms within the FXCM group of companies [collectively the “FXCM Group”], carefully consider your financial situation and experience level. If you decide to trade products offered by FXCM Australia Pty. Limited (“FXCM AU”) (AFSL 309763), you must read and understand the Financial Services Guidehttps://docs.fxcorporate.com/financial-services-guide-au.pdf, Product Disclosure Statementhttps://www.fxcm.com/au/legal/product-disclosure-statements/, and Terms of Businesshttps://docs.fxcorporate.com/tob_au_en.pdf. Our FX and CFD prices are set by us, are not made on an Exchange and are not governed under the Financial Advisory and Intermediary Services Act. The FXCM Group may provide general commentary which is not intended as investment advice and must not be construed as such. Seek advice from a separate financial advisor. The FXCM Group assumes no liability for errors, inaccuracies or omissions; does not warrant the accuracy, completeness of information, text, graphics, links or other items contained within these materials. Read and understand the Terms and Conditions on the FXCM Group’s websites prior to taking further action.

The FXCM Group is headquartered at 20 Gresham Street, 4th Floor, London EC2V 7JE, United Kingdom. Forex Capital Markets Limited (“FXCM LTD”) is authorised and regulated in the UK by the Financial Conduct Authority. Registration number 217689. Registered in England and Wales with Companies House company number 04072877. FXCM Australia Pty. Limited (“FXCM AU”) is regulated by the Australian Securities and Investments Commission, AFSL 309763. FXCM AU ACN: 121934432. The information provided by FXCM AU is intended for residents of Australia and is not directed at any person in any country or jurisdiction where such distribution or use would be contrary to local law or regulation. Please read the full Terms and Conditionshttps://www.fxcm.com/au/legal/terms-conditions/. FXCM South Africa (PTY) Ltd is an authorized Financial Services Provider and is regulated by the Financial Sector Conduct Authority under FSP No 46534. FXCM Markets Limited ("FXCM Markets") is incorporated in Bermuda as an operating subsidiary within the FXCM group. FXCM Markets is not required to hold any financial services license or authorization in Bermuda to offer its products and services. FXCM Global Services, LLC is an operating subsidiary within the FXCM Group. FXCM Global Services, LLC is not regulated and not subject to regulatory oversight. From: illi4 [mailto:notifications@github.com] Sent: Wednesday, October 30, 2019 9:29 PM To: gehtsoft/forex-connect forex-connect@noreply.github.com Cc: api api@fxcm.com; Comment comment@noreply.github.com Subject: Re: [gehtsoft/forex-connect] 'terminate called without an active exception' when launching a second script using the same credentials on real account (#22)

This is it, it works now. However, I would need to check this sessing through code when new accounts are added to my scripts (otherwise, all the running scripts will break if they do not have multi-session setting). Is this possible. If not, could you consider adding a proper exception / error message to the code? Thank you.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/gehtsoft/forex-connect/issues/22?email_source=notifications&email_token=ADDPML53WYKKYBZVC3OHFDDQRIYEDA5CNFSM4JHBZVEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECWIYTQ#issuecomment-548179022, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADDPML7KJ3C7UBVIHRWFDNTQRIYEDANCNFSM4JHBZVEA.

fxcm-dhalpert commented 4 years ago

please check/enable multi session from myfxcm.com