diff --git a/src/interface/actions.ts b/src/interface/actions.ts index 2c6d52a..91ca388 100644 --- a/src/interface/actions.ts +++ b/src/interface/actions.ts @@ -101,6 +101,17 @@ export class ActionFetchOptions { * The date options for filtering actions. */ readonly dateOptions?: ActionDateOptions; + + /** + * Creates a set of options for an Action fetch. + * @constructor + * @param pageSize - The size of the page if paging is desired. + * @param dateOptions - The options for Date filtering. + */ + constructor(pageSize?: number, dateOptions?: ActionDateOptions) { + this.pageSize = pageSize; + this.dateOptions = dateOptions; + } } /** diff --git a/test/alpaca.test.ts b/test/alpaca.test.ts index 19304f8..ff06348 100644 --- a/test/alpaca.test.ts +++ b/test/alpaca.test.ts @@ -39,6 +39,8 @@ describe('Alpaca Tests', () => { expect(process.env.ALPACA_SECRET_KEY).toBeDefined(); const exchange = new AlpacaExchange(process.env.ALPACA_API_KEY!, process.env.ALPACA_SECRET_KEY!, true); + const fetchOptions = {}; + const response = await exchange.actionProvider.fetchActions(new ActionFetchOptions()); logger.info(JSON.stringify(response));