I have been using my paper account for two or three weeks now and yesterday while resetting the equity I noticed a very weird error on my dashboard : I can still authentify to the website but the paper account is supposedly not found. I get the following error in the firefox console (same in Chromium) :
api#error GET /paper_accounts/9a1ac15d-0499-4f5f-a9be-69239c9deb42/trade_account/margin
Object { }
404
Object { code: 40410000, message: "paper account not found" }
instrument.ts:129:35
A few things. Resetting a paper account actually creates a new account. It doesn’t just set reset the balance but starts over drom a brand new account. The previous account is still there but marked ‘inactive’. So, after resetting a paper account you must regenerate the API keys and then use those new keys in one’s algo. Because the previous account is technically still there, it can be confusing because some of the API calls still return data when using the old keys. Ensure the current account keys are always being used.
The browser issue is probably related. Embedded in some of the URLs are the account number. If a browser has cached these URLs they will contain the previous account info. This is probably what’s causing the “paper account not found error”. Refresh the web pages or, better, empty any browser caches.
See if that works. Get back if you’re still having issues.
I doubt it’s a cache issue since I tried connecting with Chromium after the account reset and it still didn’t work. Nevertheless, I just tried connecting again with Firefox in incognito mode, and I got the same issue : the webapp displays the “Account number: null” error. Also, the console allowed me to see the getUserData REDUX action is throwing an error : ‘error feching user data from s3: No credentials’
export const getUserData = () => dispatch => {
return getUserDataFromS3()
.then(data => dispatch(_setUserData({ loaded: true, data })))
.catch(e => console.error('error feching user data from s3:', e))
That can’t be normal… Anyway, thanks a lot for having stepped in !
I’m not making any promises, but the issue should be resolved and shouldn’t happen again. I believe the reason it didn’t work immediately after the fix was the browser had cached some old data. Once that data was flushed it was able to find the correct paper account.