Fix timeout issues in Alpaca tests.

This commit is contained in:
2023-10-31 16:58:06 -04:00
parent 54a3341968
commit 91134a42d5
4 changed files with 12 additions and 22 deletions

View File

@ -18,16 +18,11 @@ class AlpacaActivity {
export class AlpacaActionProvider {
readonly alpaca: Alpaca;
readonly fetchActions = (options: ActionFetchOptions): Promise<ActionFetchResponse> => {
return (this.alpaca.getAccountActivities({
activityTypes: "FILL",
until: undefined as any,
after: undefined as any,
direction: "desc",
date: undefined as any,
pageSize: undefined as any,
pageToken: undefined as any,
}) as Promise<AlpacaActivity[]>).then((activities) => {
return new ActionFetchResponse(
activities
@ -45,9 +40,9 @@ export class AlpacaActionProvider {
}).catch((err) => {
return err;
});
}
};
constructor(alpaca: Alpaca) {
this.alpaca = alpaca;
}
}
}

View File

@ -5,4 +5,4 @@ export * from './interface/actions';
export * from './alpaca/exchange';
export * from './alpaca/portfolio';
export * from './alpaca/quote';
export * from './alpaca/quote';

View File

@ -100,7 +100,6 @@ export class ActionFetchOptions {
* Represents the response of a fetch action request.
*/
export class ActionFetchResponse {
/**
* An array of `Action` objects.
*/