Files
Dmitry ccd06f32f7 chore(app): сгенерированный Dart-клиент
just gen-client — покрывает links, cashflow-broker, ручные цены,
imports/pending, goals/income/rebalance/tax/benchmarks.
2026-09-19 10:46:09 +03:00

6.3 KiB

fintracker_api.api.BenchmarksApi

Load the API package

import 'package:fintracker_api/api.dart';

All URIs are relative to http://localhost

Method HTTP request Description
benchmarksBenchmarks GET /api/v1/analytics/benchmarks Benchmarks
benchmarksCreate POST /api/v1/benchmarks Create
benchmarksDelete DELETE /api/v1/benchmarks/{benchmark_id} Delete
benchmarksList GET /api/v1/benchmarks List
benchmarksPatch PATCH /api/v1/benchmarks/{benchmark_id} Patch

benchmarksBenchmarks

BenchmarkComparison benchmarksBenchmarks(scope, period)

Benchmarks

The portfolio's TWR beside each benchmark's, on the same grid of days. days_skipped is returned on both sides and is not cosmetic: a non-zero value on either means the two chains did not cover the same days, and the difference is then an approximation of an excess return rather than one.

Example

import 'package:fintracker_api/api.dart';

final api = FintrackerApi().getBenchmarksApi();
final String scope = scope_example; // String | all | account:<id> | portfolio:<id>
final List<String?> period = ; // List<String?> | repeatable: 1m 3m 6m ytd 1y 3y all

try {
    final response = api.benchmarksBenchmarks(scope, period);
    print(response);
} on DioException catch (e) {
    print('Exception when calling BenchmarksApi->benchmarksBenchmarks: $e\n');
}

Parameters

Name Type Description Notes
scope String all account:
period List<String?> repeatable: 1m 3m 6m ytd 1y 3y all [optional]

Return type

BenchmarkComparison

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

benchmarksCreate

BenchmarkOut benchmarksCreate(benchmarkCreate)

Create

Example

import 'package:fintracker_api/api.dart';

final api = FintrackerApi().getBenchmarksApi();
final BenchmarkCreate benchmarkCreate = ; // BenchmarkCreate | 

try {
    final response = api.benchmarksCreate(benchmarkCreate);
    print(response);
} on DioException catch (e) {
    print('Exception when calling BenchmarksApi->benchmarksCreate: $e\n');
}

Parameters

Name Type Description Notes
benchmarkCreate BenchmarkCreate

Return type

BenchmarkOut

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

benchmarksDelete

benchmarksDelete(benchmarkId)

Delete

Example

import 'package:fintracker_api/api.dart';

final api = FintrackerApi().getBenchmarksApi();
final int benchmarkId = 56; // int | 

try {
    api.benchmarksDelete(benchmarkId);
} on DioException catch (e) {
    print('Exception when calling BenchmarksApi->benchmarksDelete: $e\n');
}

Parameters

Name Type Description Notes
benchmarkId int

Return type

void (empty response body)

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

benchmarksList

List benchmarksList()

List

Every benchmark, defaults first — the order the comparison block shows them in.

Example

import 'package:fintracker_api/api.dart';

final api = FintrackerApi().getBenchmarksApi();

try {
    final response = api.benchmarksList();
    print(response);
} on DioException catch (e) {
    print('Exception when calling BenchmarksApi->benchmarksList: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

List<BenchmarkOut>

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

benchmarksPatch

BenchmarkOut benchmarksPatch(benchmarkId, benchmarkPatch)

Patch

Example

import 'package:fintracker_api/api.dart';

final api = FintrackerApi().getBenchmarksApi();
final int benchmarkId = 56; // int | 
final BenchmarkPatch benchmarkPatch = ; // BenchmarkPatch | 

try {
    final response = api.benchmarksPatch(benchmarkId, benchmarkPatch);
    print(response);
} on DioException catch (e) {
    print('Exception when calling BenchmarksApi->benchmarksPatch: $e\n');
}

Parameters

Name Type Description Notes
benchmarkId int
benchmarkPatch BenchmarkPatch

Return type

BenchmarkOut

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]