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

Major changes for adding Exchanges #65

Merged
merged 13 commits into from
Feb 25, 2018
Merged

Major changes for adding Exchanges #65

merged 13 commits into from
Feb 25, 2018

Conversation

theimo1221
Copy link
Contributor

Couldn´t sleep so it was time to create a new Class!

New features:
-If execution is fast enough we pull exactly every 500 ms from GDAX by taking timestamp of last pull and comparing it with current stamp, and if dif < 500 ms sleep the needed time.
-ticker in Class to open space for more exchanges
-refresh worker and prepare separated to enable constant prepare regardless of refresh worker.
-refresh worker split into refreshworkerGDAX to open space for future Exchanges

Additionally I deleted 2nd GDAX API pull, because initial idea to have the price after time consumption by code execution is not aplicable due to est. 8s until next refresh.
So saving 80ms but delaying overall refresh by 5s is bad.

Needed for #29

@pmaji
Copy link
Owner

pmaji commented Feb 23, 2018

I'll look this over in the near future. It's a larger change than most so will accept it after giving it a read.

@theimo1221
Copy link
Contributor Author

Finally it´s done and tested 😃

Pair reload time:
Current version ~25s
First update version ~18s (using timestamp and calculated sleep)
New version ~7s (using multiple threads and Websocket for Api Call)

I needed to rewrite a file from gdax python and many more threads but watchdog is handling all of them and it´s working good for me with a total of 14% CPU Load

@pmaji pmaji merged commit afcc2f5 into pmaji:master Feb 25, 2018
@theimo1221 theimo1221 deleted the patch-7 branch February 25, 2018 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants