gocryptotrader
gocryptotrader copied to clipboard
exchanges: Add Deribit exchange support
PR Description
This pull request Included a code implementation for the Deribit exchange version 2; with REST and web-socket support. All the Websocket and Wrapper functions are tested. My code follows the style guidelines of other exchanges of GCT. Fixed some errors with the help of golangci-lint. Endpoint methods that have no support from the GCT wrapper are also implemented for future use.
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)
- [x] 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
For testing the exchange with your own API Credentials you can use your own API key { } and passphrase fields in the unit test deribit_test.go file, or directly add credential information to the config file you will be using for running.
- [ ] go test ./... -race
- [x] golangci-lint run
- [x] Test X
Checklist
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] 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
- [x] My changes generate no new warnings
- [x] 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
DM'd issues.
Codecov Report
Attention: Patch coverage is 43.07410%
with 2174 lines
in your changes are missing coverage. Please review.
Project coverage is 37.99%. Comparing base (
c37a115
) to head (33c5a99
).
:exclamation: Current head 33c5a99 differs from pull request most recent head e1497ba
Please upload reports for the commit e1497ba to get more accurate results.
Additional details and impacted files
@@ Coverage Diff @@
## master #1082 +/- ##
==========================================
+ Coverage 37.78% 37.99% +0.20%
==========================================
Files 409 415 +6
Lines 147697 153263 +5566
==========================================
+ Hits 55807 58228 +2421
- Misses 84031 86946 +2915
- Partials 7859 8089 +230
Files | Coverage Δ | |
---|---|---|
cmd/gctcli/commands.go | 0.00% <ø> (ø) |
|
currency/code.go | 89.17% <ø> (ø) |
|
currency/code_types.go | 0.00% <ø> (ø) |
|
currency/currencies.go | 87.50% <ø> (ø) |
|
currency/pairs.go | 98.46% <ø> (ø) |
|
engine/helpers.go | 82.23% <100.00%> (+0.05%) |
:arrow_up: |
exchanges/asset/asset.go | 96.69% <100.00%> (+2.09%) |
:arrow_up: |
exchanges/deribit/deribit.go | 45.76% <ø> (ø) |
|
exchanges/kline/kline.go | 91.76% <100.00%> (+0.04%) |
:arrow_up: |
exchanges/support.go | 100.00% <ø> (ø) |
|
... and 8 more |
Thanks for making the contract changes! I've had a look at the candle issue. I've somewhat fixed it with this linked diff. Some issues were about the test design, the other is about how the candle alignment works/can't comprehend time offsets. The diff will work, but will generate log warnings, but much better than errors.
The time offset rarely comes up. So I'd say that is a seperate issue which can be worked on in its own pr
Thank you diff file and your review of the change requests. I have applied the change and am pushing the update.
Hello! I've made a diff here to allow you to use the testnet endpoints https://gist.github.com/gloriousCode/283ecc528898779b73b5701c880e31ec Also adds an extra field to prevent API key deletion on test runs... Can understand if it doesn't get added, but I want it 😆
You can easily access the testnet to place orders by registering here: https://test.deribit.com and then signing in and creating an API key. The testnet gives you fake funds
Also unmarshal error in build logs: here
also can you add these lines to fix codespell reference here. Your PR will be merged first.