Google Sheets 404 after changing from paper to live

Hey all, I am running into an issue with google sheets giving me a 404. I am not sure why this is happening but it’s simple to recreate.

  1. Go to Alpaca w/ Google Sheets - Public Example - Google Sheets The link is from Manage Your Stocks from Google Spreadsheet Using API | by Hitoshi Harada | Automation Generation | Medium
  2. Copy the sheet to your drive.
  3. Enter in your API Key ID and Secret Key I used my paper account first.
  4. This will work 100% without issues.
  5. Next enter in your live trading api information and change the endpoint information to https://api.alpaca.markets and update your API Key ID and Secret Key
  6. Click Update on sheet1 the 404 error will then show up.

The error says: Request failed for https://api.alpaca.markets returned code 404. Truncated server response: Not Found (use muteHttpExceptions option to examine full response)

Here is a video of the error in action. https://youtu.be/128MHVmeuEY just an FYI I cleared out my API keys. Does anyone have any clues of what might be happening so I can look into this more? I am just stuck at what to try next. Thanks!

1 Like

Hey, I am also a very new user, and had the same issue.
But I noticed that in the Postman request that still works for me in both environments, it’s https://api.alpaca.markets/v2/account, and in the script it’s all v1’s. So I tried to replace all v1’s with v2’s in the script. Not sure if that’s the right thing to do (could be that one or more URLs should still have v1), but it worked for me for now.
My guess is that Paper supports both (I tried, it works), whereas Live − only v2.