Imported Benchmark Data
Maintain custom benchmarks by importing their daily returns via this API. You can also add daily returns in Addepar or the Import Tool.
| Base route | /v1/imported_benchmark_data |
| Endpoints | GET /v1/imported_benchmark_data/:id |
PATCH /v1/imported_benchmark_data/:id | |
| Produces | JSON |
| Pagination | No |
| Application permissions required | "API Access: Create, edit, and delete" and "Benchmark library" |
| OAuth scopes | BENCHMARKS_READ or BENCHMARKS_WRITE |
🔒 Access requirements
"API Access: Create, edit, and delete" and "Benchmark library" application permissions are required. Use
BENCHMARKS_READfor GET andBENCHMARKS_WRITEfor PATCH operations.
Resource overview
| Attribute | Description |
|---|---|
daily_returns | A list of date-value JSON objects indicating daily returns for a particular date. Array. Example: [{"date": "2024-01-01", "value": 0.005}] |
Get daily returns
Returns all the daily returns for an imported benchmark with the given ID.
GET /v1/imported_benchmark_data/:id
🔑 Authentication
All requests require a base64-encoded API key pair:
Authorization: Basic {base64(key_id:key_secret)}See Access & Authentication for setup.
curl -X GET "https://{firm}.addepar.com/api/v1/imported_benchmark_data/378862" \
-H "Authorization: Basic {credentials}" \
-H "Addepar-Firm: 1" \
-H "Accept: application/vnd.api+json"HTTP/1.1 200
{
"data": {
"id": "378862",
"type": "imported_benchmark_data",
"attributes": {
"daily_returns": [
{
"date": "2024-01-01",
"value": 0.005
},
{
"date": "2024-01-02",
"value": -0.005
},
{
"date": "2024-01-03",
"value": 0.0
},
{
"date": "2024-01-04",
"value": 0.01
},
{
"date": "2024-01-05",
"value": -0.005
}
]
},
"links": {
"self": "/v1/imported_benchmark_data/378862"
}
},
"included": []
}Response codes:
200 OK-- Success403 Forbidden-- The currently logged-in user does not have permission to access benchmarks404 Not Found-- No imported benchmark exists corresponding to the provided ID
Update daily returns
Add new daily returns to an existing imported benchmark. New daily returns are appended to existing returns. For dates that already have returns, new values overwrite existing ones.
PATCH /v1/imported_benchmark_data/:id
curl -X PATCH "https://{firm}.addepar.com/api/v1/imported_benchmark_data/378862" \
-H "Authorization: Basic {credentials}" \
-H "Addepar-Firm: 1" \
-H "Content-Type: application/vnd.api+json" \
-H "Accept: application/vnd.api+json" \
-d '{
"data": {
"id": "378862",
"type": "imported_benchmark_data",
"attributes": {
"daily_returns": [
{
"date": "2021-01-01",
"value": 0.005
},
{
"date": "2021-01-02",
"value": -0.005
},
{
"date": "2021-01-03",
"value": 0.0
},
{
"date": "2021-01-04",
"value": 0.01
},
{
"date": "2021-01-05",
"value": -0.005
}
]
},
"links": {
"self": "/v1/imported_benchmark_data/378862"
}
},
"included": []
}'HTTP/1.1 200Response codes:
200 OK-- Success400 Bad Request-- Invalid request payload403 Forbidden-- The currently logged-in user does not have permission to update benchmarks404 Not Found-- No imported benchmark exists corresponding to the provided ID409 Conflict-- The id field in the request payload does not match the ID in the URL
📘 Related resources
Updated 6 days ago