Update an owned portfolio and replace its holdings
curl --request PUT \
--url https://api.noonum.ai/v2/portfolios/{portfolioId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Portfolio",
"holdings": [
{
"weight": 0.5,
"symbol": "<string>",
"exchange": "<string>",
"name": "<string>",
"raw_payload": {},
"security_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"public": false,
"tags": [
"<string>"
],
"source": "<string>",
"metadata": {}
}
'import requests
url = "https://api.noonum.ai/v2/portfolios/{portfolioId}"
payload = {
"name": "My Portfolio",
"holdings": [
{
"weight": 0.5,
"symbol": "<string>",
"exchange": "<string>",
"name": "<string>",
"raw_payload": {},
"security_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"public": False,
"tags": ["<string>"],
"source": "<string>",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Portfolio',
holdings: [
{
weight: 0.5,
symbol: '<string>',
exchange: '<string>',
name: '<string>',
raw_payload: {},
security_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
org_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
public: false,
tags: ['<string>'],
source: '<string>',
metadata: {}
})
};
fetch('https://api.noonum.ai/v2/portfolios/{portfolioId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.noonum.ai/v2/portfolios/{portfolioId}"
payload := strings.NewReader("{\n \"name\": \"My Portfolio\",\n \"holdings\": [\n {\n \"weight\": 0.5,\n \"symbol\": \"<string>\",\n \"exchange\": \"<string>\",\n \"name\": \"<string>\",\n \"raw_payload\": {},\n \"security_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"org_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"public\": false,\n \"tags\": [\n \"<string>\"\n ],\n \"source\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "<string>",
"name": "<string>",
"public": true,
"created_at": "Sat, 05 Apr 2025 17:43:37 GMT",
"updated_at": "Mon, 07 Apr 2025 18:39:41 GMT",
"holdings": [
{
"weight": 0.5,
"created_at": "Sat, 05 Apr 2025 17:43:37 GMT",
"updated_at": "Mon, 07 Apr 2025 18:39:41 GMT",
"symbol": "<string>",
"exchange": "<string>",
"market": "<string>",
"name": "<string>",
"raw_payload": {},
"security_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"market_cap": 123,
"sector": "<string>",
"industry": "<string>"
}
],
"tags": [
"<string>"
],
"source": "<string>",
"metadata": {}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Portfolios
Update an owned portfolio and replace its holdings
Updates a portfolio, replacing its holdings with the supplied ones. Only the owner can update a portfolio.
PUT
/
portfolios
/
{portfolioId}
Update an owned portfolio and replace its holdings
curl --request PUT \
--url https://api.noonum.ai/v2/portfolios/{portfolioId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Portfolio",
"holdings": [
{
"weight": 0.5,
"symbol": "<string>",
"exchange": "<string>",
"name": "<string>",
"raw_payload": {},
"security_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"public": false,
"tags": [
"<string>"
],
"source": "<string>",
"metadata": {}
}
'import requests
url = "https://api.noonum.ai/v2/portfolios/{portfolioId}"
payload = {
"name": "My Portfolio",
"holdings": [
{
"weight": 0.5,
"symbol": "<string>",
"exchange": "<string>",
"name": "<string>",
"raw_payload": {},
"security_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"public": False,
"tags": ["<string>"],
"source": "<string>",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Portfolio',
holdings: [
{
weight: 0.5,
symbol: '<string>',
exchange: '<string>',
name: '<string>',
raw_payload: {},
security_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
org_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
public: false,
tags: ['<string>'],
source: '<string>',
metadata: {}
})
};
fetch('https://api.noonum.ai/v2/portfolios/{portfolioId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.noonum.ai/v2/portfolios/{portfolioId}"
payload := strings.NewReader("{\n \"name\": \"My Portfolio\",\n \"holdings\": [\n {\n \"weight\": 0.5,\n \"symbol\": \"<string>\",\n \"exchange\": \"<string>\",\n \"name\": \"<string>\",\n \"raw_payload\": {},\n \"security_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"org_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"public\": false,\n \"tags\": [\n \"<string>\"\n ],\n \"source\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "<string>",
"name": "<string>",
"public": true,
"created_at": "Sat, 05 Apr 2025 17:43:37 GMT",
"updated_at": "Mon, 07 Apr 2025 18:39:41 GMT",
"holdings": [
{
"weight": 0.5,
"created_at": "Sat, 05 Apr 2025 17:43:37 GMT",
"updated_at": "Mon, 07 Apr 2025 18:39:41 GMT",
"symbol": "<string>",
"exchange": "<string>",
"market": "<string>",
"name": "<string>",
"raw_payload": {},
"security_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"market_cap": 123,
"sector": "<string>",
"industry": "<string>"
}
],
"tags": [
"<string>"
],
"source": "<string>",
"metadata": {}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Enter 'Bearer' followed by a space and then your JWT or API Key.
Example: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
or Bearer YOUR_API_KEY_HERE
Path Parameters
UUID of the portfolio.
Body
application/json
Response
The updated portfolio.
Owner identifier, null when the caller is not the owner.
Timestamp of when the portfolio was created, as an RFC 7231 HTTP date.
Example:
"Sat, 05 Apr 2025 17:43:37 GMT"
Timestamp of when the portfolio was last updated, as an RFC 7231 HTTP date.
Example:
"Mon, 07 Apr 2025 18:39:41 GMT"
Show child attributes
Show child attributes
Was this page helpful?
⌘I