Add constructor for ActionFetchOptions.

This commit is contained in:
Carter Bertolini 2023-11-03 16:48:57 -04:00
parent 27b49dc6dc
commit 34bcafb07f
2 changed files with 13 additions and 0 deletions

View File

@ -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;
}
}
/**

View File

@ -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));