Conversation
0bfd8f3 to
27b3f59
Compare
27b3f59 to
2c3e33c
Compare
jhonabreul
left a comment
There was a problem hiding this comment.
Nice! Thanks for the contribution 🚀 Leaving minor comments.
| /// <param name="category">The product category</param> | ||
| /// <param name="symbol">The symbol for which the mode should be changed</param> | ||
| /// <param name="mode">The mode which should be set</param> | ||
| public void SwitchPositionMode(BybitProductCategory category, Symbol symbol, PositionMode mode) |
There was a problem hiding this comment.
How/where is this going to be used?
There was a problem hiding this comment.
It's not used but the question is if it should. Hedge mode is currently not supported and for inverse the default mode is hege which can only be changed to normal mode by using the API.
So should this be done automatically or is the user responsible for that, if so is there a way to make this function available to the user in any way. It would definitely need to be documented.
QuantConnect.BybitBrokerage.Tests/BybitInverseFuturesBrokerageHistoryProviderTests.cs
Outdated
Show resolved
Hide resolved
|
Another comment, trading inverse contracts with the Unified Trading Account will use the Inverse Derivatives account, so balance and margin will be used from the Inverse Derivatives account.
|
|
@jhonabreul |
b54823a to
85cf70f
Compare
Yes it seems that's the case. Will add a new brokerage factory and adjust the Brokerage again so it can be inherited from. |
85cf70f to
e6bcfe7
Compare
e6bcfe7 to
65cd35f
Compare
jhonabreul
left a comment
There was a problem hiding this comment.
New changes look good, thank you!
Approved on my side. We can wait for @Martin-Molinero to give it a look too.
|
Man, I am sorry to see this one fell by the wayside. I would very much like the inverse perp support for Bybit! @jhonabreul @Martin-Molinero ... |
Description
Add missing support for inverse
I'm currently investigating if there are changes required in the brokerage model due to a slightly different order handling. But this should only affect backtests.
Related Issue
Part of QuantConnect/Lean#5898
Depends on #5
How Has This Been Tested?
Types of changes
Checklist:
bug-<issue#>-<description>orfeature-<issue#>-<description>