Review Collective2 Implemention#8773
Merged
Martin-Molinero merged 2 commits intoJun 5, 2025
Merged
Conversation
Martin-Molinero
approved these changes
Jun 4, 2025
Martin-Molinero
left a comment
Member
There was a problem hiding this comment.
Thank you! Minor requests shared
According to `SetDesiredPositions` [API](https://api-docs.collective2.com/apis/general/swagger/strategies/c2_api_strategies/setdesiredpositions_post#strategies/c2_api_strategies/setdesiredpositions_post/t=request&path=positions), the quantity must be non-zero. To close a position, send stop sending a position. The current for all assets, except FOREX, is the quote currency. FOREX: - Observe the [C2 minilot](https://support.collective2.com/hc/en-us/articles/360038042774-Forex-minilots) - Currency is always USD Unit tests: - Increase the initial cash to accomodate FOREX minilot - Additional message for minilot warning - Fix currencies
7c3ff0b to
b032602
Compare
Martin-Molinero
approved these changes
Jun 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
According to
SetDesiredPositionsAPI, the quantity must be non-zero. To close a position, send a stop order to close the position.The current for all assets, except FOREX, is the quote currency.
Stop sending null (e.g.: maturity for Equity) and remove
priceMultiplier.FOREX:
Unit tests:
Motivation and Context
Fixes C2 implementation
Requires Documentation Change
Yes. We should mention the minilot for FOREX because it will surprise users.
How Has This Been Tested?
Unit tests.
Types of changes
Checklist:
bug-<issue#>-<description>orfeature-<issue#>-<description>