Filter action fetch response to eliminate partial order fills.
This commit is contained in:
@ -30,7 +30,9 @@ export class AlpacaActionProvider {
|
||||
pageToken: undefined as any,
|
||||
}) as Promise<AlpacaActivity[]>).then((activities) => {
|
||||
return new ActionFetchResponse(
|
||||
activities.map((activity) => {
|
||||
activities
|
||||
.filter((activity) => activity.order_status === "filled")
|
||||
.map((activity) => {
|
||||
return new Action(
|
||||
activity.symbol,
|
||||
parseInt(activity.qty, 10),
|
||||
|
Reference in New Issue
Block a user