Warning
The YCharts API is available to our API customers for their internal use only. Any redistribution or commercial use of data from the API is strictly prohibited without prior written consent from YCharts. For more details on our API’s capabilities and pricing please contact sales@ycharts.com or call (866) 965-7552.
Company Fund Holdings¶
The Company Fund Holdings Endpoint is used to return a list of holdings objects.
Request Info¶
Request Method |
GET |
URL |
https://api.ycharts.com/v3/companies/ |
Request Parameters¶
Parameter |
Required |
Description |
---|---|---|
symbol[s] |
Y |
The exchange symbol for a company fund, or a comma separated list of exchange symbols. |
Note
There is a maximum of 25 symbols per request.
Response Info¶
The response will contain one or more company fund objects. The key for each company fund object is the exchange symbol passed in the request.
Field |
Type |
Description |
---|---|---|
meta |
Meta |
This object contains information about the query for the company fund object. |
results |
Results |
This object contains one or more holding objects. |
Field |
Type |
Description |
---|---|---|
weight |
decimal |
Current Weight |
name |
string |
Name |
security_id |
string |
Security ID |
Examples¶
The following is an example successful request for 1 company fund.
Request URL
https://api.ycharts.com/v3/companies/SPY/holdings
Response
{
"meta": {
"status": "ok",
"url": "https://api.ycharts.com/v3/companies/SPY/holdings"
},
"response": {
"SPY": {
"meta": {
"status": "ok"
},
"results": {
"holdings": {
"meta": {
"status": "ok"
},
"data": [
{
"weight": 6.63,
"name": "Apple Inc",
"security_id": "AAPL"
}
]
}
}
}
}
}
The following is an example successful request for multiple company funds.
Request URL
https://api.ycharts.com/v3/companies/SPY,VTI/holdings
Response
{
"meta": {
"status": "ok",
"url": "https://api.ycharts.com/v3/companies/SPY,VTI/holdings"
},
"response": {
"SPY": {
"meta": {
"status": "ok"
},
"results": {
"holdings": {
"meta": {
"status": "ok"
},
"data": [
{
"weight": 6.63,
"name": "Apple Inc",
"security_id": "AAPL"
}
]
}
}
},
"VTI": {
"meta": {
"status": "ok"
},
"results": {
"holdings": {
"meta": {
"status": "ok"
},
"data": [
{
"weight": 5.58,
"name": "Apple Inc",
"security_id": "AAPL"
},
{
"weight": 4.93,
"name": "Microsoft Corp",
"security_id": "MSFT"
}
]
}
}
}
}
}
The following is an example incorrect request for a company that is not an aggregate security.
Request URL
https://api.ycharts.com/v3/companies/AAPL/holdings
Response
{
"meta": {
"status": "ok",
"url": "https://api.ycharts.com/v3/companies/AAPL/holdings"
},
"response": {
"AAPL": {
"meta": {
"status": "ok"
},
"results": {
"holdings": {
"meta": {
"status": "ok"
},
"data": []
}
}
}
}
}