Open another portfolio
curl -X POST "https://api.staging.idealx.com/v1/accounts/acc_01937c4e8a2b7d1f9e0c3b5a6d7e8f90/portfolios" \ -H "Authorization: Bearer $IDEALX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Long term"}'const res = await fetch("https://api.staging.idealx.com/v1/accounts/acc_01937c4e8a2b7d1f9e0c3b5a6d7e8f90/portfolios", { method: "POST", headers: { Authorization: `Bearer ${process.env.IDEALX_API_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ "name": "Long term" }),});if (!res.ok) throw new Error((await res.json()).error.code);const data = await res.json();import osimport requests
res = requests.post( "https://api.staging.idealx.com/v1/accounts/acc_01937c4e8a2b7d1f9e0c3b5a6d7e8f90/portfolios", headers={"Authorization": f"Bearer {os.environ['IDEALX_API_KEY']}"}, json={ "name": "Long term" }, timeout=30,)res.raise_for_status()data = res.json()Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Example generated
{ "name": "example"}Responses
Section titled “Responses”Opened
object
The account’s main currency, from its country
object
object
object
object
The value in disjoint parts, in the main currency; they add up to value exactly (D138). Cash is uninvested cash in every currency; strategies holds the positions of portfolios that follow a strategy and is listed only when one does.
object
Currencies (cash) or positions counted
What you may do here, from your account role or your firm’s role, kind and mandate. add_money, trade, transfer, withdraw, send_crypto, manage_payees, schedule, propose and decide_proposals move money or ask a client to; an approval policy may still apply when they run.
object
object
The value in disjoint parts, in the main currency; they add up to value exactly (D138). Cash is uninvested cash in every currency; strategies holds the positions of portfolios that follow a strategy and is listed only when one does.
object
Currencies (cash) or positions counted
What you may do here, from your account role or your firm’s role, kind and mandate. add_money, trade, transfer, withdraw, send_crypto, manage_payees, schedule, propose and decide_proposals move money or ask a client to; an approval policy may still apply when they run.
Example
{ "currency": "AUD", "status": "open", "portfolios": [ { "status": "open", "breakdown": [ { "bucket": "cash" } ], "actions": [ "add_money" ] } ], "breakdown": [ { "bucket": "cash" } ], "actions": [ "add_money" ]}Name taken or limit reached
object
object
object
Example
{ "error": { "code": "validation_failed" }}