コード例 #1
0
 public async Task <HaasonlineClientResponse <ScalperBot> > SetupScalpingBot(string botGuid, string botName, string accountGuid, string primaryCoin, string secondaryCoin, string contractName, decimal leverage, EnumBotTradeAmount amountType, decimal tradeAmount, decimal fee, string position, string templateGuid, decimal targetPercentage, decimal safetyValue)
 {
     return(await ExecuteAsync <ScalperBot>("/SetupScalpingBot", new Dictionary <string, string>()
     {
         { "botGuid", botGuid },
         { "botName", botName },
         { "accountGuid", accountGuid },
         { "primaryCoin", primaryCoin },
         { "secondaryCoin", secondaryCoin },
         { "contractName", contractName },
         { "leverage", leverage.ToString(CultureInfo.InvariantCulture) },
         { "tradeAmountType", amountType.ToString() },
         { "tradeAmount", tradeAmount.ToString(CultureInfo.InvariantCulture) },
         { "targetPercentage", targetPercentage.ToString(CultureInfo.InvariantCulture) },
         { "safetyThreshold", safetyValue.ToString(CultureInfo.InvariantCulture) },
         { "position", position },
         { "templateGuid", templateGuid },
         { "fee", fee.ToString(CultureInfo.InvariantCulture) },
     }));
 }
コード例 #2
0
 public async Task <HaasonlineClientResponse <BaseCustomBot> > SetupIntellibotAlice(string botGuid, string botName, string accountGuid, string primaryCoin, string secondaryCoin, string contractName, EnumBotTradeAmount amountType, decimal tradeAmount, string templateGuid, decimal fee, decimal leverage, string position)
 {
     return(await ExecuteAsync <BaseCustomBot>("/SetupIntellibotAlice", new Dictionary <string, string>()
     {
         { "botGuid", botGuid },
         { "botName", botName },
         { "accountGuid", accountGuid },
         { "primaryCoin", primaryCoin },
         { "secondaryCoin", secondaryCoin },
         { "contractName", contractName },
         { "leverage", leverage.ToString(CultureInfo.InvariantCulture) },
         { "tradeAmountType", amountType.ToString() },
         { "tradeAmount", tradeAmount.ToString(CultureInfo.InvariantCulture) },
         { "position", position },
         { "templateGuid", templateGuid },
         { "fee", fee.ToString(CultureInfo.InvariantCulture) },
     }));
 }
コード例 #3
0
        public async Task <HaasonlineClientResponse <MadHatterBot> > SetupMadHatterBot(string botGuid, string botName, string accountGuid, string primaryCoin, string secondaryCoin, 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 },
                { "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() },
            }));
        }
コード例 #4
0
 public async Task <HaasonlineClientResponse <EmailBot> > SetupEmailBot(string botGuid, string botName, string accountGuid, string primaryCoin, string secondaryCoin, string contractName, decimal leverage, EnumBotTradeAmount amountType, decimal tradeAmount, decimal fee, string templateGuid, string position, List <EmailBotAction> actions, decimal stopLoss, decimal minChangeToBuy, decimal minChangeToSell)
 {
     return(await ExecuteAsync <EmailBot>("/SetupEmailBot", new Dictionary <string, string>()
     {
         { "botGuid", botGuid },
         { "botName", botName },
         { "accountGuid", accountGuid },
         { "primaryCoin", primaryCoin },
         { "secondaryCoin", secondaryCoin },
         { "contractName", contractName },
         { "position", position },
         { "templateGuid", templateGuid },
         { "fee", fee.ToString(CultureInfo.InvariantCulture) },
         { "leverage", leverage.ToString(CultureInfo.InvariantCulture) },
         { "tradeAmountType", amountType.ToString() },
         { "tradeAmount", tradeAmount.ToString(CultureInfo.InvariantCulture) },
         { "stopLoss", stopLoss.ToString(CultureInfo.InvariantCulture) },
         { "minChangeToBuy", minChangeToBuy.ToString(CultureInfo.InvariantCulture) },
         { "minChangeToSell", minChangeToSell.ToString(CultureInfo.InvariantCulture) },
         { "emails", JsonConvert.SerializeObject(actions) },
     }));
 }