Alpaca-API icon indicating copy to clipboard operation
Alpaca-API copied to clipboard

When use the API `GET/v2/account/activities` , some records are missing.

Open marketspider opened this issue 3 years ago • 1 comments

Describe the bug GET Account Activities API. When the parameter of date is not specified, it is sometimes the case that some records with the same order_id as the last record in the list are missing.

Two examples are given below. Parameters : direction is asc. page_size is default(100).

When the parameter of date is not specified, next to ID(20210401152027196::74014bd4-e939-4ec5-adcb-71c2246bca86) is ID(20210401152027196::9f753617-17d9-45b1-adb6-bc2e97ba9f62). But when the parameter of date is specified, there is ID(20210401152027196::99f40dc9-3281-47ce-b647-ae33f2c5f128) between the above two.

And when the parameter of date is not specified, next to ID(20210405095806840::1d255dcb-b710-43dc-8b69-a40b6c88bf5e) is ID(20210405095806842::b6c407ec-798f-4c61-be7d-bf9c4ca226e9). But when the parameter of date is specified, there are ID(20210405095806842::5968e681-ec90-4e82-a7b2-73dfca70373b) and ID(20210405095806842::a28a4dcc-f62a-4076-9b83-5c8be0ba606d) between the above two.

date is not specified. This list is incorrect.

....

[activityType=FILL,id=20210401152027196::74014bd4-e939-4ec5-adcb-71c2246bca86,cumQty=100,leavesQty=500,price=40.28,qty=67,side=sell,symbol=MOON,transactionTime=2021-04-01T19:20:27.196Z,orderId=359381f0-fe21-47a6-9f08-4f6bee4d4620,type=partial_fill]
[activityType=FILL,id=20210401152027196::9f753617-17d9-45b1-adb6-bc2e97ba9f62,cumQty=200,leavesQty=400,price=40.28,qty=100,side=sell,symbol=MOON,transactionTime=2021-04-01T19:20:27.196Z,orderId=359381f0-fe21-47a6-9f08-4f6bee4d4620,type=partial_fill]
[activityType=FILL,id=20210401152027196::d6ce39b6-4c6f-4755-bf12-c1cfe04cb425,cumQty=600,leavesQty=0,price=40.28,qty=200,side=sell,symbol=MOON,transactionTime=2021-04-01T19:20:27.196Z,orderId=359381f0-fe21-47a6-9f08-4f6bee4d4620,type=fill]

---next page---

[activityType=FILL,id=20210401152027197::99628972-6231-46e2-a947-88527931bee4,cumQty=400,leavesQty=200,price=40.28,qty=100,side=sell,symbol=MOON,transactionTime=2021-04-01T19:20:27.197Z,orderId=359381f0-fe21-47a6-9f08-4f6bee4d4620,type=partial_fill]
[activityType=FILL,id=20210401152027197::b3eca00b-fd8f-4f26-af57-88533bf7023b,cumQty=300,leavesQty=300,price=40.28,qty=100,side=sell,symbol=MOON,transactionTime=2021-04-01T19:20:27.197Z,orderId=359381f0-fe21-47a6-9f08-4f6bee4d4620,type=partial_fill]

....

[activityType=FILL,id=20210405095708214::b8f55758-aa2e-4001-a981-c5c1309181ba,cumQty=482,leavesQty=18,price=40.36,qty=100,side=buy,symbol=MOON,transactionTime=2021-04-05T13:57:08.214Z,orderId=f5bf7a84-bdd3-4669-8a17-d437a3368425,type=partial_fill]
[activityType=FILL,id=20210405095806840::1d255dcb-b710-43dc-8b69-a40b6c88bf5e,cumQty=500,leavesQty=0,price=40.35,qty=500,side=buy,symbol=MOON,transactionTime=2021-04-05T13:58:06.840Z,orderId=c5c9220f-97cd-49d5-87e3-356e175b8558,type=fill]
[activityType=FILL,id=20210405095806842::b6c407ec-798f-4c61-be7d-bf9c4ca226e9,cumQty=200,leavesQty=300,price=40.34,qty=100,side=buy,symbol=MOON,transactionTime=2021-04-05T13:58:06.842Z,orderId=7cbe4dc1-0385-41ac-99d6-8948dc5fe32b,type=partial_fill]

---next page---

[activityType=FILL,id=20210405095806842::dee4a579-31a8-4e07-9f3b-571211d38162,cumQty=300,leavesQty=200,price=40.34,qty=100,side=buy,symbol=MOON,transactionTime=2021-04-05T13:58:06.842Z,orderId=7cbe4dc1-0385-41ac-99d6-8948dc5fe32b,type=partial_fill]
[activityType=FILL,id=20210405095806843::ca2b97ff-7a49-49e2-ac8e-ee05151709a3,cumQty=500,leavesQty=0,  price=40.34,qty=100,side=buy,symbol=MOON,transactionTime=2021-04-05T13:58:06.843Z,orderId=7cbe4dc1-0385-41ac-99d6-8948dc5fe32b,type=fill]

....

date is specified [2021-04-01]. This list is correct.

....
[activityType=FILL,id=20210401152027196::74014bd4-e939-4ec5-adcb-71c2246bca86,cumQty=100,leavesQty=500,price=40.28,qty=67,side=sell,symbol=MOON,transactionTime=2021-04-01T19:20:27.196Z,orderId=359381f0-fe21-47a6-9f08-4f6bee4d4620,type=partial_fill]
[activityType=FILL,id=20210401152027196::99f40dc9-3281-47ce-b647-ae33f2c5f128,cumQty=33,leavesQty=567,price=40.28,qty=33,side=sell,symbol=MOON,transactionTime=2021-04-01T19:20:27.196Z,orderId=359381f0-fe21-47a6-9f08-4f6bee4d4620,type=partial_fill] ★
[activityType=FILL,id=20210401152027196::9f753617-17d9-45b1-adb6-bc2e97ba9f62,cumQty=200,leavesQty=400,price=40.28,qty=100,side=sell,symbol=MOON,transactionTime=2021-04-01T19:20:27.196Z,orderId=359381f0-fe21-47a6-9f08-4f6bee4d4620,type=partial_fill]
[activityType=FILL,id=20210401152027196::d6ce39b6-4c6f-4755-bf12-c1cfe04cb425,cumQty=600,leavesQty=0,price=40.28,qty=200,side=sell,symbol=MOON,transactionTime=2021-04-01T19:20:27.196Z,orderId=359381f0-fe21-47a6-9f08-4f6bee4d4620,type=fill]
[activityType=FILL,id=20210401152027197::99628972-6231-46e2-a947-88527931bee4,cumQty=400,leavesQty=200,price=40.28,qty=100,side=sell,symbol=MOON,transactionTime=2021-04-01T19:20:27.197Z,orderId=359381f0-fe21-47a6-9f08-4f6bee4d4620,type=partial_fill]
[activityType=FILL,id=20210401152027197::b3eca00b-fd8f-4f26-af57-88533bf7023b,cumQty=300,leavesQty=300,price=40.28,qty=100,side=sell,symbol=MOON,transactionTime=2021-04-01T19:20:27.197Z,orderId=359381f0-fe21-47a6-9f08-4f6bee4d4620,type=partial_fill]
....

date is specified [2021-04-05]. This list is correct.

....
[activityType=FILL,id=20210405095708214::b8f55758-aa2e-4001-a981-c5c1309181ba,cumQty=482,leavesQty=18,price=40.36,qty=100,side=buy,symbol=MOON,transactionTime=2021-04-05T13:57:08.214Z,orderId=f5bf7a84-bdd3-4669-8a17-d437a3368425,type=partial_fill]
[activityType=FILL,id=20210405095806840::1d255dcb-b710-43dc-8b69-a40b6c88bf5e,cumQty=500,leavesQty=0,price=40.35,qty=500,side=buy,symbol=MOON,transactionTime=2021-04-05T13:58:06.840Z,orderId=c5c9220f-97cd-49d5-87e3-356e175b8558,type=fill]
[activityType=FILL,id=20210405095806842::5968e681-ec90-4e82-a7b2-73dfca70373b,cumQty=400,leavesQty=100,price=40.34,qty=100,side=buy,symbol=MOON,transactionTime=2021-04-05T13:58:06.842Z,orderId=7cbe4dc1-0385-41ac-99d6-8948dc5fe32b,type=partial_fill] ★
[activityType=FILL,id=20210405095806842::a28a4dcc-f62a-4076-9b83-5c8be0ba606d,cumQty=100,leavesQty=400,price=40.34,qty=100,side=buy,symbol=MOON,transactionTime=2021-04-05T13:58:06.842Z,orderId=7cbe4dc1-0385-41ac-99d6-8948dc5fe32b,type=partial_fill] ★
[activityType=FILL,id=20210405095806842::b6c407ec-798f-4c61-be7d-bf9c4ca226e9,cumQty=200,leavesQty=300,price=40.34,qty=100,side=buy,symbol=MOON,transactionTime=2021-04-05T13:58:06.842Z,orderId=7cbe4dc1-0385-41ac-99d6-8948dc5fe32b,type=partial_fill]
[activityType=FILL,id=20210405095806842::dee4a579-31a8-4e07-9f3b-571211d38162,cumQty=300,leavesQty=200,price=40.34,qty=100,side=buy,symbol=MOON,transactionTime=2021-04-05T13:58:06.842Z,orderId=7cbe4dc1-0385-41ac-99d6-8948dc5fe32b,type=partial_fill]
[activityType=FILL,id=20210405095806843::ca2b97ff-7a49-49e2-ac8e-ee05151709a3,cumQty=500,leavesQty=0,  price=40.34,qty=100,side=buy,symbol=MOON,transactionTime=2021-04-05T13:58:06.843Z,orderId=7cbe4dc1-0385-41ac-99d6-8948dc5fe32b,type=fill]
....

marketspider avatar Apr 07 '21 14:04 marketspider

This is an issue being looked into and will be resolved. Thanks for pointing it out.

whitnable avatar Apr 07 '21 14:04 whitnable