Resolve "Implement action fetching for Alpaca" #31

Merged
clbertolini merged 12 commits from 14-implement-action-fetching-for-alpaca into main 2023-11-10 21:36:43 +00:00
2 changed files with 13 additions and 0 deletions
Showing only changes of commit 34bcafb07f - Show all commits

View File

@ -101,6 +101,17 @@ export class ActionFetchOptions {
* The date options for filtering actions. * The date options for filtering actions.
*/ */
readonly dateOptions?: ActionDateOptions; 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(); expect(process.env.ALPACA_SECRET_KEY).toBeDefined();
const exchange = new AlpacaExchange(process.env.ALPACA_API_KEY!, process.env.ALPACA_SECRET_KEY!, true); 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()); const response = await exchange.actionProvider.fetchActions(new ActionFetchOptions());
logger.info(JSON.stringify(response)); logger.info(JSON.stringify(response));