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

Replace C2 symbol for C2 Exchange symbol #8604

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

Conversation

Marinovsky
Copy link
Collaborator

@Marinovsky Marinovsky commented Feb 21, 2025

Description

C2 recommends using ExchangeSymbol instead of C2Symbol, thus this PR aims to replace LEAN C2Symbol to C2ExchangeSymbol. The payload implemented is the one described in their API docs: https://api-docs.collective2.com/apis/general/swagger/strategies/c2_api_strategies/setdesiredpositions_post . It's worth saying, not all markets present in LEAN had a MIC exchange code, according to the following list: https://www.iso20022.org/sites/default/files/ISO10383_MIC/ISO10383_MIC.pdf . Below, is the list of LEAN markets for which no MIC code was found:

XLIF - EURONEXT LIFFE - Not present in LEAN
OSE - LEAN only supports index, no future
FTX - LEAN only supports crypto, no future
InteractiveBrokers - LEAN only supports CFD, no future
XNYB - Not even present in ISO webpage
XASX - ASX- All markets - Not presetn in LEAN
XKBT - KANSAS CITY BOARD OF TRADE - Not present in LEAN
OANDA - Not even present in the ISO webpage
dukascopy - Not even present in the ISO webpage
ice - used the MIC code for Intercontinental Exchange
CBOE- used the MIC code for CBOE GLOBAL MARKETS INC.
bitfinex - Not even presetn in the ISO webpage
BITHUMB - Not even present in the ISO webpage
Binance- Not even presetn in the ISO webpage
poloniex - Not even present in the ISO webpage
coinone - Not even present in the ISO webpage
hitbtc - Not even present in the ISO webpage
bittrex - Not even present in the ISO webpage
binanceus - Not even present in the ISO webpage
bybit - Not even present in the ISO webpage
Coinbase - LEAN only supports crypto, no derivatives
Kraken - LEAN only supports crypto, no derivatives
Bitstamp - LEAN only supports crypto, no derivatives
okcoin - Not even present in the ISO webpage

Besides that, since the GH issue #8577 was related to this one, I addressed it on this same PR.

Related Issue

Closes #8554, #8577

Motivation and Context

With this change, the signals sent to Collective2 will follow their suggested guidelines

Requires Documentation Change

N/A

How Has This Been Tested?

I updated the unit tests SignalExportTargetTests.SendsTargetsToCollective2Appropiately to assert the message sent, in each of them, is the expected one across different scenarios. I also used to regression test Collective2SignalExportDemonstrationAlgorithm to assert the message sent was accepted by Collective2 API.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (non-breaking change which improves implementation)
  • Performance (non-breaking change which improves performance. Please add associated performance test and results)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Non-functional change (xml comments/documentation/etc)

Checklist:

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

Copy link
Member

@Martin-Molinero Martin-Molinero left a comment

Choose a reason for hiding this comment

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

Thank you, looks good, minor comments shared 👍

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.

Collective2: Replace C2Symbol for ExchangeSymbol
2 participants