How to get list of trader history
How to get list of trader history
09 Nov 2024, 05:27
HI all
I'm new on cTrader. Can someone help me to point what did I do wrong to get the trade historical data?
I've tried ProtoOADealListReq and ProtoOAOrderListReq. However both proto message return nonthing even though the ctidTraderAccountId I used have trade historical data
I also have the api application to allow to Access any available account and trade
Replies
ctid8575994
10 Nov 2024, 12:19
( Updated at: 10 Nov 2024, 15:35 )
RE: How to get list of trader history
PanagiotisCharalampous said:
Hi there,
It is really hard to help you with this level of information since do not know what you are doing. Your issue could be anywhere, from wrong dates, wrong account id or any other oversight in your code. A way forward would be to reproduce your issue using the example project. If you cannot, the problem is somewhere in your code. If you can, then provide us the necessary information to reproduce it as well.
Best regards,
Panagiotis
Hi,
Thank you for your response. Please visit https://github.com/Agus-Wei/ctrader-openapi for the reproduce code.
Please use below variable values
appClientId = "11952_cukFsQKaloXkbJIP6Qi95k9jZ4Dqux1ehviD8Xm4rf4NP70Nr6"
appClientSecret = "5100bMPPdKnTIkVf4nNdgP752oxzggUgbdd3hKWLr3hldHP5He"
accessToken = "7NYgAg33OeHobiiWVTVEafIIZUvD019QVIdHYTGoOdI"
Here is what I get when I try to get Deal List
On app.ctrader.com, I can see my account already have trade history as shown on the screenshot below
@ctid8575994
PanagiotisCharalampous
11 Nov 2024, 06:46
RE: RE: How to get list of trader history
ctid8575994 said:
PanagiotisCharalampous said:
Hi there,
It is really hard to help you with this level of information since do not know what you are doing. Your issue could be anywhere, from wrong dates, wrong account id or any other oversight in your code. A way forward would be to reproduce your issue using the example project. If you cannot, the problem is somewhere in your code. If you can, then provide us the necessary information to reproduce it as well.
Best regards,
Panagiotis
Hi,
Thank you for your response. Please visit https://github.com/Agus-Wei/ctrader-openapi for the reproduce code.Please use below variable values
appClientId = "11952_cukFsQKaloXkbJIP6Qi95k9jZ4Dqux1ehviD8Xm4rf4NP70Nr6"appClientSecret = "5100bMPPdKnTIkVf4nNdgP752oxzggUgbdd3hKWLr3hldHP5He"accessToken = "7NYgAg33OeHobiiWVTVEafIIZUvD019QVIdHYTGoOdI"
Here is what I get when I try to get Deal List
On app.ctrader.com, I can see my account already have trade history as shown on the screenshot below
Hi there,
I am not an expert in Python but I could not find where do you read the ProtoOADealListRes response.
Best regards,
Panagiotis
@PanagiotisCharalampous
ctid8575994
11 Nov 2024, 07:07
( Updated at: 11 Nov 2024, 08:42 )
RE: RE: RE: How to get list of trader history
PanagiotisCharalampous said:
ctid8575994 said:
PanagiotisCharalampous said:
Hi there,
It is really hard to help you with this level of information since do not know what you are doing. Your issue could be anywhere, from wrong dates, wrong account id or any other oversight in your code. A way forward would be to reproduce your issue using the example project. If you cannot, the problem is somewhere in your code. If you can, then provide us the necessary information to reproduce it as well.
Best regards,
Panagiotis
Hi,
Thank you for your response. Please visit https://github.com/Agus-Wei/ctrader-openapi for the reproduce code.Please use below variable values
appClientId = "11952_cukFsQKaloXkbJIP6Qi95k9jZ4Dqux1ehviD8Xm4rf4NP70Nr6"appClientSecret = "5100bMPPdKnTIkVf4nNdgP752oxzggUgbdd3hKWLr3hldHP5He"accessToken = "7NYgAg33OeHobiiWVTVEafIIZUvD019QVIdHYTGoOdI"
Here is what I get when I try to get Deal List
On app.ctrader.com, I can see my account already have trade history as shown on the screenshot belowHi there,
I am not an expert in Python but I could not find where do you read the ProtoOADealListRes response.
Best regards,
Panagiotis
Hi,
It is on this part print("Message received: \n", Protobuf.extract(message))
as on below screenshot, it only give me ctidTraderAccountId.
@ctid8575994
PanagiotisCharalampous
11 Nov 2024, 08:47
RE: RE: RE: RE: How to get list of trader history
ctid8575994 said:
PanagiotisCharalampous said:
ctid8575994 said:
PanagiotisCharalampous said:
Hi there,
It is really hard to help you with this level of information since do not know what you are doing. Your issue could be anywhere, from wrong dates, wrong account id or any other oversight in your code. A way forward would be to reproduce your issue using the example project. If you cannot, the problem is somewhere in your code. If you can, then provide us the necessary information to reproduce it as well.
Best regards,
Panagiotis
Hi,
Thank you for your response. Please visit https://github.com/Agus-Wei/ctrader-openapi for the reproduce code.Please use below variable values
appClientId = "11952_cukFsQKaloXkbJIP6Qi95k9jZ4Dqux1ehviD8Xm4rf4NP70Nr6"appClientSecret = "5100bMPPdKnTIkVf4nNdgP752oxzggUgbdd3hKWLr3hldHP5He"accessToken = "7NYgAg33OeHobiiWVTVEafIIZUvD019QVIdHYTGoOdI"
Here is what I get when I try to get Deal List
On app.ctrader.com, I can see my account already have trade history as shown on the screenshot belowHi there,
I am not an expert in Python but I could not find where do you read the ProtoOADealListRes response.
Best regards,
Panagiotis
Hi,
It is on this partprint("Message received: \n", Protobuf.extract(message))
as on below screenshot, it only give me ctidTraderAccountId.
Obviously this method does not do anything more. You would need to write some more code to read the deals out of the extracted message.
@PanagiotisCharalampous
PanagiotisCharalampous
09 Nov 2024, 12:55
Hi there,
It is really hard to help you with this level of information since do not know what you are doing. Your issue could be anywhere, from wrong dates, wrong account id or any other oversight in your code. A way forward would be to reproduce your issue using the example project. If you cannot, the problem is somewhere in your code. If you can, then provide us the necessary information to reproduce it as well.
Best regards,
Panagiotis
@PanagiotisCharalampous