curl --request GET \
--url https://api.engine.usesophic.com/accounts/{account_id}/returns \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.engine.usesophic.com/accounts/{account_id}/returns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.engine.usesophic.com/accounts/{account_id}/returns', 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.engine.usesophic.com/accounts/{account_id}/returns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.engine.usesophic.com/accounts/{account_id}/returns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.engine.usesophic.com/accounts/{account_id}/returns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engine.usesophic.com/accounts/{account_id}/returns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"account": "<string>",
"flags": [
"inception_after_period_start"
],
"mwrr": "0.0925",
"period": "1d",
"period_end": "2026-07-14T09:34:12Z",
"period_start": "2026-01-01T00:00:00Z",
"twrr": "0.0875"
}{
"code": "<string>",
"detail": "<string>",
"context": {},
"docs": "<string>",
"params": [
{
"code": "<string>",
"detail": "<string>",
"path": [
123
]
}
]
}Retrieve Account Returns (MWRR / TWRR)
Retrieve the account’s MWRR and TWRR for the requested period.
curl --request GET \
--url https://api.engine.usesophic.com/accounts/{account_id}/returns \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.engine.usesophic.com/accounts/{account_id}/returns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.engine.usesophic.com/accounts/{account_id}/returns', 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.engine.usesophic.com/accounts/{account_id}/returns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.engine.usesophic.com/accounts/{account_id}/returns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.engine.usesophic.com/accounts/{account_id}/returns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engine.usesophic.com/accounts/{account_id}/returns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"account": "<string>",
"flags": [
"inception_after_period_start"
],
"mwrr": "0.0925",
"period": "1d",
"period_end": "2026-07-14T09:34:12Z",
"period_start": "2026-01-01T00:00:00Z",
"twrr": "0.0875"
}{
"code": "<string>",
"detail": "<string>",
"context": {},
"docs": "<string>",
"params": [
{
"code": "<string>",
"detail": "<string>",
"path": [
123
]
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Predefined period over which returns are computed.
1d, 1w, 1m, this-month, 3m, 6m, ytd, 1y, all Response
OK
ID of the account the returns were computed for.
Signals explaining clamps, missing data, or uncomputable rates.
inception_after_period_start, missing_history, twrr_uncomputable, mwrr_uncomputable, xirr_no_sign_change, xirr_single_cashflow Cumulative money-weighted rate of return as a decimal; null when uncomputable.
"0.0925"
Requested period the returns were computed over.
1d, 1w, 1m, this-month, 3m, 6m, ytd, 1y, all Resolved end of the period (the asof time of the computation).
"2026-07-14T09:34:12Z"
Resolved start of the period, inclusive. Clamped to the scope's inception when the requested period starts earlier.
"2026-01-01T00:00:00Z"
Cumulative time-weighted rate of return as a decimal; null when uncomputable.
"0.0875"