GET
/
securities
/
etf
/
holdings
Get a list of holdings in an ETF
curl --request GET \
  --url https://openapi.ainvest.com/open/securities/etf/holdings \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "data": [
      {
        "date": "<string>",
        "total_weight": 123,
        "holdings": [
          {
            "ticker": "<string>",
            "constituent_weight": 123
          }
        ]
      }
    ]
  },
  "status_code": 123,
  "status_msg": "<string>"
}
Currently returns data for top 10 holdings only

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your key. Get the key here

Query Parameters

ticker
string
required

US stock market ticker symbol of the ETF, e.g. SPY, QQQ, etc.

from
string

Start of the requested period, format YYYY-MM-DD. By default equals to a year ago from current date.

to
string

End of the requested period, format YYYY-MM-DD. By default equals to current date.

Response

Successful response in standard envelope.

data
object
status_code
number

Status code, 0 for success

status_msg
string

Status message, success for success