# Historical "limit" in c#

**URL:** https://forum.alpaca.markets/t/historical-limit-in-c/7191
**Category:** Alpaca Integration Applications
**Created:** [October 22, 2021, 8:10pm UTC](https://forum.alpaca.markets/t/historical-limit-in-c/7191 "2021-10-22T20:10:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jeonnagroup](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@jeonnagroup](https://forum.alpaca.markets/u/jeonnagroup)
#### Post date: [October 22, 2021, 8:10pm UTC](https://forum.alpaca.markets/t/historical-limit-in-c/7191/1 "2021-10-22T20:10:28Z")

</div>

i’m using the alpaca official nuget and it’s seem a “limit” by default of 1000 results . this work pretty well for all i need but when i want to have RSI indicator on the 15 minutes timeframe i need like 2000 results

because manu indicator need warmup period

i saw a option to change it in python but i’m dumb i can’t find it in c#

i only get 67 results wich represent the initial 1000 results / 15 .

```auto
 public static async System.Threading.Tasks.Task<object> GetHistorical_15_Minute_With_Alpaca_Async(string symbol,int days)
        {

            var client = Alpaca.Markets.Environments.Paper.GetAlpacaDataClient(new SecretKey(clsConfig.ALPACA_PUBLIC_KEY_PAPER, clsConfig.ALPACA_SECRET_KEY_PAPER));
           
            var current_bar = client.GetSnapshotAsync(symbol);
            var lastest_trade = current_bar.Result.MinuteBar.TimeUtc;

            // DAILY 
        
            var historical_bar_minute = await client.ListHistoricalBarsAsync(new HistoricalBarsRequest(symbol, lastest_trade.AddDays(-days), lastest_trade, BarTimeFrame.Minute));

            int end = historical_bar_minute.Items.Count();
            List<Quote> results = new List<Quote>();

            for (int i = 0; i < end; i += 15)
            {
                Quote x = new()
                {
                    Date = historical_bar_minute.Items[i].TimeUtc.ToLocalTime(),
                    Open = historical_bar_minute.Items[i].Open,
                    High = historical_bar_minute.Items[i].High,
                    Low = historical_bar_minute.Items[i].Low,
                    Close = historical_bar_minute.Items[i].Close,
                    Volume = historical_bar_minute.Items[i].Volume,

                };

                results.Add(x);

            }

            return results;

        }

```

> **[Historical data - Documentation | Alpaca](https://alpaca.markets/docs/api-documentation/api-v2/market-data/alpaca-data-api-v2/historical/)**
>
> Alpaca API lets you build and trade with real-time market data for free.

---

<div class="post-metadata">

### Author: ![oleg.rakhmatulin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/oleg.rakhmatulin/32/559_2.png) [@oleg.rakhmatulin](https://forum.alpaca.markets/u/oleg.rakhmatulin)
#### Post date: [October 27, 2021, 9:33am UTC](https://forum.alpaca.markets/t/historical-limit-in-c/7191/2 "2021-10-27T09:33:01Z")

</div>

@jeonnagroup Sorry for the delayed answer - it’s better to ask such questions on Slack ([#dev-csharp](https://alpaca-community.slack.com/archives/C029HA9T8CQ) and [#dev-net](https://alpaca-community.slack.com/archives/C01NXLG96EN) channels) or directly on [GitHub](https://github.com/alpacahq/alpaca-trade-api-csharp). For requesting more items in a single request you can specify alternate page size using the `WithPageSize` extension method. In your case code will look like this:

`var historical_bar_minute = await client.ListHistoricalBarsAsync(new HistoricalBarsRequest(symbol, lastest_trade.AddDays(-days), lastest_trade, BarTimeFrame.Minute).WithPageSize(2000));`

But you can request 15 minutes bars directly from API. Just use this expression instead of the `BarTimeFrame.Minute` in your request: `new BarTimeFrame(15, BarTimeFrameUnit.Minute)` - in this case server will do all aggregation for you.

---

<div class="post-metadata">

### Author: ![jeonnagroup](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@jeonnagroup](https://forum.alpaca.markets/u/jeonnagroup)
#### Post date: [December 15, 2021, 3:56pm UTC](https://forum.alpaca.markets/t/historical-limit-in-c/7191/3 "2021-12-15T15:56:46Z")

</div>

Ty buddy !! do i have to sign up to the Slack ?
