Create or overwrite a portfolio
curl --request POST \
--url https://api.noonum.ai/v2/portfolios \
--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"
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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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', 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"
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("POST", 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": {}
}{
"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>"
}Portfolios
Create or overwrite a portfolio
Creates a portfolio, or overwrites an existing one with the same name. The supplied holdings replace any existing holdings.
POST
/
portfolios
Create or overwrite a portfolio
curl --request POST \
--url https://api.noonum.ai/v2/portfolios \
--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"
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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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', 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"
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("POST", 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": {}
}{
"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>"
}Authorizations
Enter 'Bearer' followed by a space and then your JWT or API Key.
Example: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
or Bearer YOUR_API_KEY_HERE
Body
application/json
Response
An existing portfolio with the same name was overwritten.
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