ejtraderLabs / ejtraderCT

The best Python Ctrader FIX API Perfect for HFT
MIT License
59 stars 20 forks source link

RET_NO_SUCH_LOGIN #6

Closed selskas closed 1 year ago

selskas commented 2 years ago

Hi, I'm using pepperstone for this and having problem logging in. Can you please point me to the right direction?

Screenshot 2022-08-28 at 10 20 46

Using these credentials:

Host name: h58.p.ctrader.com
(Current IP address 84.22.97.147 can be changed without notice)
Port: 5212 (SSL), 5202 (Plain text).
Password: (a/c 4055947 password)
SenderCompID: demo.pepperstone.4055947
TargetCompID: cServer
SenderSubID: TRADE

ejtrader.py

from ejtraderCT import Ctrader

import time
import logging
from datetime import datetime

logging.getLogger().setLevel(logging.DEBUG)

server = "h58.p.ctrader.com"  # Host name
broker = "demo.pepperstone"
account = "4055947"
password = "abc1234"
currency = "USD"

api = Ctrader(server, broker, account, password, currency)

But get this error:

python3 ejtrader.py 
DEBUG:root:SEND >>> 8=FIX.4.4|9=124|35=A|49=demo.pepperstone.4055947|50=QUOTE|56=CSERVER|57=QUOTE|34=1|52=20220828-07:15:28|98=0|108=30|553=4055947|554=abc1234|10=050|
DEBUG:root:SEND >>> 8=FIX.4.4|9=124|35=A|49=demo.pepperstone.4055947|50=TRADE|56=CSERVER|57=TRADE|34=1|52=20220828-07:15:28|98=0|108=30|553=4055947|554=abc1234|10=246|
DEBUG:root:SEND >>> 8=FIX.4.4|9=100|35=x|49=demo.pepperstone.4055947|50=QUOTE|56=CSERVER|57=QUOTE|34=2|52=20220828-07:15:28|320=1|559=0|10=071|
DEBUG:root:RECV <<< 8=FIX.4.4|9=113|35=5|34=1|49=CSERVER|50=QUOTE|52=20220828-07:15:28.380|56=demo.pepperstone.4055947|57=QUOTE|58=RET_NO_SUCH_LOGIN|10=183|
ERROR:root:Logged out: RET_NO_SUCH_LOGIN
ERROR:root:Disconnected
DEBUG:root:RECV <<< 8=FIX.4.4|9=113|35=5|34=1|49=CSERVER|50=TRADE|52=20220828-07:15:28.380|56=demo.pepperstone.4055947|57=TRADE|58=RET_NO_SUCH_LOGIN|10=123|
ERROR:root:Logged out: RET_NO_SUCH_LOGIN
ERROR:root:Disconnected

What am I doing wrong?

traderpedroso commented 1 year ago

Hi, I'm using pepperstone for this and having problem logging in. Can you please point me to the right direction?

Screenshot 2022-08-28 at 10 20 46

Using these credentials:

Host name: h58.p.ctrader.com
(Current IP address 84.22.97.147 can be changed without notice)
Port: 5212 (SSL), 5202 (Plain text).
Password: (a/c 4055947 password)
SenderCompID: demo.pepperstone.4055947
TargetCompID: cServer
SenderSubID: TRADE

ejtrader.py

from ejtraderCT import Ctrader

import time
import logging
from datetime import datetime

logging.getLogger().setLevel(logging.DEBUG)

server = "h58.p.ctrader.com"  # Host name
broker = "demo.pepperstone"
account = "4055947"
password = "abc1234"
currency = "USD"

api = Ctrader(server, broker, account, password, currency)

But get this error:

python3 ejtrader.py 
DEBUG:root:SEND >>> 8=FIX.4.4|9=124|35=A|49=demo.pepperstone.4055947|50=QUOTE|56=CSERVER|57=QUOTE|34=1|52=20220828-07:15:28|98=0|108=30|553=4055947|554=abc1234|10=050|
DEBUG:root:SEND >>> 8=FIX.4.4|9=124|35=A|49=demo.pepperstone.4055947|50=TRADE|56=CSERVER|57=TRADE|34=1|52=20220828-07:15:28|98=0|108=30|553=4055947|554=abc1234|10=246|
DEBUG:root:SEND >>> 8=FIX.4.4|9=100|35=x|49=demo.pepperstone.4055947|50=QUOTE|56=CSERVER|57=QUOTE|34=2|52=20220828-07:15:28|320=1|559=0|10=071|
DEBUG:root:RECV <<< 8=FIX.4.4|9=113|35=5|34=1|49=CSERVER|50=QUOTE|52=20220828-07:15:28.380|56=demo.pepperstone.4055947|57=QUOTE|58=RET_NO_SUCH_LOGIN|10=183|
ERROR:root:Logged out: RET_NO_SUCH_LOGIN
ERROR:root:Disconnected
DEBUG:root:RECV <<< 8=FIX.4.4|9=113|35=5|34=1|49=CSERVER|50=TRADE|52=20220828-07:15:28.380|56=demo.pepperstone.4055947|57=TRADE|58=RET_NO_SUCH_LOGIN|10=123|
ERROR:root:Logged out: RET_NO_SUCH_LOGIN
ERROR:root:Disconnected

What am I doing wrong? broker name wrong "demo.pepperstone" change to broker = "pepperstone"