-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Hello,
I'm writing simple script to use signals according to which the script should place an order via FIX API to my broker account. I use ICMarkets demo account to run my tests. I wrote it in Python and used ejtraderCT to communicate with API
So far my script outputs in logs that everything works just fine - it tells that it connects to FIX, logs in my account, parses my signals and finds them, then places an order and receives something like a ticket and closes.
Problem is that in fact it does nothing. No orders in my demo account (which I see in cTrader web). And if believing cTrader active sessions page, no additional logons happen
My question is how to change this? I can see in other issues and similar questions that code similar to mine works just fine. What I'm doing wrong?
Here's the output in my logs:
INFO:root:FIX Connected and ready
INFO:root:Signed in with account: demo.icmarkets.9649122
INFO:root:Fix Host: demo-uk-eqx-01.p.ctrader.com
INFO:root:Subscribed to market data for XAUUSD (ID 41)
INFO:root:=== POLL START ===
INFO:root:BUY signal detected
INFO:root:Found 1 signal(s)
INFO:root:Raw quote: {'XAUUSD': {'time': 1764114873586, 'bid': 4132.28, 'ask': 4132.35}}
INFO:root:Market open: XAUUSD Bid=4132.28 Ask=4132.35
INFO:root:Action: OPEN, Symbol: 41, Lots: 0.01, Ticket: 1764114874014148271742, price: 0, takeprofit: None, stoploss: None, type: 0
INFO:root:['buy', '41', '1000', '1764114874014148271742']
INFO:root:Command: buy 41 1000 1764114874014148271742
INFO:root:error ORIGINAL ID: 1764114874014148271742
INFO:root:error POS ID: None
INFO:root:ORDER EXECUTED: BUY 0.01 41 → ID: 1764114874014148271742
INFO:root:Opened positions list: []
INFO:root:=== POLL END ===
It tells at the end of the log that no positions were found (I used api.positions() to output that). At the same time, it just wrote above that it kinda opened something (in fact it didn't, api.positions doesn't lie)
I tried to ask in the broker support, they told to go elsewhere for help and that they don't provide support for API.
Where to search for problem?