Exemple #1
0
        public async Task <XCommasResponse <Bot[]> > GetBotsAsync(int limit = 50, int?offset = null, int?accountId = null, int?botId = null, BotScope botScope = BotScope.Enabled, Strategy strategy = Strategy.Long)
        {
            var path = $"{BaseAddress}/ver1/bots?limit={limit}&offset={offset}&account_id={accountId}&bot_id={botId}&scope={botScope.GetEnumMemberAttrValue()}&strategy={strategy.GetEnumMemberAttrValue()}";

            using (var request = XCommasRequest.Get(path).Sign(this))
            {
                return(await this.GetResponse <Bot[]>(request).ConfigureAwait(false));
            }
        }
Exemple #2
0
        public async Task <XCommasResponse <GridBot[]> > GetGridBotsAsync(int limit = 10, int?offset = null, int[] accountIds = null, string accountTypes = null, BotScope botState = BotScope.Enabled, string sortBy = "bot_id", string sortDirection = "asc")
        {
            var path = $"{BaseAddress}/ver1/grid_bots?limit={limit}&offset={offset}&state={botState.GetEnumMemberAttrValue()}&sort_by={sortBy}&sort_direction={sortDirection}";

            using (var request = XCommasRequest.Get(path).Sign(this))
            {
                return(await this.GetResponse <GridBot[]>(request).ConfigureAwait(false));
            }
        }