Linking Tradestation with Parabola

Hello guys, I’m trying to pull my current stock holdings ticker symbols from Tradestation broker and export them to a google sheets spreadsheet using Parabola to mediate this link

I am not successful in setting the connection between Tradestation and Parabola. I wonder if someone had success doing this before or can help with the API settings

TradeStation API documentation : Auth Code Flow | TradeStation API

How can I get Parabola to route to the authorization URL? also what would be the redirect_uri for Parabola?

thank you so much

Hi @Sameh_Radwan :wave:

Happy to help you connect to the TradeStation API. Check out this Loom video I made walking you through documentation and entering that into Parabola:

To ensure this works, add the same custom header key/value pair from the access token section to the refresh token section as well.

Let me know if this helps!

1 Like

Thank you so much Daniel! I will check it out and let you know

@daniel , sorry for the late reply but I was traveling and I was meaning to send you this. Everytime I try to apply the Oauth settings I get this error attached

Any thoughts?

Hi @Sameh_Radwan - Stepping in for Daniel to help! It looks like the callback URL that is being provided on the Parabola side may not match what you have saved on the TradeStation side.

When you click into that Application Settings link on the page, are you seeing https://parabola.io/api/steps/generic_api/callback listed as one of the URLs?

Hi @Emory_Stainbrook ! Thank you for your reply, appreciate it. So I have not saved any callback urls on Tradestation because I was not able to access the link they provided in the url "[https://config.tslogin.auth0.com/]

I sent this to Tradestation API team and this is what they sent:

It is not immediately clear why you would be encountering an issue with the redirect_uri (callback).

In general, the redirect_uri is only need initially when you first obtain a refresh token. Once you have obtained a refresh token, the redirect_uri is no longer needed.

Once you have obtained a refresh token, access tokens can be generated as needed through an x-www-form-urlencoded POST request to https://signin.tradestation.com/oauth/token

Note, a new access token should only be obtained when the current one is approaching expiration or has expired.

For a greater explanation on the authentication process, see the following topic:

V3 - Authentication: Sign-in Process & Tokens

The following redirect_uri’s (callback URLs) are enabled default:

http://localhost
http://localhost:80
http://localhost:3000
http://localhost:3001
http://localhost:8080
http://localhost:31022

If you would like to add an additional redirect_uri to your API key, you can submit a request to ClientServices@tradestation.com.

Thank you,

John
TradeStation EasyLanguage/WebAPI Support Department

So wanted to ask what you recommend I do now? should I email a request as they mentioned?

Thanks for reaching out to the Tradestation team! At the bottom of their message they mention adding a redirect URI to the API key.

If you would like to add an additional redirect_uri to your API key, you can submit a request to ClientServices@tradestation.com.

Would you be able to confirm if Parabola’s callback is listed on the API key? If not, you’ll want to add this to the list: https://parabola.io/api/steps/generic_api/callback

Thanks,
Ayana

Hey @Ayana_Usui , I made contact with Tradestation API team and the callback URL was added to my API key. but now when I try to apply the settings, this shows up intead: “No data received”

Any help is appreciated , thank you!

Hi @Sameh_Radwan - From the screenshot that you sent over, it looks like the API Endpoint URL is blank. You’ll need to set up that endpoint to start pulling in data now that you’re connected. Happy to help with the formatting of that endpoint. What data are you looking to pull in?

Thank you so much @Emory_Stainbrook . What I I am hoping to do is:

  1. Pull my current stock holdings (ticker symbols like AAPL, etc) automatically into a google sheets spreadsheet. I am trying to monitor their earnings dates
  2. Practice semi-automated trading through another google spreadsheet where everyday I document multiple ticker symbols, trade direction (BUY/SELL), entry price, share size and then have limit orders sent automatically from that spreadsheet to tradestation next morning premarket. let me know if you want to see an example of that spreadsheet.

Thank you!

Hi @Sameh_Radwan - Thank you for that information! Could you please reach out to us at help@parabola.io and send over a link to the Flow where you’re setting this up so we can take a look? Thank you!

Hi @Emory_Stainbrook , I was finally able to pull my positions thanks to your help! Thank you for that, now last thing is sending orders from google sheets to TS, I just needed to check with you the format of the order: as you can see in TS documentation Here there are many languages I can use to format the order (Python, C#, shell, etc…) which format should i choose?

Hi @Sameh_Radwan- You can use the body formatting from the Payload option. The Request Body is sent in JSON format.

Let us know if you have any questions as you set that up!

1 Like

@Emory_Stainbrook , I would appreciate help with the formatting portion as I’ve been struggling!

So I’m trying to pull data from google sheets and send them as multiple orders to tradestation. I am using a flow with 2 steps: 1. pull from google sheets 2. send to API. endpoint url is https://api.tradestation.com/v3/orderexecution/orders per this

I realize that orders need to be sent in JSON format like this?

{
“AccountID”: “1234567”,
“Symbol”: “MSFT”,
“Quantity”: “10”,
“OrderType”: “Limit”,
“TradeAction”: “BUY”,
“LimitPrice”: “132.52”,
“TimeInForce”: {
“Duration”: “GTC”
},
“Route”: “Intelligent”
}

I tried writing this JSON paragraph in cell A1 of the spreadsheet as shown in screenshot. Flow ran successfully but no orders were sent. whenever I try to send multiple rows from sheets (multiple orders), flow gives a 500 error. Can you help with proper formatting/ and being able to send multiple orders?

third screenshot attached shows flow was run successfully (not exact same order but just showing you how things went)

Thank you so much, appreciate your patience with this!


Screenshot 2023-07-24 143741

Hi @Sameh_Radwan!

For formatting JSON body, we recommend using an online validator/formatter like jsonlint!

Flow ran successfully but no orders were sent.

Is this an intentional outcome after running the Flow or were there orders supposed to be placed? If an order was supposed to be placed, it seems like the request being sent needs to be adjusted.

Best,
Ayana

Hey, yes i validated it. an order was supposed to be placed but it was not. how do I adjust this request?

Could you send us how the Request Body section in the Send to API step is set up? It looks like the JSON format looks correct from the example they have posted on their API documentation!

1 Like

Theres nothing in that request body

Hi Sameh, you’ll want to input your column name in the Request Body section so Parabola knows which Column to reference when it calls the API.

You can find some more info on how to use the Send to API step here.

Thanks,
Ayana

@Ayana_Usui Thanks for that. I have tried adjusting the body but still order not going through. let me show you what I have. I even tried adding header value: application/json but still nothing

Screenshot 2023-07-25 083236


Screenshot 2023-07-25 082703