Simple Example MarketDataSubsctiption OrderEventSubscription and MarketOrder

Created at 22 Jun 2020, 02:35
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
GL

glikoz

Joined 19.06.2020

Simple Example MarketDataSubsctiption OrderEventSubscription and MarketOrder
22 Jun 2020, 02:35


I implemented PriceSubscription, MakeOrder, and OrderEventSubscription for Bitmex via API and WebSocket in JUST ONE day.

But when I tried it with CTrader FixAPI, this is 4th day and I can just logon!

Although I have 15+ years of experience with c#.

Lack of documentation, false flags, etc.

We have https://github.com/spotware/FIX-API-Sample  joke. It is 3 years old. Works just for login on the demo server.

I met more mature http://quickfixn.org/ and it seems up to date. But it seems that there is nuances broker to broker.

I need PriceSubscription, MakeMarketOrder, and OrderEventSubscription.

The last problem is when I tried to MarketOrderSubscription via

 FIX {
  BeginString = FIX.4.4;
  MsgSeqNum = 2;
  MsgType = MARKET_DATA_REQUEST (V);
  SenderCompID = xxxxxxxxxx;
  SendingTime = 20200621-23:30:45.559;
  TargetCompID = cServer;
  TargetSubID = QUOTE;
  MDReqID = MARKETDATAID;
  SubscriptionRequestType = SNAPSHOT_PLUS_UPDATES (1);
  MarketDepth = 0;
  NoMDEntryTypes (count 1) {
    {
      MDEntryType = BID (0);
    }
  };
  NoRelatedSym (count 1) {
    {
      Symbol = 1;
    }
  };
}, SessionId: FIX.4.4:icmarkets.xxxxxxxx->cServer/QUOTE

 

I am getting strange response

 <incoming> FIX {
  BeginString = FIX.4.4;
  MsgSeqNum = 3;
  MsgType = REJECT (3);
  SenderCompID = xxxxxxxxxxxx;
  SenderSubID = QUOTE;
  SendingTime = 20200621-23:30:46.701;
  TargetCompID = cServer;
  TargetSubID = QUOTE;
  RefSeqNum = 2;
  Text = Tag appears more than once;
  RefTagID = 278;
  RefMsgType = W;
  SessionRejectReason = TAG_APPEARS_MORE_THAN_ONCE (13);
}, SessionId: FIX.4.4:icmarkets.xxxxxxxxx>cServer/QUOTE

Anyone can suggest something...

Note: xxxxxxxxxxxx is mask for my accountId


@glikoz
Replies

glikoz
22 Jun 2020, 13:48

RE: Weird Now works

glikoz said:

I implemented PriceSubscription, MakeOrder, and OrderEventSubscription for Bitmex via API and WebSocket in JUST ONE day.

But when I tried it with CTrader FixAPI, this is 4th day and I can just logon!

Although I have 15+ years of experience with c#.

Lack of documentation, false flags, etc.

We have https://github.com/spotware/FIX-API-Sample  joke. It is 3 years old. Works just for login on the demo server.

I met more mature http://quickfixn.org/ and it seems up to date. But it seems that there is nuances broker to broker.

I need PriceSubscription, MakeMarketOrder, and OrderEventSubscription.

The last problem is when I tried to MarketOrderSubscription via

 FIX {
  BeginString = FIX.4.4;
  MsgSeqNum = 2;
  MsgType = MARKET_DATA_REQUEST (V);
  SenderCompID = xxxxxxxxxx;
  SendingTime = 20200621-23:30:45.559;
  TargetCompID = cServer;
  TargetSubID = QUOTE;
  MDReqID = MARKETDATAID;
  SubscriptionRequestType = SNAPSHOT_PLUS_UPDATES (1);
  MarketDepth = 0;
  NoMDEntryTypes (count 1) {
    {
      MDEntryType = BID (0);
    }
  };
  NoRelatedSym (count 1) {
    {
      Symbol = 1;
    }
  };
}, SessionId: FIX.4.4:icmarkets.xxxxxxxx->cServer/QUOTE

 

I am getting strange response

 <incoming> FIX {
  BeginString = FIX.4.4;
  MsgSeqNum = 3;
  MsgType = REJECT (3);
  SenderCompID = xxxxxxxxxxxx;
  SenderSubID = QUOTE;
  SendingTime = 20200621-23:30:46.701;
  TargetCompID = cServer;
  TargetSubID = QUOTE;
  RefSeqNum = 2;
  Text = Tag appears more than once;
  RefTagID = 278;
  RefMsgType = W;
  SessionRejectReason = TAG_APPEARS_MORE_THAN_ONCE (13);
}, SessionId: FIX.4.4:icmarkets.xxxxxxxxx>cServer/QUOTE

Anyone can suggest something...

Note: xxxxxxxxxxxx is mask for my accountId

 

No change on source code, altough same error message now data is coming


@glikoz