thrasher-corp / gocryptotrader

A cryptocurrency trading bot and framework supporting multiple exchanges written in Golang.
MIT License
2.96k stars 792 forks source link

Coinbase: Update exchange implementation #1480

Open cranktakular opened 5 months ago

cranktakular commented 5 months ago

PR Description

Updating Coinbase to the Advanced Trade and Sign In With Coinbase APIs, as well as a few tiny fixes of other parts of the codebase found along the way.

Type of change

Please delete options that are not relevant and add an x in [] as 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

The only tests which seem to be failing (exchanges/kucoin, database/models/postgres, config, and common/file) are parts that I haven't substantively changed, and which seem to be failing on master too.

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 43.36283% with 1344 lines in your changes missing coverage. Please review.

Project coverage is 36.36%. Comparing base (98f025e) to head (eec8a5d). Report is 2 commits behind head on master.

:exclamation: Current head eec8a5d differs from pull request most recent head d70d599

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

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1480/graphs/tree.svg?width=650&height=150&src=pr&token=41784B23TS&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp)](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1480?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp) ```diff @@ Coverage Diff @@ ## master #1480 +/- ## ========================================== + Coverage 36.26% 36.36% +0.09% ========================================== Files 419 419 Lines 183133 184303 +1170 ========================================== + Hits 66421 67017 +596 - Misses 108605 109202 +597 + Partials 8107 8084 -23 ``` | [Files](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1480?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp) | Coverage Δ | | |---|---|---| | [common/common.go](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1480?src=pr&el=tree&filepath=common%2Fcommon.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp#diff-Y29tbW9uL2NvbW1vbi5nbw==) | `94.01% <ø> (ø)` | | | [config/config.go](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1480?src=pr&el=tree&filepath=config%2Fconfig.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp#diff-Y29uZmlnL2NvbmZpZy5nbw==) | `87.06% <100.00%> (ø)` | | | [currency/code\_types.go](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1480?src=pr&el=tree&filepath=currency%2Fcode_types.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp#diff-Y3VycmVuY3kvY29kZV90eXBlcy5nbw==) | `0.00% <ø> (ø)` | | | [currency/pair.go](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1480?src=pr&el=tree&filepath=currency%2Fpair.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp#diff-Y3VycmVuY3kvcGFpci5nbw==) | `85.71% <ø> (ø)` | | | [currency/pairs.go](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1480?src=pr&el=tree&filepath=currency%2Fpairs.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp#diff-Y3VycmVuY3kvcGFpcnMuZ28=) | `96.27% <100.00%> (ø)` | | | [engine/datahistory\_manager.go](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1480?src=pr&el=tree&filepath=engine%2Fdatahistory_manager.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp#diff-ZW5naW5lL2RhdGFoaXN0b3J5X21hbmFnZXIuZ28=) | `64.44% <100.00%> (ø)` | | | [exchanges/account/account.go](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1480?src=pr&el=tree&filepath=exchanges%2Faccount%2Faccount.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp#diff-ZXhjaGFuZ2VzL2FjY291bnQvYWNjb3VudC5nbw==) | `97.36% <100.00%> (ø)` | | | [exchanges/asset/asset.go](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1480?src=pr&el=tree&filepath=exchanges%2Fasset%2Fasset.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp#diff-ZXhjaGFuZ2VzL2Fzc2V0L2Fzc2V0Lmdv) | `93.79% <100.00%> (+0.09%)` | :arrow_up: | | [exchanges/coinbasepro/ratelimit.go](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1480?src=pr&el=tree&filepath=exchanges%2Fcoinbasepro%2Fratelimit.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp#diff-ZXhjaGFuZ2VzL2NvaW5iYXNlcHJvL3JhdGVsaW1pdC5nbw==) | `100.00% <100.00%> (ø)` | | | [exchanges/exchange.go](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1480?src=pr&el=tree&filepath=exchanges%2Fexchange.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp#diff-ZXhjaGFuZ2VzL2V4Y2hhbmdlLmdv) | `76.54% <100.00%> (ø)` | | | ... and [11 more](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1480?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp) | | ... and [24 files with indirect coverage changes](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1480/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp)