polygon-io / issues

Quickly track and report problems with polygon.io
29 stars 0 forks source link

Duplicate dividends on the same day (`exDate`) #162

Closed caiocmpaes closed 1 year ago

caiocmpaes commented 2 years ago

Some tickers are returning two or more dividend events with the same exDate.

URL https://api.polygon.io/v2/reference/dividends/AFIN

Result

...
results: [
    ...,
    {
      "ticker": "AFIN",
      "exDate": "2019-01-11",
      "paymentDate": "2019-01-16",
      "recordDate": "2019-01-14",
      "amount": 0.092
    },
    {
      "ticker": "AFIN",
      "exDate": "2019-01-11",
      "paymentDate": "2019-01-16",
      "recordDate": "2019-01-14",
      "declaredDate": "2019-01-02",
      "amount": 0.0916667
    },
    ...
]

Expected Result It's not expected to get two or more dividend events on the same day for a given ticker. When you check on Nasdaq's Dividend History (AFIN) for those tickers they're showing the right amount.

List of tickers (and dates) that have duplicate dividend results with the same exDate

AFIN has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2019-01-11' │ 0.092  │
└─────────┴──────────────┴────────┘
AINV has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2021-09-20' │  0.31  │
└─────────┴──────────────┴────────┘
AIV has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-11-03' │  7.38  │
└─────────┴──────────────┴────────┘
AQN has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2021-09-29' │  0.34  │
└─────────┴──────────────┴────────┘
AUY has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-12-30' │  0.02  │
└─────────┴──────────────┴────────┘
BAM has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-02-27' │  0.18  │
└─────────┴──────────────┴────────┘
BCE has 7 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2021-09-14' │  0.7   │
│    1    │ '2020-12-14' │ 0.625  │
│    2    │ '2020-12-14' │  0.64  │
│    3    │ '2020-06-12' │ 1.189  │
│    4    │ '2020-06-12' │ 1.197  │
│    5    │ '2020-03-13' │ 0.629  │
│    6    │ '2020-03-13' │ 0.623  │
└─────────┴──────────────┴────────┘
BCSF has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-06-29' │  0.41  │
└─────────┴──────────────┴────────┘
BEP has 2 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-11-27' │ 0.434  │
│    1    │ '2020-02-27' │ 0.543  │
└─────────┴──────────────┴────────┘
BEPC has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-11-27' │ 0.434  │
└─────────┴──────────────┴────────┘
BMO has 3 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-08-03' │ 0.783  │
│    1    │ '2020-04-30' │ 0.754  │
│    2    │ '2020-01-31' │ 0.816  │
└─────────┴──────────────┴────────┘
BNS has 3 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-07-06' │ 0.654  │
│    1    │ '2020-04-06' │ 0.673  │
│    2    │ '2020-01-06' │ 0.678  │
└─────────┴──────────────┴────────┘
CAE has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-03-12' │ 0.083  │
└─────────┴──────────────┴────────┘
CDR has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-11-09' │  0.01  │
└─────────┴──────────────┴────────┘
CIGI has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-12-30' │  0.05  │
└─────────┴──────────────┴────────┘
CNI has 5 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2021-09-07' │ 0.492  │
│    1    │ '2020-12-08' │  0.87  │
│    2    │ '2020-12-08' │  0.88  │
│    3    │ '2020-03-09' │ 0.434  │
│    4    │ '2020-03-09' │  0.43  │
└─────────┴──────────────┴────────┘
CNQ has 3 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2021-09-16' │ 0.376  │
│    1    │ '2020-12-08' │ 0.319  │
│    2    │ '2020-06-11' │ 0.305  │
└─────────┴──────────────┴────────┘
COF has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2021-08-06' │  0.6   │
└─────────┴──────────────┴────────┘
CP has 3 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-12-30' │ 0.724  │
│    1    │ '2020-06-25' │  0.59  │
│    2    │ '2020-03-26' │ 0.621  │
└─────────┴──────────────┴────────┘
CPZ has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-03-12' │  0.11  │
└─────────┴──────────────┴────────┘
CWH has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-12-14' │   1    │
└─────────┴──────────────┴────────┘
DOOO has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-12-30' │ 0.085  │
└─────────┴──────────────┴────────┘
ENB has 5 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-11-12' │ 0.608  │
│    1    │ '2020-05-14' │ 0.572  │
│    2    │ '2020-05-14' │ 1.152  │
│    3    │ '2020-02-13' │ 0.624  │
│    4    │ '2020-02-13' │ 0.612  │
└─────────┴──────────────┴────────┘
ESLT has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2021-08-27' │ 0.345  │
└─────────┴──────────────┴────────┘
FDUS has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2021-09-13' │  0.42  │
└─────────┴──────────────┴────────┘
FNV has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-12-02' │ 0.455  │
└─────────┴──────────────┴────────┘
FSK has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-06-16' │  0.15  │
└─────────┴──────────────┴────────┘
FTS has 2 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-05-14' │ 0.339  │
│    1    │ '2020-02-14' │ 0.368  │
└─────────┴──────────────┴────────┘
GLPI has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-05-12' │  0.6   │
└─────────┴──────────────┴────────┘
GLP has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-04-30' │ 0.609  │
└─────────┴──────────────┴────────┘
GROW has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2019-01-11' │ 0.002  │
└─────────┴──────────────┴────────┘
GWRS has 3 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2021-09-15' │ 0.024  │
│    1    │ '2020-04-15' │ 0.024  │
│    2    │ '2020-02-13' │ 0.024  │
└─────────┴──────────────┴────────┘
HBM has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-03-09' │ 0.008  │
└─────────┴──────────────┴────────┘
ISSC has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-12-18' │   1    │
└─────────┴──────────────┴────────┘
KGC has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-11-24' │ 0.053  │
└─────────┴──────────────┴────────┘
LARK has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-11-09' │  0.2   │
└─────────┴──────────────┴────────┘
MGA has 2 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-03-05' │  0.4   │
│    1    │ '2020-03-05' │ 0.302  │
└─────────┴──────────────┴────────┘
MPB has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-02-04' │  0.23  │
└─────────┴──────────────┴────────┘
MTR has 2 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-03-30' │ 0.138  │
│    1    │ '2020-01-30' │ 0.079  │
└─────────┴──────────────┴────────┘
NEXA has 2 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-03-13' │ 0.755  │
│    1    │ '2020-03-13' │ 0.321  │
└─────────┴──────────────┴────────┘
NJR has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2021-09-17' │ 0.333  │
└─────────┴──────────────┴────────┘
NTR has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-12-30' │ 0.346  │
└─────────┴──────────────┴────────┘
OBCI has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-06-08' │  0.1   │
└─────────┴──────────────┴────────┘
ODP has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-02-28' │ 0.025  │
└─────────┴──────────────┴────────┘
ODFL has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-03-03' │  0.23  │
└─────────┴──────────────┴────────┘
OPBK has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2021-08-04' │  0.1   │
└─────────┴──────────────┴────────┘
OTEX has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-12-03' │ 0.352  │
└─────────┴──────────────┴────────┘
PGR has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-01-07' │  0.1   │
└─────────┴──────────────┴────────┘
PKBK has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-01-09' │  0.16  │
└─────────┴──────────────┴────────┘
RCI has 3 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-12-09' │ 0.375  │
│    1    │ '2020-06-09' │ 0.359  │
│    2    │ '2020-03-09' │ 0.378  │
└─────────┴──────────────┴────────┘
ROL has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-11-09' │  0.21  │
└─────────┴──────────────┴────────┘
SBNY has 2 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-05-01' │  1.12  │
│    1    │ '2020-01-30' │  0.56  │
└─────────┴──────────────┴────────┘
SF has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-11-30' │  0.17  │
└─────────┴──────────────┴────────┘
SJR has 10 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2021-09-14' │ 0.079  │
│    1    │ '2021-01-14' │ 0.076  │
│    2    │ '2020-12-14' │ 0.074  │
│    3    │ '2020-07-14' │ 0.073  │
│    4    │ '2020-06-12' │ 0.071  │
│    5    │ '2020-05-14' │  0.07  │
│    6    │ '2020-04-14' │ 0.074  │
│    7    │ '2020-03-12' │ 0.075  │
│    8    │ '2020-02-13' │ 0.076  │
│    9    │ '2020-01-14' │ 0.076  │
└─────────┴──────────────┴────────┘
SLG has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-12-14' │   2    │
└─────────┴──────────────┴────────┘
SU has 3 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-12-02' │ 0.158  │
│    1    │ '2020-06-03' │ 0.151  │
│    2    │ '2020-03-03' │ 0.351  │
└─────────┴──────────────┴────────┘
SUPV has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-05-27' │ 0.028  │
└─────────┴──────────────┴────────┘
TAC has 2 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-11-30' │ 0.064  │
│    1    │ '2020-05-29' │ 0.064  │
└─────────┴──────────────┴────────┘
TECK has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-03-12' │ 0.038  │
└─────────┴──────────────┴────────┘
TFII has 2 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2021-09-29' │ 0.182  │
│    1    │ '2021-09-29' │ 0.412  │
└─────────┴──────────────┴────────┘
TG has 2 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-12-21' │  6.09  │
│    1    │ '2020-12-10' │  6.09  │
└─────────┴──────────────┴────────┘
TNP has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-06-19' │ 0.075  │
└─────────┴──────────────┴────────┘
TRI has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-03-05' │ 0.287  │
└─────────┴──────────────┴────────┘
TRP has 2 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-12-30' │ 1.231  │
│    1    │ '2020-03-30' │ 0.606  │
└─────────┴──────────────┴────────┘
TU has 5 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2021-09-09' │ 0.253  │
│    1    │ '2020-12-10' │ 0.234  │
│    2    │ '2020-06-09' │ 0.209  │
│    3    │ '2020-03-10' │  0.44  │
│    4    │ '2020-03-10' │ 0.436  │
└─────────┴──────────────┴────────┘
VER has 1 duplicates
┌─────────┬──────────────┬────────┐
│ (index) │    exDate    │ amount │
├─────────┼──────────────┼────────┤
│    0    │ '2020-12-30' │ 0.077  │
└─────────┴──────────────┴────────┘
jrbell19 commented 2 years ago

This is something that we will be addressing in this upcoming quarter. So sorry for the inconvenience.

jrbell19 commented 1 year ago

Recommend using our v3 Dividends endpoint: https://polygon.io/docs/stocks/get_v3_reference_dividends

tek08 commented 1 year ago

Unfortunately, this might need to be reopened as a regression, as I see similar behavior with the Python API (which now uses https://polygon.io/docs/stocks/get_v3_reference_dividends). For example: ex_dividend_date=2023-02-01 returns two dividends for BSV with very close but not the same dividend amount (.12834 vs .128).