namespace CryptoExchange.Net.SharedApis
{
///
/// Request to change the current position mode
///
public record SetPositionModeRequest : SharedRequest
{
///
/// Symbol to change the mode for. Depending on the exchange position mode is set for the whole account or per symbol
///
public SharedSymbol? Symbol { get; set; }
///
/// Trading mode
///
public TradingMode? TradingMode { get; set; }
///
/// Position mode to change to
///
public SharedPositionMode PositionMode { get; set; }
///
/// ctor
///
/// Position mode to change to
/// Trading mode
/// Exchange specific parameters
public SetPositionModeRequest(SharedPositionMode positionMode, TradingMode? tradingMode = null, ExchangeParameters? exchangeParameters = null) : base(exchangeParameters)
{
TradingMode = tradingMode;
PositionMode = positionMode;
}
///
/// ctor
///
/// Symbol to change to position mode for
/// Position mode to change to
/// Exchange specific parameters
public SetPositionModeRequest(SharedSymbol symbol, SharedPositionMode positionMode, ExchangeParameters? exchangeParameters = null) : base(exchangeParameters)
{
PositionMode = positionMode;
Symbol = symbol;
}
}
}