-
Notifications
You must be signed in to change notification settings - Fork 820
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
exchanges: Add V2 Crypto.com exchange support #1122
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just a basic look over. Well done.
publicGetValuations = "public/get-valuations" // skipped | ||
publicGetExpiredSettlementPrice = "public/get-expired-settlement-price" // skipped | ||
publicGetInsurance = "public/get-insurance" // skipped |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why skipped?
return nil, currency.ErrCurrencyPairEmpty | ||
} | ||
var notional float64 | ||
switch s.Type { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: Test for when both s.Amount and notional are sent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for that, just a quick review of last changes. Once completed I will start doing end point tests.
@@ -320,6 +300,85 @@ type CreateOrderParam struct { | |||
TriggerPrice float64 `json:"trigger_price"` | |||
} | |||
|
|||
func (arg *CreateOrderParam) getCreateParamMap() (map[string]interface{}, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs full test coverage and utilizing if !errors.Is(err, errGlobalError) { }
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.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.
Checklist