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

Not able to login #34

Open
barrynorman opened this issue Mar 11, 2024 · 5 comments
Open

Not able to login #34

barrynorman opened this issue Mar 11, 2024 · 5 comments

Comments

@barrynorman
Copy link

barrynorman commented Mar 11, 2024

Thanks for this python package.
I was wondering if someone can tell me what I'm doing wrong.

from ejtraderCT import Ctrader
import time
import logging

logging.getLogger().setLevel(logging.INFO)

SERVER="demo1.p.ctrader.com"
LOGIN="demo.purpletradingprop.12346679"
PASSWORD="XXX"
CURRENCY="USD"

api = Ctrader(server=SERVER, account=LOGIN, password=PASSWORD, currency=CURRENCY, debug=True)

checkConnection = api.isconnected()
print("Is Connected?: ", checkConnection)
time.sleep(1)

quote = api.quote()
print(quote)

My output:

INFO:root:Market is Close or Disconnected 'NoneType' object is not callable
INFO:root:Market is Close or Logged out 'NoneType' object is not callable

Thanks for the help.

I tested also Python 3.9 but I have the same problem

Copy link

We're glad you've opened your first issue. Please provide all the necessary details and any relevant code or screenshots to help us understand the problem better. Our team will review your issue and provide assistance as soon as possible. Thank you for contributing!

@traderpedroso
Copy link
Member

Thanks for this python package. I was wondering if someone can tell me what I'm doing wrong.

from ejtraderCT import Ctrader
import time
import logging

logging.getLogger().setLevel(logging.INFO)

SERVER="demo1.p.ctrader.com"
LOGIN="demo.purpletradingprop.12346679"
PASSWORD="XXX"
CURRENCY="USD"

api = Ctrader(server=SERVER, account=LOGIN, password=PASSWORD, currency=CURRENCY, debug=True)

checkConnection = api.isconnected()
print("Is Connected?: ", checkConnection)
time.sleep(1)

quote = api.quote()
print(quote)

My output:

INFO:root:Market is Close or Disconnected 'NoneType' object is not callable
INFO:root:Market is Close or Logged out 'NoneType' object is not callable

Thanks for the help.

I tested also Python 3.9 but I have the same problem

I suggest you try testing with an IC Markets account. Sometimes, some forex brokers do not allow access to a demo account through FIX API. Check with your broker or conduct the test on IC Markets. Up until the date I used it, it worked normally on a demo account.

@manukyanv07
Copy link

Hi! I am having that issue also trying to connect to my live ctrader account.

Host name: live-uk-eqx-01.p.ctrader.com
(Current IP address 76.223.4.250 can be changed without notice)
Port: 5212 (SSL), 5202 (Plain text).
Password: (a/c 2218754 password)
SenderCompID: live2.icmarkets.2218754
TargetCompID: cServer
SenderSubID: TRADE

Added some logs..

DEBUG:root:Starting application
DEBUG:root:Environment variables - HOST_NAME: live-uk-eqx-01.p.ctrader.com, SENDER_COMPID: live2.icmarkets.2218754, PASSWORD: --------------
DEBUG:root:SEND >>> 8=FIX.4.4|9=135|35=A|49=live2.icmarkets.2218754|50=QUOTE|56=CSERVER|57=QUOTE|34=1|52=20241230-12:38:01|98=0|108=30|553=2218754|554=aku_xzm6cqf8TPF@upw|10=160|
DEBUG:root:SEND >>> 8=FIX.4.4|9=135|35=A|49=live2.icmarkets.2218754|50=TRADE|56=CSERVER|57=TRADE|34=1|52=20241230-12:38:01|98=0|108=30|553=2218754|554=aku_xzm6cqf8TPF@upw|10=100|
DEBUG:root:SEND >>> 8=FIX.4.4|9=99|35=x|49=live2.icmarkets.2218754|50=QUOTE|56=CSERVER|57=QUOTE|34=2|52=20241230-12:38:01|320=1|559=0|10=092|
DEBUG:root:RECV <<< 8=FIX.4.4|9=111|35=5|34=1|49=CSERVER|50=TRADE|52=20241230-12:38:02.916|56=live2.icmarkets.2218754|57=TRADE|58=RET_INVALID_DATA|10=044|
DEBUG:root:RECV <<< 8=FIX.4.4|9=111|35=5|34=1|49=CSERVER|50=QUOTE|52=20241230-12:38:02.916|56=live2.icmarkets.2218754|57=QUOTE|58=RET_INVALID_DATA|10=104|
INFO:root:Market is Close or Logged out 'NoneType' object is not callable
INFO:root:Market is Close or Disconnected 'NoneType' object is not callable

@manukyanv07
Copy link

Found the solution. Hope it is useful to you guys.

https://community.ctrader.com/forum/fix-api/23354/

@traderpedroso
Copy link
Member

Found the solution. Hope it is useful to you guys.

https://community.ctrader.com/forum/fix-api/23354/

sorry for the late response yes you need to use the password you setup when you generate your api and not your ctrader account password

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