Create Run
POST
/api/v1/portfolio-optimization/runs
const url = 'https://example.com/api/v1/portfolio-optimization/runs';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"project_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","tickers":["example"],"risk_weight":0.5,"price_history":"1y","solver":{"drive_shaping":"proportional_diagonal","bayesian_search_n_calls":20,"shots":200,"do_preprocessing":true,"do_postprocessing":true,"penalty_norm":100,"n_bits":1,"remote_backend":"EMU_MPS"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/portfolio-optimization/runs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "project_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "tickers": [ "example" ], "risk_weight": 0.5, "price_history": "1y", "solver": { "drive_shaping": "proportional_diagonal", "bayesian_search_n_calls": 20, "shots": 200, "do_preprocessing": true, "do_postprocessing": true, "penalty_norm": 100, "n_bits": 1, "remote_backend": "EMU_MPS" } }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
CreatePortfolioRunSchema
object
project_id
required
Project Id
Project to submit the run's Batch/Job under.
string format: uuid
tickers
required
Tickers
Array<string>
risk_weight
Risk Weight
number
price_history
Price History
Price history used to estimate returns and covariances.
string
solver
SolverSettingsSchema
Forwarded to quantum_solver - keep its SolverSettings in sync.
object
drive_shaping
Drive Shaping
string
bayesian_search_n_calls
Bayesian Search N Calls
integer
shots
Shots
integer
do_preprocessing
Do Preprocessing
boolean
do_postprocessing
Do Postprocessing
boolean
penalty_norm
Penalty Norm
number
n_bits
N Bits
integer
remote_backend
Remote Backend
string
device
Any of:
DeviceTypeName
Enumeration of allowed and legacy device type names
string
null
Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
NonPaginatedResponse[ProducedPortfolioRunSummarySchema]
object
data
Any of:
ProducedPortfolioRunSummarySchema
object
id
required
Id
string format: uuid
status
required
PortfolioRunStatus
string
created_at
required
Created At
string
tickers
required
Tickers
Array<string>
risk_weight
required
Risk Weight
number
null
Example
{ "data": { "status": "pre_processing" }}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}