cURL
curl --request POST \
--url https://api.tilt.io/api/v1/custom/org/{organization_uuid}/clients/{client_uuid}/accounts/{account_uuid}/optimize/ \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.tilt.io/api/v1/custom/org/{organization_uuid}/clients/{client_uuid}/accounts/{account_uuid}/optimize/"
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.tilt.io/api/v1/custom/org/{organization_uuid}/clients/{client_uuid}/accounts/{account_uuid}/optimize/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tilt.io/api/v1/custom/org/{organization_uuid}/clients/{client_uuid}/accounts/{account_uuid}/optimize/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tilt.io/api/v1/custom/org/{organization_uuid}/clients/{client_uuid}/accounts/{account_uuid}/optimize/"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tilt.io/api/v1/custom/org/{organization_uuid}/clients/{client_uuid}/accounts/{account_uuid}/optimize/")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tilt.io/api/v1/custom/org/{organization_uuid}/clients/{client_uuid}/accounts/{account_uuid}/optimize/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"weights": [
{
"ticker": "<string>",
"optimized_weight": "<string>",
"initial_weight": "<string>",
"benchmark_weight": "<string>",
"active_weight": "<string>",
"imputed_alpha": "<string>",
"tax_alpha": "<string>",
"no_trade": true,
"no_hold": true,
"no_buy": true,
"no_sell": true,
"ticker_symbol": "<string>",
"ticker_name": "<string>"
}
],
"summary": {
"total_optimized_weight": "<string>",
"total_benchmark_weight": "<string>",
"total_ideal_weight": "<string>",
"total_active_weight": "<string>",
"imputed_alpha": "<string>",
"transaction_cost": "<string>",
"simple_tcost": "<string>",
"commissions_bps": "<string>",
"market_impact_bps": "<string>",
"bid_ask_cost_bps": "<string>",
"nav": "<string>",
"turnover": "<string>",
"benchmark_risk_annualized_percentage": "<string>",
"active_risk_annualized_percentage": "<string>",
"optimized_risk_annualized_percentage": "<string>",
"tilt_risk_annualized_percentage": "<string>",
"average_drift": "<string>",
"max_drift": "<string>",
"resolved_tax_gamma": "<string>",
"tax_gamma_iterations": 123
},
"tax_summary": {
"short_term_gain": "<string>",
"short_term_loss": "<string>",
"long_term_gain": "<string>",
"long_term_loss": "<string>",
"short_term_net": "<string>",
"long_term_net": "<string>",
"tax_due": "<string>"
},
"factor_exposures_summary": {
"exposures": [
{
"factor": "<string>",
"benchmark_exposure": "<string>",
"optimized_exposure": "<string>",
"active_exposure": "<string>",
"ideal_exposure": "<string>",
"initial_exposure": "<string>"
}
]
},
"trade_attribution": [
{
"ticker": "<string>",
"imputed_alpha": "<string>",
"benchmark_weight": "<string>",
"tax_alpha": "<string>",
"trade_weight": "<string>",
"active_weight": "<string>",
"initial_weight": "<string>",
"optimized_weight": "<string>",
"tax_loss_harvesting_sell": true,
"tax_loss_harvesting_buy": true,
"tilt_exposure_sell": true,
"tilt_exposure_buy": true,
"no_hold_restriction": true,
"no_trade_restriction": true,
"no_buy_restriction": true,
"no_sell_restriction": true,
"hold_benchmark_restriction": true,
"initial_active_weight": "<string>",
"reduced_active_weight": true,
"constraints_and_hedging": true,
"ticker_symbol": "<string>",
"ticker_name": "<string>",
"risk_aversion_alpha": "<string>"
}
]
}Portfolio Customization
Optimize Account Portfolio
Get the customized weights for a client.
POST
/
api
/
v1
/
custom
/
org
/
{organization_uuid}
/
clients
/
{client_uuid}
/
accounts
/
{account_uuid}
/
optimize
/
cURL
curl --request POST \
--url https://api.tilt.io/api/v1/custom/org/{organization_uuid}/clients/{client_uuid}/accounts/{account_uuid}/optimize/ \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.tilt.io/api/v1/custom/org/{organization_uuid}/clients/{client_uuid}/accounts/{account_uuid}/optimize/"
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.tilt.io/api/v1/custom/org/{organization_uuid}/clients/{client_uuid}/accounts/{account_uuid}/optimize/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tilt.io/api/v1/custom/org/{organization_uuid}/clients/{client_uuid}/accounts/{account_uuid}/optimize/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tilt.io/api/v1/custom/org/{organization_uuid}/clients/{client_uuid}/accounts/{account_uuid}/optimize/"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tilt.io/api/v1/custom/org/{organization_uuid}/clients/{client_uuid}/accounts/{account_uuid}/optimize/")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tilt.io/api/v1/custom/org/{organization_uuid}/clients/{client_uuid}/accounts/{account_uuid}/optimize/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"weights": [
{
"ticker": "<string>",
"optimized_weight": "<string>",
"initial_weight": "<string>",
"benchmark_weight": "<string>",
"active_weight": "<string>",
"imputed_alpha": "<string>",
"tax_alpha": "<string>",
"no_trade": true,
"no_hold": true,
"no_buy": true,
"no_sell": true,
"ticker_symbol": "<string>",
"ticker_name": "<string>"
}
],
"summary": {
"total_optimized_weight": "<string>",
"total_benchmark_weight": "<string>",
"total_ideal_weight": "<string>",
"total_active_weight": "<string>",
"imputed_alpha": "<string>",
"transaction_cost": "<string>",
"simple_tcost": "<string>",
"commissions_bps": "<string>",
"market_impact_bps": "<string>",
"bid_ask_cost_bps": "<string>",
"nav": "<string>",
"turnover": "<string>",
"benchmark_risk_annualized_percentage": "<string>",
"active_risk_annualized_percentage": "<string>",
"optimized_risk_annualized_percentage": "<string>",
"tilt_risk_annualized_percentage": "<string>",
"average_drift": "<string>",
"max_drift": "<string>",
"resolved_tax_gamma": "<string>",
"tax_gamma_iterations": 123
},
"tax_summary": {
"short_term_gain": "<string>",
"short_term_loss": "<string>",
"long_term_gain": "<string>",
"long_term_loss": "<string>",
"short_term_net": "<string>",
"long_term_net": "<string>",
"tax_due": "<string>"
},
"factor_exposures_summary": {
"exposures": [
{
"factor": "<string>",
"benchmark_exposure": "<string>",
"optimized_exposure": "<string>",
"active_exposure": "<string>",
"ideal_exposure": "<string>",
"initial_exposure": "<string>"
}
]
},
"trade_attribution": [
{
"ticker": "<string>",
"imputed_alpha": "<string>",
"benchmark_weight": "<string>",
"tax_alpha": "<string>",
"trade_weight": "<string>",
"active_weight": "<string>",
"initial_weight": "<string>",
"optimized_weight": "<string>",
"tax_loss_harvesting_sell": true,
"tax_loss_harvesting_buy": true,
"tilt_exposure_sell": true,
"tilt_exposure_buy": true,
"no_hold_restriction": true,
"no_trade_restriction": true,
"no_buy_restriction": true,
"no_sell_restriction": true,
"hold_benchmark_restriction": true,
"initial_active_weight": "<string>",
"reduced_active_weight": true,
"constraints_and_hedging": true,
"ticker_symbol": "<string>",
"ticker_name": "<string>",
"risk_aversion_alpha": "<string>"
}
]
}Authorizations
Path Parameters
Response
200 - application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Factor exposure summary report showing benchmark, optimized, active, ideal, and initial exposures for each factor.
Show child attributes
Show child attributes
Trade attribution report explaining why each trade was made, including flags for tax loss harvesting, tilt exposure changes, trade restrictions, and constraint-driven trades.
Show child attributes
Show child attributes
⌘I