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
Feat/add trade fee in base and quote #6288
Feat/add trade fee in base and quote #6288
Conversation
2514b1f
to
9270c5b
Compare
@@ -260,11 +266,11 @@ def _did_fill_order(self, | |||
order_id=order_id, | |||
trade_type=evt.trade_type.name, | |||
order_type=evt.order_type.name, | |||
price=Decimal( |
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.
Is this change needed?
"position", ] | ||
|
||
self.assertEqual(expected_attributes, TradeFill.attribute_names_for_file_export()) | ||
|
||
def test_attribute_names_for_file_export_are_valid(self): |
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 remove this test instead of adding an mock entry for trade_fee_in_quote
?
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.
LGTM
Tested alongside hummingbot/dashboard#15
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.
Tests performed:
- Cloned and install feature branch and PR6288
- Manually Created docker image successfully
- conda env create -f environment_conda.yml
- conda activate streamlit-apps
- streamlit run main.py
- Copied URL to browser
- Created symlink with ln -s /path/to/hummingbot/data data
- Review Strategy Performance tab now shows fees in USDT for binance spot
- Confirmed fees amount is showing correct amount
Note: for binance perpetual
there's ongoing issue on dashboard's Strategy Performance tab
with AttributeError: module 'ccxt' has no attribute 'binance_perpetual'
Before submitting this PR, please make sure:
A description of the changes proposed in the pull request:
Add the value of the trade fee in quote asset. This is very useful for reporting purposes since if the fees are paid in another token, the rate oracle can be used to translate this difference.
Tests performed by the developer:
Run a bot and see that everything is working.
Test the new solution with the dashboard
Tips for QA testing: