How to work with trade API

Created at 27 Jun 2018, 15:46
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!
PR

prabha

Joined 20.06.2018

How to work with trade API
27 Jun 2018, 15:46


Hi,

I have tried to work with trade api with following host (tradeapi.spotware.com) and port (5032) using php socket connection.

But it has throw the error like 'frame too long'. 

Please help me. its urgent

Thanks,

Prabaharan.S. 


@prabha
Replies

PanagiotisCharalampous
27 Jun 2018, 15:52

Hi Prabaharan,

This seems to be a php issue and not an API one. Since most of the community members are .net programmers, I would advise you to seek for an answer in php forum as well.

Best Regards,

Panagiotis


@PanagiotisCharalampous

prabha
27 Jun 2018, 15:57

RE:

Hi Sir,

Thanks for your resonse,

I have used the curl, if php error means it has throw the error with line. But i got the curl response without curl error. So it should be a API response

Thanks,

Prabaharan.S.

 

Panagiotis Charalampous said:

Hi Prabaharan,

This seems to be a php issue and not an API one. Since most of the community members are .net programmers, I would advise you to seek for an answer in php forum as well.

Best Regards,

Panagiotis

 


@prabha

PanagiotisCharalampous
27 Jun 2018, 16:04

Hi Prabaharan,

I did not understand what you mean. If you get curl response without an error, then why do you think this is an API problem and not a php issue? Can you please elaborate?

Best Regards,

Panagiotis


@PanagiotisCharalampous

prabha
27 Jun 2018, 16:14

RE:

Hi Sir,

I have tried to say, it is not a PHP error, if API response has correct means, it should show the response as json/xml as per given by spotware PHP webservice document. 

But response has only like '723FRAME_TOO_LONG!Frame size exceeds allowed limit'

Thanks,

Prabaharan.S.

Panagiotis Charalampous said:

Hi Prabaharan,

I did not understand what you mean. If you get curl response without an error, then why do you think this is an API problem and not a php issue? Can you please elaborate?

Best Regards,

Panagiotis

 


@prabha

PanagiotisCharalampous
27 Jun 2018, 16:19

Hi Prabaharan,

Connect Trading API uses protocol buffers, not json. Which document are you referring too?

Best Regards,

Panagiotis


@PanagiotisCharalampous

prabha
27 Jun 2018, 16:21

RE:

Hi Sir,

I have refered following link https://spotware.com/ws/

Thanks

Prabaharan.S.

Panagiotis Charalampous said:

Hi Prabaharan,

Connect Trading API uses protocol buffers, not json. Which document are you referring too?

Best Regards,

Panagiotis

 


@prabha

PanagiotisCharalampous
27 Jun 2018, 16:24

Hi Prabaharan,

This is WS API and has nothing to do with Connect API. This API is used for integrations with the back end systems of the brokers. Documentation for Connect API is found here.

Best Regards,

Panagiotis

 


@PanagiotisCharalampous

prabha
27 Jun 2018, 16:30

RE:

Hi Sir,

Thanks Sir,

Could you tell me, is there any 'Generate Classes using Protobuf tools' in PHP?

Thanks,

Prabaharan.S.

Panagiotis Charalampous said:

Hi Prabaharan,

This is WS API and has nothing to do with Connect API. This API is used for integrations with the back end systems of the brokers. Documentation for Connect API is found here.

Best Regards,

Panagiotis

 

 


@prabha

PanagiotisCharalampous
27 Jun 2018, 16:44

Hi Prabaharan,

Personally I am not aware of such tools. Google has introduced generation of PHP classes for proto 3 but Trading API uses proto 2.

Best Regards,

Panagiotis


@PanagiotisCharalampous

affbtc@gmail.com
02 Jul 2018, 16:12

RE:

prabha said:

Hi,

I have tried to work with trade api with following host (tradeapi.spotware.com) and port (5032) using php socket connection.

But it has throw the error like 'frame too long'. 

Please help me. its urgent

Thanks,

Prabaharan.S. 

 

@prabha, have you found a solution ? Got any email Id I can reach out to you?


@affbtc@gmail.com