gocryptotrader
gocryptotrader copied to clipboard
engine: Add fee synchronisation management [POC]
Dear happy peoples,
PR Description
- Adds fee management routine [poc] that will synchronise fees every hour for authenticated enabled exchanges.
- This will also start to synchronise tradable pairs every hour.
NOTEs:
- So this reduces the need to send a HTTP request every time a fee is needed
- Also I have opted to store as rate to minimize the division operation, but it's not really a big improvement on speed. So if you don't like it 🤷
Requires #1370
Kind Regards,
Type of change
Please delete options that are not relevant and add an x
in []
as item is complete.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
How has this been tested
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration and also consider improving test coverage whilst working on a certain feature or package.
- [ ] go test ./... -race
- [ ] golangci-lint run
- [ ] Test X
Checklist
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation and regenerated documentation via the documentation tool
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally and on Github Actions/AppVeyor with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
Codecov Report
Attention: Patch coverage is 64.81481%
with 38 lines
in your changes are missing coverage. Please review.
Project coverage is 37.77%. Comparing base (
1e95ae9
) to head (a03d49f
). Report is 1 commits behind head on master.
:exclamation: Current head a03d49f differs from pull request most recent head b859808. Consider uploading reports for the commit b859808 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #1376 +/- ##
==========================================
- Coverage 37.91% 37.77% -0.15%
==========================================
Files 411 413 +2
Lines 147198 147904 +706
==========================================
+ Hits 55817 55869 +52
- Misses 83588 84254 +666
+ Partials 7793 7781 -12
Files | Coverage Δ | |
---|---|---|
config/config.go | 87.91% <100.00%> (+0.33%) |
:arrow_up: |
exchanges/exchange.go | 80.64% <100.00%> (+1.19%) |
:arrow_up: |
exchanges/fee/fee.go | 100.00% <100.00%> (ø) |
|
engine/engine.go | 41.82% <60.00%> (+0.15%) |
:arrow_up: |
engine/fee_management.go | 58.33% <58.33%> (ø) |
|
exchanges/kucoin/kucoin_wrapper.go | 37.19% <18.75%> (+0.10%) |
:arrow_up: |