Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal key objects should be linked to Strategy Code #1

Closed
guanidene opened this issue Jul 30, 2020 · 3 comments
Closed

Internal key objects should be linked to Strategy Code #1

guanidene opened this issue Jul 30, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@guanidene
Copy link
Contributor

guanidene commented Jul 30, 2020

Currently, the following objects of the AlgoBullsAPI class are not linked to the Strategy Code:

  1. _key__backtesting
  2. _key__papertrading
  3. _key__realtrading

The first time any method of AlgoBulls API is called, these keys are fetched and cached for the corresponding strategy code. However, if the methods are called again for a different strategy code, instead of using a key corresponding to them, the cached keys are used which results in incorrect execution.

The solution to this problem is simple: Link the cached keys to Strategy Code. Fetch cached keys only if the strategy code matches, else, fetch the key from the server.

@guanidene guanidene added the bug Something isn't working label Jul 30, 2020
@guanidene guanidene self-assigned this Jul 30, 2020
@pushpakdagade
Copy link
Contributor

@shubham-das-algobulls check if this is valid else close the issue.

@prithviraj-gotepatil-algobulls
Copy link
Contributor

image

image

This code and function verifies that the strategy codes are mapped with their respective keys using a dictionary.

@prithviraj-gotepatil-algobulls
Copy link
Contributor

All of these were completed in this commit:
8621da5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants