sql server api set up

Created at 02 Oct 2020, 07:48
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!
JA

jayteasuk

Joined 25.09.2020

sql server api set up
02 Oct 2020, 07:48


im trying to set up a api on my sql server to view my account and submit trades

 

this is purely for my own purposes but the spotware api documentation seems very geared towards authenticating partner keys etc which is confusing matters

how do i go about just authenticating my own account to get up and running


@jayteasuk
Replies

PanagiotisCharalampous
02 Oct 2020, 09:45

Hi jayteasuk,

If you just want to use the application for your own purposes, you can generate a token using your application's playground and use it in your application.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

jayteasuk
02 Oct 2020, 10:26

RE:

PanagiotisCharalampous said:

Hi jayteasuk,

If you just want to use the application for your own purposes, you can generate a token using your application's playground and use it in your application.

Best Regards,

Panagiotis 

Join us on Telegram

thanks im a little further now

so i have to refresh my access token

the token says expires_in => 2628000

what does this value represent?


@jayteasuk

PanagiotisCharalampous
02 Oct 2020, 10:29

Hi jayteasuk,

That's seconds, around one month.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

jayteasuk
03 Oct 2020, 07:19

im trying to make my first connection using the below URL

https://sandbox-api.spotware.com/connect/profile?access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

 

where xxx is my access_token from the play area but im getting the below error

{"error":{"errorCode":"CH_ACCESS_TOKEN_INVALID","description":"Invalid access token"}}


@jayteasuk

PanagiotisCharalampous
05 Oct 2020, 07:58

Hi jayteasuk,

The sandbox environment is not supported anymore. Please use the production environment i.e. https://api.spotware.com/

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

jayteasuk
06 Oct 2020, 03:37

RE:

that worked thank you

now i have the profile information working through SQL server should it be possible to make use of the protocol buffers thrrugh the same method as well?

 

 

PanagiotisCharalampous said:

Hi jayteasuk,

The sandbox environment is not supported anymore. Please use the production environment i.e. https://api.spotware.com/

Best Regards,

Panagiotis 

Join us on Telegram

 


@jayteasuk

PanagiotisCharalampous
06 Oct 2020, 07:39

Hi jayteasuk,

I am not sure what do you mean. Can you please elaborate?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

jayteasuk
08 Oct 2020, 09:27

RE:

PanagiotisCharalampous said:

Hi jayteasuk,

I am not sure what do you mean. Can you please elaborate?

Best Regards,

Panagiotis 

Join us on Telegram

 

I now have my api working to pull data on my accounts and pricing by using

https://connect.spotware.com/docs/api-reference/accounts-api

for example

https://api.spotware.com/connect/tradingaccounts/123456/symbols/AUDUSD/trendbars/m5?from=20201006204500&to=20201007225900&access_token=xxxxxxxxxxxxxxxxxxxxx

Im now ready to set up the process for submitting trades but ive not found a similar link like the above to do this in the same way through a query string that i can use on my SQL server

 


@jayteasuk

PanagiotisCharalampous
08 Oct 2020, 09:42

Hi jayteasuk,

It seems you are using Open API 1.0 to develop your application. You need to use Open API 2.0 since v1.0 will be decommissioned next month.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous