ejtraderCT
ejtraderCT copied to clipboard
Not able to login
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
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!
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 callableThanks 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.
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
Found the solution. Hope it is useful to you guys.
https://community.ctrader.com/forum/fix-api/23354/
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