thrasher-corp / gocryptotrader

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

orders/gateio: Add `GetTradeAmount` method to order.Submit type #1584

Closed shazbert closed 1 month ago

shazbert commented 1 month ago

PR Description

I had both values populated for Amount and QuoteAmount and when it detected base amount it kept base amount. So this reduces a fat finger chance. 😆

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

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 58.82353% with 7 lines in your changes missing coverage. Please review.

Project coverage is 36.29%. Comparing base (34d9920) to head (ee44d7e).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1584/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/1584?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 #1584 +/- ## ========================================== - Coverage 36.31% 36.29% -0.02% ========================================== Files 421 421 Lines 183158 183167 +9 ========================================== - Hits 66509 66489 -20 - Misses 108583 108609 +26 - Partials 8066 8069 +3 ``` | [Files](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1584?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp) | Coverage Δ | | |---|---|---| | [exchanges/order/orders.go](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1584?src=pr&el=tree&filepath=exchanges%2Forder%2Forders.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp#diff-ZXhjaGFuZ2VzL29yZGVyL29yZGVycy5nbw==) | `91.00% <100.00%> (+0.09%)` | :arrow_up: | | [exchanges/gateio/gateio\_wrapper.go](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1584?src=pr&el=tree&filepath=exchanges%2Fgateio%2Fgateio_wrapper.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp#diff-ZXhjaGFuZ2VzL2dhdGVpby9nYXRlaW9fd3JhcHBlci5nbw==) | `40.00% <0.00%> (+0.42%)` | :arrow_up: | ... and [15 files with indirect coverage changes](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1584/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp)