Skip to content
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

[BinanceUsdM] add binance usd futures support #794

Open
wants to merge 13 commits into
base: dev
Choose a base branch
from

Conversation

techfreaque
Copy link
Contributor

@techfreaque techfreaque commented Jan 17, 2023

so far it seems to work very well

requires: Drakkar-Software/OctoBot-Trading#820

edit:
One thing to note is the get_price_ticker, its fetching funding rate as well, to get funding rate and mark_price.
Once there is way to set MARK_PRICE_IN_FUNDING_RATE and FUNDING_RATE_IN_FUNDING_RATE, the get_price_ticker method can be removed

Im not using the mark price in the position, as the mark price is only available once you have placed at least one (unfilled limit) order

@techfreaque techfreaque force-pushed the add_binance_usd_m_support branch 4 times, most recently from fd50461 to 993ea57 Compare January 24, 2023 10:38
@techfreaque techfreaque force-pushed the add_binance_usd_m_support branch 3 times, most recently from ae89bd4 to b14ed0b Compare February 16, 2023 16:05
@techfreaque techfreaque force-pushed the add_binance_usd_m_support branch 3 times, most recently from cd808de to e02d48a Compare March 18, 2023 15:01
Copy link
Member

@Herklos Herklos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @techfreaque! Thanks

inverse: bool,
tp_sl_mode: trading_enums.TakeProfitStopLossMode,
):
# no partial tp / sl - use limit and stop market instead
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we raise here to avoid giving the impression that it worked?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah now we raise NotImplementedError

Comment on lines 228 to 229
# if size == constants.ZERO:
# return {} # Don't parse empty position
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be uncommented or removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed it

@GuillaumeDSM
Copy link
Member

GuillaumeDSM commented Mar 23, 2023

when we add suppor for exchanes, we are automating 2 test bundles:

  1. octobot_trading/additional_test: for everything unauthenticated (those tests are not using tentacles code)
  2. octobot/exchanges_tests: for order, position creation etc (creds should be in .env following this format (with encryped buys like on /user/config) (those tests are using tentacles code)
    image

Both have a future and spot trading version. If we want to officially support binanceusdm, we will need to have all those tests passing in their futures version. They are designed to make sure that everything octobot needs is working as expected in a particular exchange. It's also helping a lot when developing exchange connectors.
Do you think you could add and make such tests pass for binanceusdm ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants