Feature/extend public api with portfolio performance metrics endpoint (#3762)

* Extend Public API with portfolio performance metrics endpoint

* Update changelog
This commit is contained in:
Thomas Kaul
2024-09-21 10:42:43 +02:00
committed by GitHub
parent 9059d4f971
commit 583c14128b
14 changed files with 275 additions and 111 deletions

View File

@@ -220,6 +220,36 @@ Deprecated: `GET http://localhost:3333/api/v1/auth/anonymous/<INSERT_SECURITY_TO
}
```
### Portfolio (experimental)
#### Prerequisites
Grant access of type _Public_ in the _Access_ tab of _My Ghostfolio_.
#### Request
`GET http://localhost:3333/api/v1/public/<INSERT_ACCESS_ID>/portfolio`
#### Response
##### Success
```
{
"performance": {
"1d": {
"relativeChange": 0 // normalized from -1 to 1
};
"ytd": {
"relativeChange": 0 // normalized from -1 to 1
},
"max": {
"relativeChange": 0 // normalized from -1 to 1
}
}
}
```
## Community Projects
Discover a variety of community projects for Ghostfolio: https://github.com/topics/ghostfolio