kohjb / AmeritradeAPIwGoogleScripts

Ameritrade API with Google Scripts tutorial repository of code
18 stars 4 forks source link

Issue getting these scripts to work #1

Closed bdf0506 closed 3 years ago

bdf0506 commented 3 years ago

Hi, I really like what you've done here, and am trying to replicate. I'm unable to get this to fully work, so would like to know if this is still working in present day.

I created a blank sheet, went into script editor, recreated the three files here, went into Code.gs and clicked run to allow the permissions on my google account for it to run. Then I went into Ameritrade.gs and entered my api key in line 2. I noticed that on line 8, it is looking for amtd.apikey which doesn't seem to be valid, so I changed that to be apikey.

Back on the main sheet, I went through the auth process, seems to complete, but it doesn't give me any feedback. After that I try to do a function of =amtd and nothing appears in the google sheet as a function. So then I went into the script, and manually attempted to run each of the amtd* functions manually, and each fails with a certain type of error.

Are you able to confirm if this still works in your setup?

Looks like there may be other people with issues when looking at the YouTube comments: https://www.youtube.com/watch?v=_KJsx7QD6dM

bdf0506 commented 3 years ago

They won't appear as functions due to the fact there are syntax errors in the comments. In the function comments in the source code, you need a line like the following and then they will appear in the Google Sheets list of functions. * @customfunction

Overall this does actually work as planned, so I thank you for your work on this!

kohjb commented 3 years ago

Glad you got the problem figured out and thanks for the feedback! Was scratching my head on getting the functions to appear in the list!