/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System.Runtime.CompilerServices;
using QuantConnect.Securities;
using static QuantConnect.StringExtensions;
namespace QuantConnect
{
///
/// Provides user-facing message construction methods and static messages for the namespace
///
public static partial class Messages
{
///
/// Provides user-facing messages for the class and its consumers or related classes
///
public static class FeeModel
{
///
/// Returns a string message saying the type of the given security is unsupported
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static string UnsupportedSecurityType(Securities.Security security)
{
return Invariant($"Unsupported security type: {security.Type}");
}
}
///
/// Provides user-facing messages for the class and its consumers or related classes
///
public static class AlphaStreamsFeeModel
{
///
/// Returns a string message saying the given market is unexpected
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static string UnexpectedEquityMarket(string market)
{
return Invariant($"AlphaStreamsFeeModel(): unexpected equity Market {market}");
}
}
///
/// Provides user-facing messages for the class and its consumers or related classes
///
public static class ExanteFeeModel
{
///
/// Returns a string message saying the market associated with the given order symbol is unsupported
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static string UnsupportedExchange(Orders.Order order)
{
return Invariant($"Unsupported exchange: ${order.Symbol.ID.Market}");
}
}
///
/// Provides user-facing messages for the class and its consumers or related classes
///
public static class InteractiveBrokersFeeModel
{
///
/// Returns a string message saying the given option market was unexpected
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static string UnexpectedOptionMarket(string market)
{
return Invariant($"InteractiveBrokersFeeModel(): unexpected option Market {market}");
}
///
/// Returns a string message saying the given future market was unexpected
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static string UnexpectedFutureMarket(string market)
{
return Invariant($"InteractiveBrokersFeeModel(): unexpected future Market {market}");
}
///
/// Returns a string message saying the given equity market was unexpected
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static string UnexpectedEquityMarket(string market)
{
return Invariant($"InteractiveBrokersFeeModel(): unexpected equity Market {market}");
}
///
/// Returns a string message saying the type of the given security was unsupported
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static string UnitedStatesFutureFeesUnsupportedSecurityType(Securities.Security security)
{
return Invariant($"InteractiveBrokersFeeModel.UnitedStatesFutureFees(): Unsupported security type: {security.Type}");
}
///
/// Returns a string message saying the type of the given security was unsupported
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static string EUREXFutureFeesUnsupportedSecurityType(Securities.Security security)
{
return Invariant($"InteractiveBrokersFeeModel.EUREXFutureFees(): Unsupported security type: {security.Type}");
}
///
/// Returns a string message saying the quote currency of the given security was
/// unexpected for Hong Kong futures exchange
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static string HongKongFutureFeesUnexpectedQuoteCurrency(Securities.Security security)
{
return Invariant($"Unexpected quote currency {security.QuoteCurrency.Symbol} for Hong Kong futures exchange");
}
}
///
/// Provides user-facing messages for the class and its consumers or related classes
///
public static class TDAmeritradeFeeModel
{
///
/// Returns a string message for unsupported security types in TDAmeritradeFeeModel
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static string UnsupportedSecurityType(SecurityType securityType)
{
return $"TDAmeritradeFeeModel doesn't return correct fee model for SecurityType = {nameof(securityType)}";
}
}
}
}