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

Refactor API code #2613

Merged
merged 16 commits into from
Jul 25, 2022
Merged

Refactor API code #2613

merged 16 commits into from
Jul 25, 2022

Conversation

abitmore
Copy link
Member

@abitmore abitmore commented Jul 21, 2022

  • Avoid wrapping heavy database_api objects in other API classes
    • Move some code from database_api_impl to a new class database_api_helper, and let database_api_impl inherit from database_api_helper
  • Avoid magic numbers in code / doc about API limits
    • Add api_limit_get_market_history to app_options
    • Add api_limit_get_full_accounts_subscribe to app_options
  • get_margin_positions API now is implemented with get_call_orders_by_account, and only returns the first page
  • Simplify implementation of some APIs by using template functions
  • Fix code smells

Avoid wrapping heavy database_api objects in other API classes,
and fix some code smells by the way.
Add api_limit_get_market_history to app_options
Add api_limit_get_full_accounts_subscribe to app_options
@abitmore abitmore added this to the 6.1.0 - Feature Release milestone Jul 21, 2022
@abitmore abitmore added this to In progress in Feature Release (6.1.0) via automation Jul 21, 2022
@abitmore abitmore marked this pull request as ready for review July 21, 2022 16:01
@sonarcloud
Copy link

sonarcloud bot commented Jul 24, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 13 Code Smells

71.2% 71.2% Coverage
0.3% 0.3% Duplication

@abitmore abitmore merged commit 296808a into develop Jul 25, 2022
Feature Release (6.1.0) automation moved this from In progress to Done Jul 25, 2022
@abitmore abitmore deleted the refactor-api-limits branch July 25, 2022 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant