Портфели, создание счетов, ручные события, PATCH инструмента, ScopeCardOut, MetricsStatusOut, логотипы в HoldingOut.
10 KiB
fintracker_api.api.AnalyticsApi
Load the API package
import 'package:fintracker_api/api.dart';
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| analyticsAllocation | GET /api/v1/analytics/allocation | Allocation |
| analyticsCashflowBroker | GET /api/v1/analytics/cashflow-broker | Cashflow Broker |
| analyticsHoldings | GET /api/v1/analytics/holdings | Holdings |
| analyticsOverview | GET /api/v1/analytics/overview | Overview |
| analyticsReturns | GET /api/v1/analytics/returns | Returns |
| analyticsScopes | GET /api/v1/analytics/scopes | Scopes |
| analyticsSummary | GET /api/v1/analytics/summary | Summary |
| analyticsValueSeries | GET /api/v1/analytics/value-series | Value Series |
analyticsAllocation
List analyticsAllocation(scope, dimension)
Allocation
Buckets of one dimension (or all four), largest first.
Example
import 'package:fintracker_api/api.dart';
final api = FintrackerApi().getAnalyticsApi();
final String scope = scope_example; // String | all | account:<id> | portfolio:<id>
final AllocationDimension dimension = ; // AllocationDimension |
try {
final response = api.analyticsAllocation(scope, dimension);
print(response);
} on DioException catch (e) {
print('Exception when calling AnalyticsApi->analyticsAllocation: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| scope | String | all | account: |
| dimension | AllocationDimension | [optional] |
Return type
Authorization
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]
analyticsCashflowBroker
List analyticsCashflowBroker(scope)
Cashflow Broker
Money moved across the brokerage boundary, by month: the other half of cash flow that metric_cash_flow_monthly (ZenMoney spending) does not cover.
Example
import 'package:fintracker_api/api.dart';
final api = FintrackerApi().getAnalyticsApi();
final String scope = scope_example; // String | all | account:<id> | portfolio:<id>
try {
final response = api.analyticsCashflowBroker(scope);
print(response);
} on DioException catch (e) {
print('Exception when calling AnalyticsApi->analyticsCashflowBroker: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| scope | String | all | account: |
Return type
Authorization
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]
analyticsHoldings
List analyticsHoldings(scope)
Holdings
Open positions, most valuable first; unpriced ones last with null values.
Example
import 'package:fintracker_api/api.dart';
final api = FintrackerApi().getAnalyticsApi();
final String scope = scope_example; // String | all | account:<id> | portfolio:<id>
try {
final response = api.analyticsHoldings(scope);
print(response);
} on DioException catch (e) {
print('Exception when calling AnalyticsApi->analyticsHoldings: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| scope | String | all | account: |
Return type
Authorization
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]
analyticsOverview
List analyticsOverview()
Overview
One card per scope for the home screen, in a single round trip. all first, then the portfolios, then the accounts by value. A scope holding nothing at all is left out: a card of zeros is noise, not an answer.
Example
import 'package:fintracker_api/api.dart';
final api = FintrackerApi().getAnalyticsApi();
try {
final response = api.analyticsOverview();
print(response);
} on DioException catch (e) {
print('Exception when calling AnalyticsApi->analyticsOverview: $e\n');
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
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]
analyticsReturns
List analyticsReturns(scope)
Returns
XIRR and TWR per period, shortest first.
Example
import 'package:fintracker_api/api.dart';
final api = FintrackerApi().getAnalyticsApi();
final String scope = scope_example; // String | all | account:<id> | portfolio:<id>
try {
final response = api.analyticsReturns(scope);
print(response);
} on DioException catch (e) {
print('Exception when calling AnalyticsApi->analyticsReturns: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| scope | String | all | account: |
Return type
Authorization
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]
analyticsScopes
List analyticsScopes()
Scopes
Every set of accounts the metrics were built for.
Example
import 'package:fintracker_api/api.dart';
final api = FintrackerApi().getAnalyticsApi();
try {
final response = api.analyticsScopes();
print(response);
} on DioException catch (e) {
print('Exception when calling AnalyticsApi->analyticsScopes: $e\n');
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
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]
analyticsSummary
SummaryOut analyticsSummary(scope)
Summary
One screen's worth: the latest day, the totals it adds up to, and the returns.
Example
import 'package:fintracker_api/api.dart';
final api = FintrackerApi().getAnalyticsApi();
final String scope = scope_example; // String | all | account:<id> | portfolio:<id>
try {
final response = api.analyticsSummary(scope);
print(response);
} on DioException catch (e) {
print('Exception when calling AnalyticsApi->analyticsSummary: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| scope | String | all | account: |
Return type
Authorization
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]
analyticsValueSeries
List analyticsValueSeries(scope, from, to)
Value Series
Daily portfolio value; defaults to the last 365 days.
Example
import 'package:fintracker_api/api.dart';
final api = FintrackerApi().getAnalyticsApi();
final String scope = scope_example; // String | all | account:<id> | portfolio:<id>
final DateTime from = 2013-10-20; // DateTime |
final DateTime to = 2013-10-20; // DateTime |
try {
final response = api.analyticsValueSeries(scope, from, to);
print(response);
} on DioException catch (e) {
print('Exception when calling AnalyticsApi->analyticsValueSeries: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| scope | String | all | account: |
| from | DateTime | [optional] | |
| to | DateTime | [optional] |
Return type
Authorization
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]