open api issue

Created at 28 Feb 2023, 10:03
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!
35

353796440

Joined 28.02.2023

open api issue
28 Feb 2023, 10:03


I encountered a problem when using your openapi. I sent data to you, and then returned, but the returned data could not be parsed, and it contained zero. I would like to ask if there is a problem with the data I sent to you. I made a mistake, I have posted the code, you can check it out, thank you very much

 


@353796440
Replies

Spotware
28 Feb 2023, 10:07

Dear trader,

Can you please provide the steps to reproduce this problem?

Best regards,

cTrader Team


@Spotware

353796440
28 Feb 2023, 10:14

RE:

Spotware said:

Dear trader,

Can you please provide the steps to reproduce this problem?

Best regards,

cTrader Team

The code I just wrote is in the main function of flutter, and it will be called when the application is started. I have screenshots of the code for creating the socket and sending data to you, but why the returned data cannot be parsed? My main problem is the returned data. , I am wondering if I have set it wrong, or the analysis is wrong, I need you to help me find it.

 


@353796440

Spotware
28 Feb 2023, 10:25

Dear trader,

In order to assist you further, you will need to provide us with the complete source code of your project and exact steps to reproduce this behavior. Alternatively, you can check your example projects in our GitHub repository on how to correctly exchange messages with Open API. 

Best regards,

cTrader Team


@Spotware

353796440
28 Feb 2023, 10:27

RE: RE:

353796440 said:

Spotware said:

Dear trader,

Can you please provide the steps to reproduce this problem?

Best regards,

cTrader Team

The code I just wrote is in the main function of flutter, and it will be called when the application is started. I have screenshots of the code for creating the socket and sending data to you, but why the returned data cannot be parsed? My main problem is the returned data. , I am wondering if I have set it wrong, or the analysis is wrong, I need you to help me find it.

 

Do I need to add my ip to the whitelist when I link to your server?


@353796440

353796440
28 Feb 2023, 10:31

RE:

Spotware said:

Dear trader,

In order to assist you further, you will need to provide us with the complete source code of your project and exact steps to reproduce this behavior. Alternatively, you can check your example projects in our GitHub repository on how to correctly exchange messages with Open API. 

Best regards,

cTrader Team

I use the dart language, but there is no corresponding example in your GitHub repository


@353796440

353796440
28 Feb 2023, 10:32

RE: RE:

353796440 said:

Spotware said:

Dear trader,

In order to assist you further, you will need to provide us with the complete source code of your project and exact steps to reproduce this behavior. Alternatively, you can check your example projects in our GitHub repository on how to correctly exchange messages with Open API. 

Best regards,

cTrader Team

I use the dart language, but there is no corresponding example in your GitHub repository

It’s not about checking the code, it’s about why the data I sent to you returned the result but the result couldn’t be parsed. Is there something wrong with your background writing? I use the dart language. This problem requires the front and back to find the problem together.


@353796440

Spotware
28 Feb 2023, 12:08

Dear trader,

Do I need to add my ip to the whitelist when I link to your server?

There is nothing you need to do as far as we are concerned.

Unfortunately our team does not have expertise in Dart language. Therefore it is not possible for us to determine the reason your code does not parse the received messages correctly. We only have samples in .Net, Python and Node.js. If you have experience in any of these programming languages, feel free to have a look and compare the examples with your solution.

Best regards,

cTrader Team


@Spotware

swapd0
31 Mar 2023, 20:42 ( Updated at: 31 Mar 2023, 22:56 )

Sometimes I got the same issue, I send a ProtoOAGetTrendbarsReq with M1 time frame, for yesterday data (from 0:00:00 to 23:59:00) and I sometimes I get a zero size message or a 16kB message full of zeroes.

If I change the time frame to M5 it works.

Edited:

Maybe the problem is with the type of connection? I can create a sslv23, sslv23_client, sslv3, sslv3_client, ttlsv13, lsv13_client context type, not sure which one I've to use. Although I've no problem to get the symbol list, or subscribe to a symbol.


@swapd0