submitted & confirmed trade not showing in cTrader platform and not returned in ProtoOADealListReq
submitted & confirmed trade not showing in cTrader platform and not returned in ProtoOADealListReq
11 Nov 2020, 22:53
i have an example of a trade being placed against symbol XPDUSD (on my demo account)
the response confirms the trade was successfully placed but it does not appear in the cTrader platform and is not returned by the ProtoOADealListReq
I only have one example at the moment but it doesnt matter how many times i place it, it never shows
executionType: ORDER_ACCEPTED
position {
positionId: 55644962
tradeData {
symbolId: 73
volume: 0
tradeSide: BUY
guaranteedStopLoss: false
7: "TradingApiTest.CreateMarketOrderRequest"
}
positionStatus: POSITION_STATUS_CREATED
...
orderType: MARKET
orderStatus: ORDER_STATUS_ACCEPTED
Replies
PanagiotisCharalampous
13 Nov 2020, 15:45
Hi jayteasuk,
We need more information to check this further.
- Please confirm that you are using the same account in both cases. Please provide ctidTraderAccountId and trading account number.
- Please provide us the complete sequence of exchanged messages from ProtoOANewOrderReq until the ProtoOAExecutionEvent with ProtoOAExecutionType.ORDER_FILLED type indicating that the order was filled and the position opened.
- Some screenshots showing the account number and the fact that the position is missing
Best Regards,
Panagiotis
@PanagiotisCharalampous
jayteasuk
16 Nov 2020, 19:05
RE:
PanagiotisCharalampous said:
Hi jayteasuk,
We need more information to check this further.
- Please confirm that you are using the same account in both cases. Please provide ctidTraderAccountId and trading account number.
- Please provide us the complete sequence of exchanged messages from ProtoOANewOrderReq until the ProtoOAExecutionEvent with ProtoOAExecutionType.ORDER_FILLED type indicating that the order was filled and the position opened.
- Some screenshots showing the account number and the fact that the position is missing
Best Regards,
Panagiotis
I have just run another test to provide the details you need
hopefully this gives you what you need, i think its just this symbol thats the problem, all others appear in the ctrader windows frontend and in the ProtoOADealListReq
ctidTraderAccountId: 19137822
executionType: ORDER_ACCEPTED
position {
positionId: 55759886
tradeData {
symbolId: 73
volume: 0
tradeSide: BUY
guaranteedStopLoss: false
7: "TradingApiTest.CreateMarketOrderRequest"
}
positionStatus: POSITION_STATUS_CREATED
swap: 0
price: 0
commission: 0
marginRate: 0
mirroringCommission: 0
guaranteedStopLoss: false
usedMargin: 0
15: 2
}
order {
orderId: 95441003
tradeData {
symbolId: 73
volume: 100000
tradeSide: BUY
openTimestamp: 1605546038638
guaranteedStopLoss: false
7: "TradingApiTest.CreateMarketOrderRequest"
}
orderType: MARKET
orderStatus: ORDER_STATUS_ACCEPTED
executedVolume: 0
utcLastUpdateTimestamp: 1605546038638
closingOrder: false
timeInForce: IMMEDIATE_OR_CANCEL
positionId: 55759886
relativeStopLoss: 80000
relativeTakeProfit: 120000
trailingStopLoss: false
}
isServerEvent: false
@jayteasuk
PanagiotisCharalampous
17 Nov 2020, 08:29
Hi jayteasuk,
I do not see an ProtoOAExecutionType.ORDER_FILLED event indicating that the order was filled. Also from what I see the volume is 0. How do you expect an order with volume 0 to be filled?
Best Regards,
Panagiotis
@PanagiotisCharalampous
jayteasuk
17 Nov 2020, 09:58
( Updated at: 21 Dec 2023, 09:22 )
RE:
PanagiotisCharalampous said:
Hi jayteasuk,
I do not see an ProtoOAExecutionType.ORDER_FILLED event indicating that the order was filled. Also from what I see the volume is 0. How do you expect an order with volume 0 to be filled?
Best Regards,
Panagiotis
That's interesting that the executed volume is 0 however the volume in the order is 100,000 (0.01) which im using for all my test trades at the moment and they are working, apart from these symbols XPTUSD,XAUUSD,XPDUSD
here is an example of AUDUSD 100000 which has shown in the cTrader platform but also has an executed volume of 0
ctidTraderAccountId: 19137822
executionType: ORDER_ACCEPTED
position {
positionId: 55789145
tradeData {
symbolId: 5
volume: 0
tradeSide: BUY
guaranteedStopLoss: false
7: "TradingApiTest.CreateMarketOrderRequest"
}
positionStatus: POSITION_STATUS_CREATED
swap: 0
price: 0
commission: 0
marginRate: 0
mirroringCommission: 0
guaranteedStopLoss: false
usedMargin: 0
15: 2
}
order {
orderId: 95487816
tradeData {
symbolId: 5
volume: 100000
tradeSide: BUY
openTimestamp: 1605599626204
guaranteedStopLoss: false
7: "TradingApiTest.CreateMarketOrderRequest"
}
orderType: MARKET
orderStatus: ORDER_STATUS_ACCEPTED
executedVolume: 0
utcLastUpdateTimestamp: 1605599626204
closingOrder: false
timeInForce: IMMEDIATE_OR_CANCEL
positionId: 55789145
relativeStopLoss: 8
relativeTakeProfit: 12
trailingStopLoss: false
}
isServerEvent: false
@jayteasuk
PanagiotisCharalampous
17 Nov 2020, 10:12
Hi jayteasuk,
I don't think you can trade 100000 on these symbols. Try with lower volulmes. In any case, you need to receive ProtoOAExecutionType.ORDER_FILLED event in order for your order to be filled and see the position in cTrader. It doesn't seem you received such a message.
Best Regards,
Panagiotis
@PanagiotisCharalampous
jayteasuk
17 Nov 2020, 11:14
RE:
PanagiotisCharalampous said:
Hi jayteasuk,
I don't think you can trade 100000 on these symbols. Try with lower volulmes. In any case, you need to receive ProtoOAExecutionType.ORDER_FILLED event in order for your order to be filled and see the position in cTrader. It doesn't seem you received such a message.
Best Regards,
Panagiotis
thank you, reducing the volume worked.
when it was too low i got the message
ProtoMessage{OrderErrorResponse{errorCode:TRADING_BAD_VOLUME, description:Order volume 0.10 is smaller than group minVolume=1.00.}}
having looked at the symbol i see there is a category id, 2 in this case. Can i asume that these categories have the minVolume and some other useful information
Where can i get these details from the API
@jayteasuk
PanagiotisCharalampous
17 Nov 2020, 11:24
Hi jayteasuk,
You can find out the min and max volume for each symbol using ProtoOASymbol.minVolume and ProtoOASymbol.maxVolume respectively.
Best Regards,
Panagiotis
@PanagiotisCharalampous
jayteasuk
13 Nov 2020, 12:19
RE:
jayteasuk said:
please can i get some help with this query
@jayteasuk