public async Task <HaasonlineClientResponse <MadHatterBot> > SetupMadHatterBot(string botGuid, string botName, string accountGuid, string primaryCoin, string secondaryCoin, string contractName, decimal leverage, EnumBotTradeAmount amountType,
                                                                                       decimal tradeAmount, decimal fee, string templateGuid, string position, int interval, bool consensusmode, bool disableAfterStopLoss, bool includeIncompleteInterval, EnumFundsPosition mappedBuySignal, EnumFundsPosition mappedSellSignal)
        {
            return(await ExecuteAsync <MadHatterBot>("/SetupMadHatterBot", new Dictionary <string, string>()
            {
                { "botName", botName },
                { "botGuid", botGuid },
                { "accountGuid", accountGuid },
                { "primaryCoin", primaryCoin },
                { "secondaryCoin", secondaryCoin },
                { "contractName", contractName },
                { "leverage", leverage.ToString(CultureInfo.InvariantCulture) },
                { "templateGuid", templateGuid },
                { "position", position },
                { "fee", fee.ToString(CultureInfo.InvariantCulture) },

                { "tradeAmountType", amountType.ToString() },
                { "tradeAmount", tradeAmount.ToString(CultureInfo.InvariantCulture) },
                { "useTwoSignals", consensusmode.ToString() },
                { "disableAfterStopLoss", disableAfterStopLoss.ToString(CultureInfo.InvariantCulture) },
                { "interval", interval.ToString(CultureInfo.InvariantCulture) },
                { "includeIncompleteInterval", includeIncompleteInterval.ToString() },
                { "mappedBuySignal", mappedBuySignal.ToString() },
                { "mappedSellSignal", mappedSellSignal.ToString() },
            }));
        }
 public async Task <HaasonlineClientResponse <TradeBot> > SwitchBotFundsPositions(string botGuid, EnumFundsPosition position)
 {
     return(await ExecuteAsync <TradeBot>("/SwitchTradeBotFundsPositions", new Dictionary <string, string>
     {
         { "botGuid", botGuid },
         { "fundsPosition", position.ToString() },
     }));
 }
 public async Task <HaasonlineClientResponse <TradeBot> > SwitchBotFundsPositionsWithOrder(string botGuid, EnumFundsPosition targetPosition, string templateGuid)
 {
     return(await ExecuteAsync <TradeBot>("/SwitchTradeBotFundsPositionsWithOrder", new Dictionary <string, string>
     {
         { "botGuid", botGuid },
         { "templateGuid", templateGuid },
         { "fundsPosition", targetPosition.ToString() },
     }));
 }
 public async Task <HaasonlineClientResponse <TradeBot> > SetupSafety(string botGuid, string elementGuid, EnumPriceSource priceSource, string primairyCoin, string secondairyCoin, string contractName, EnumFundsPosition buySignal, EnumFundsPosition sellSignal)
 {
     return(await ExecuteAsync <TradeBot>("/SetupTradeBotSafety", new Dictionary <string, string>
     {
         { "botGuid", botGuid },
         { "elementGuid", elementGuid },
         { "priceSourceName", priceSource.ToString() },
         { "primaryCoin", primairyCoin },
         { "secondaryCoin", secondairyCoin },
         { "contractName", contractName },
         { "mappedBuySignal", buySignal.ToString() },
         { "mappedSellSignal", sellSignal.ToString() },
     }));
 }
 public async Task <HaasonlineClientResponse <TradeBot> > SetupIndicatorLeverageSignals(string botGuid, string elementGuid, bool useLongSignals, bool useNoPositionSignals, bool useShortSignals, bool reverseSignals, EnumFundsPosition mappedLong, EnumFundsPosition mappedShort)
 {
     return(await ExecuteAsync <TradeBot>("/SetupTradeBotIndicatorLeverageSignals", new Dictionary <string, string>
     {
         { "botGuid", botGuid },
         { "elementGuid", elementGuid },
         { "useLongSignals", useLongSignals.ToString() },
         { "useNoPositionSignals", useNoPositionSignals.ToString() },
         { "useShortSignals", useShortSignals.ToString() },
         { "reverseSignals", reverseSignals.ToString() },
         { "mappedLongSignal", mappedLong.ToString() },
         { "mappedShortSignal", mappedShort.ToString() },
     }));
 }
 public async Task <HaasonlineClientResponse <MarketMarkingBot> > SetupMarketMakingBot(string botGuid, string botName, string accountGuid, string primaryCoin, string secondaryCoin, string contractName,
                                                                                       decimal leverage, EnumFundsPosition leverageStartSide, decimal fee, string templateGuid, string stopLossGuid, List <MarketMakingBotSlot> slots)
 {
     return(await ExecuteAsync <MarketMarkingBot>("/SetupMarketMakingBot", new Dictionary <string, string>()
     {
         { "botGuid", botGuid },
         { "botName", botName },
         { "accountGuid", accountGuid },
         { "primaryCoin", primaryCoin },
         { "secondaryCoin", secondaryCoin },
         { "contractName", contractName },
         { "leverage", leverage.ToString(CultureInfo.InvariantCulture) },
         { "leverageStartSide", leverageStartSide.ToString() },
         { "fee", fee.ToString(CultureInfo.InvariantCulture) },
         { "templateGuid", templateGuid },
         { "stopLossGuid", stopLossGuid },
         { "slots", JsonConvert.SerializeObject(slots) }
     }));
 }
 public async Task <HaasonlineClientResponse <TradeBot> > SetupLeverageBotTradeAmount(string botGuid, EnumFundsPosition fundsPosition, decimal tradeAmount, decimal lastLongPrice, decimal lastShortPrice, string enterTemplateId, string exitTemplateId, bool highSpeedEnabled, bool allIn, int orderTimeout, int templateTimeout, bool maxTradeAmount, EnumLimitOrderPriceType limitOrderType, bool useHiddenOrders, decimal fee)
 {
     return(await ExecuteAsync <TradeBot>("/SetupLeverageBotTradeAmount", new Dictionary <string, string>
     {
         { "botGuid", botGuid },
         { "fundsPosition", fundsPosition.ToString() },
         { "tradeAmount", tradeAmount.ToString(CultureInfo.InvariantCulture) },
         { "lastLongPrice", lastLongPrice.ToString(CultureInfo.InvariantCulture) },
         { "lastShortPrice", lastShortPrice.ToString(CultureInfo.InvariantCulture) },
         { "enterTemplateId", enterTemplateId },
         { "exitTemplateId", exitTemplateId },
         { "highSpeedEnabled", highSpeedEnabled.ToString() },
         { "allIn", allIn.ToString() },
         { "orderTimeout", orderTimeout.ToString() },
         { "templateTimeout", templateTimeout.ToString() },
         { "maxTradeAmount", maxTradeAmount.ToString() },
         { "limitOrderType", limitOrderType.ToString() },
         { "useHiddenOrders", useHiddenOrders.ToString() },
         { "fee", fee.ToString(CultureInfo.InvariantCulture) },
     }));
 }