Skip to content

Commit

Permalink
Support other index markets
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin-Molinero committed Jan 16, 2025
1 parent ab8d15c commit c1e06cb
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2918,7 +2918,14 @@ private Contract CreateContract(Symbol symbol, bool includeExpired, List<Order>
// Indexes requires that the exchange be specified exactly
else if (symbol.ID.SecurityType == SecurityType.Index)
{
contract.Exchange = IndexSymbol.GetIndexExchange(symbol);
if (string.Equals(symbol.ID.Market, Market.OSE, StringComparison.InvariantCultureIgnoreCase))
{
contract.Exchange = "OSE.JPN";
}
else
{
contract.Exchange = IndexSymbol.GetIndexExchange(symbol);
}
}
else if (symbol.ID.SecurityType.IsOption())
{
Expand Down Expand Up @@ -3787,7 +3794,7 @@ private static bool CanSubscribe(Symbol symbol)
(securityType == SecurityType.Forex && market == Market.Oanda) ||
(securityType == SecurityType.Option && market == Market.USA) ||
(securityType == SecurityType.IndexOption && market == Market.USA) ||
(securityType == SecurityType.Index && (market == Market.USA || market == Market.EUREX)) ||
(securityType == SecurityType.Index && (market == Market.USA || market == Market.EUREX || market == Market.OSE || market == Market.HKFE)) ||
(securityType == SecurityType.FutureOption) ||
(securityType == SecurityType.Future) ||
(securityType == SecurityType.Cfd && market == Market.InteractiveBrokers);
Expand Down

0 comments on commit c1e06cb

Please sign in to comment.