Hey @KrisG,
Apparently the order of dividend payments from the /api/v0/history/dividends
has changed, was that on purpose?
Before, the response would have the dividend payments in order of latest payment to oldest.
Example of how it was
{
"items": [
{ "paidOn": "2024-06-13T12:00:00.000+03:00", ... },
{ "paidOn": "2024-06-13T11:00:00.000+03:00", ... },
{ "paidOn": "2024-06-12T14:00:00.000+03:00", ... },
...
{ "paidOn": "2024-05-28T09:00:00.000+03:00", ... },
{ "paidOn": "2024-05-02T15:00:00.000+03:00", ... },
...
],
"nextPagePath": "..."
}
And now the order seems random, with dividends from the previous month sometimes mixed in with dividends from this month.
Example of how it is right now
{
"items": [
{ "paidOn": "2024-05-02T15:00:00.000+03:00", ... },
{ "paidOn": "2024-06-12T14:00:00.000+03:00", ... },
{ "paidOn": "2024-06-13T11:00:00.000+03:00", ... },
{ "paidOn": "2024-05-28T09:00:00.000+03:00", ... },
{ "paidOn": "2024-06-13T12:00:00.000+03:00", ... },
...
],
"nextPagePath": "..."
}
In my current use case, I get the amount of dividends received in the last X months.
Before, I just had to iterate over the payments endpoint’s pages until a date outside of my range was reached, then I could safely stop paginating it.
If I want to implement this now, I’ll have to iterate over all the pages in the endpoint to make sure that I won’t miss any payment that’s in my desired range, and that isn’t good for any of us.
Could you please reset the sorting to how it was?
EDIT: Actually, the pagination is flat out broken: it returns repeated payments. Here are real responses, slightly redacted:
GET /api/v0/history/dividends?limit=5
{
"items": [
{
"ticker": "SHELLa_EQ",
"reference": "f5731a42-21a6-4b97-9164-13e61dafadca",
"quantity": {{redacted}},
"amount": {{redacted}},
"grossAmountPerShare": 0.3166,
"amountInEuro": {{redacted}},
"paidOn": "2024-06-28T17:20:07.000+03:00",
"type": "DIVIDEND"
},
{
"ticker": "QCOM_US_EQ",
"reference": "e411284f-fa30-41be-ad43-841d109a9d8e",
"quantity": {{redacted}},
"amount": {{redacted}},
"grossAmountPerShare": 0.85,
"amountInEuro": {{redacted}},
"paidOn": "2024-06-20T12:45:58.000+03:00",
"type": "DIVIDEND"
},
{
"ticker": "GRMN_US_EQ",
"reference": "50589886-5db4-4725-bed0-a9de5964bd97",
"quantity": {{redacted}},
"amount": {{redacted}},
"grossAmountPerShare": 0.75,
"amountInEuro": {{redacted}},
"paidOn": "2024-06-28T17:03:12.000+03:00",
"type": "DIVIDEND"
},
{
"ticker": "NVDA_US_EQ",
"reference": "f79bce10-b9e6-433a-a331-7583d0cd4e88",
"quantity": {{redacted}},
"amount": {{redacted}},
"grossAmountPerShare": 0.01,
"amountInEuro": {{redacted}},
"paidOn": "2024-06-28T18:24:03.000+03:00",
"type": "DIVIDEND"
},
{
"ticker": "DLR_US_EQ",
"reference": "ba10b27f-3739-422c-b4bf-38c4a4aa9c8a",
"quantity": {{redacted}},
"amount": {{redacted}},
"grossAmountPerShare": 1.22,
"amountInEuro": {{redacted}},
"paidOn": "2024-06-28T18:16:03.000+03:00",
"type": "DIVIDEND"
}
],
"nextPagePath": "/api/v0/history/dividends?limit=5&cursor=70172961"
}
Now, using the cursor to fetch the next page, 3 of the payments returned were also part of the previous response and the provided cursor for the next page does not change:
GET /api/v0/history/dividends?limit=5&cursor=70172961
{
"items": [
{
"ticker": "TEFe_EQ",
"reference": "3cbd278e-1f93-4911-a17b-8d9e84b18963",
"quantity": {{redacted}},
"amount": {{redacted}},
"grossAmountPerShare": 0.15,
"amountInEuro": {{redacted}},
"paidOn": "2024-06-20T12:44:12.000+03:00",
"type": "DIVIDEND"
},
{
"ticker": "SHELLa_EQ",
"reference": "f5731a42-21a6-4b97-9164-13e61dafadca", // <-- repeated
"quantity": {{redacted}},
"amount": {{redacted}},
"grossAmountPerShare": 0.3166,
"amountInEuro": {{redacted}},
"paidOn": "2024-06-28T17:20:07.000+03:00",
"type": "DIVIDEND"
},
{
"ticker": "QCOM_US_EQ",
"reference": "e411284f-fa30-41be-ad43-841d109a9d8e", // <-- repeated
"quantity": {{redacted}},
"amount": {{redacted}},
"grossAmountPerShare": 0.85,
"amountInEuro": {{redacted}},
"paidOn": "2024-06-20T12:45:58.000+03:00",
"type": "DIVIDEND"
},
{
"ticker": "GRMN_US_EQ",
"reference": "50589886-5db4-4725-bed0-a9de5964bd97", // <-- repeated
"quantity": {{redacted}},
"amount": {{redacted}},
"grossAmountPerShare": 0.75,
"amountInEuro": {{redacted}},
"paidOn": "2024-06-28T17:03:12.000+03:00",
"type": "DIVIDEND"
},
{
"ticker": "GOOGL_US_EQ",
"reference": "3fffb566-edc9-4664-9cca-8518ecf6c265",
"quantity": {{redacted}},
"amount": {{redacted}},
"grossAmountPerShare": 0.2,
"amountInEuro": {{redacted}},
"paidOn": "2024-06-17T16:14:12.000+03:00",
"type": "DIVIDEND"
}
],
"nextPagePath": "/api/v0/history/dividends?limit=5&cursor=70172961"
}