gocryptotrader
gocryptotrader copied to clipboard
exchange: upgrade UpdatePair method
PR Description
-
Force config currency pairs to have a delimiter so unmarshalling is more consistent
-
Format method to take in PairFormat struct
-
Update FindDifferences method to return a struct and error with formatting difference bool to force an upgrade if formatting differs.
-
Update UpdatePairs to force pair formatting, force burden of proof to the caller with regards to an empty currency pair, and error if duplication is found.
-
Now if setting enabled pair as string "linkusd" will now be automatically formatted to the match with available pair "link-usd" instead of being parsed as "lin-kusd" and removed.
-
MarginFunding assets are delimitered e.g. "NEO-,XTZ-,JPY-,SUSHI-,GBP-,DOT-,ADA-,LINK-" for consistency reasons instead of broken up as "lin-k".
-
Includes bugfix for BTSE orderbook handling, seems they are sending data correctly on some assets whilst others are not.
-
Includes websocket bugfix, orderbook bugfix, config bugfix and spot implementation for Bitmex.
Fixes # (issue)
Type of change
Please delete options that are not relevant and add an x
in []
as item is complete.
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] 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