gocryptotrader icon indicating copy to clipboard operation
gocryptotrader copied to clipboard

exchanges: Add V2 Crypto.com exchange support

Open samuael opened this issue 2 years ago • 2 comments

PR Description

This pull request adds a code implementation for version 2 of the Crypto.com exchange. The implementation supports REST and web-socket functionalities. All the REST, WebSocket endpoints, and wrapper functions are tested. My code adheres to the GCT style standards used by other exchanges. Fixed some errors with the help of linter(golangci-lint), and unit tests. REST and WebSocket 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 the item is complete.

  • [ ] 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

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.

  • [x] 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 on my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation and regenerated documentation via the documentation tool
  • [ ] 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

samuael avatar Jan 29 '23 19:01 samuael

Codecov Report

Attention: Patch coverage is 28.32861% with 1771 lines in your changes missing coverage. Please review.

Project coverage is 42.11%. Comparing base (98f025e) to head (0ed85bd). Report is 3 commits behind head on master.

:exclamation: Current head 0ed85bd differs from pull request most recent head ed8dad5

Please upload reports for the commit ed8dad5 to get more accurate results.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1122      +/-   ##
==========================================
+ Coverage   36.26%   42.11%   +5.84%     
==========================================
  Files         419      359      -60     
  Lines      183133   140605   -42528     
==========================================
- Hits        66421    59219    -7202     
+ Misses     108605    74211   -34394     
+ Partials     8107     7175     -932     
Files Coverage Δ
engine/exchange_manager.go 96.21% <100.00%> (+1.68%) :arrow_up:
exchanges/support.go 100.00% <ø> (ø)
exchanges/order/orders.go 92.83% <50.00%> (+2.41%) :arrow_up:
exchanges/cryptodotcom/cryptodotcom_convert.go 76.31% <76.31%> (ø)
exchanges/cryptodotcom/cryptodotcom_types.go 50.00% <50.00%> (ø)
exchanges/cryptodotcom/cryptodotcom_ratelimiter.go 41.98% <41.98%> (ø)
...s/cryptodotcom/cryptodotcom_websocket_endpoints.go 0.00% <0.00%> (ø)
exchanges/cryptodotcom/cryptodotcom_websocket.go 45.99% <45.99%> (ø)
exchanges/cryptodotcom/cryptodotcom.go 12.81% <12.81%> (ø)
exchanges/cryptodotcom/cryptodotcom_wrapper.go 29.79% <29.79%> (ø)

... and 272 files with indirect coverage changes

codecov[bot] avatar Feb 07 '23 21:02 codecov[bot]

Thanks for your PR. And, I was also wondering whether to have such a variable to distinguish whether asset Items( instruments of asset items) have candlestick data necessarily. Since some instruments may not have candlestick data even with in an extended time range

samuael avatar Mar 28 '23 21:03 samuael