Zum Inhalt springen

m8ty_client_custodyaccount

m8ty_client_custodyaccount löst dies, indem es Depots, Positionen, Übersichten und Transaktionen über typisierte APIs bereitstellt und so ein transparentes Depot- und Investment-Reporting in der App ermöglicht.

Der Custody-Account-Informationsdienst deckt alle Aspekte von Depots, Transaktionen und Positionen ab.

Sehen Sie sich die Dokumentation der Bibliothek m8ty_client_custodyaccount an, um sich einen Überblick über die verfügbaren Modelle und ihre Eigenschaften zu verschaffen.

import 'package:dio/dio.dart';
import 'package:m8ty_client_custodyaccount/m8ty_client_custodyaccount.dart';
import 'package:m8ty_client_common/m8ty_client_common.dart';
import 'package:built_collection/built_collection.dart';
final client = M8tyClientCustodyaccount();
client.setOAuthToken('ApiOAuth2', oauthToken);
Methode Beschreibung
searchCustodyAccounts Sucht nach den Depots des Benutzers
fetchCustodyAccountById Ruft ein bestimmtes Depot ab
Methode Beschreibung
searchCustodyPositions Sucht nach allen Positionen eines Depots
fetchCustodyPositionById Ruft eine bestimmte Depotposition ab
getCustodyPositionsOverview Ruft die Positionsübersicht für ein einzelnes Depot ab
Methode Beschreibung
searchCustodyTransactions Sucht nach allen Transaktionen eines Depots
fetchCustodyTransactionById Ruft eine bestimmte Depottransaktion ab

Hier einige Beispiele, wie der Dart-Client verwendet werden kann

final client = M8tyClientCustodyaccount();
client.setOAuthToken('ApiOAuth2', oauthToken);
final api = client.getCustodyAccountsApi();
final custodyAccountSearchRequestModel = CustodyAccountSearchRequestModel((b) => b
..customerId = "1234"
..portfolioId = "78");
final Response<CustodyAccountSearchResponseModel> response = await api.searchCustodyAccounts(
custodyAccountSearchRequestModel: custodyAccountSearchRequestModel,
page: 1,
size: 100,
);
final client = M8tyClientCustodyaccount();
client.setOAuthToken('ApiOAuth2', oauthToken);
final api = client.getCustodyAccountsApi();
try {
final Response<CustodyAccountModel> response = await api.fetchCustodyAccountById(
custodyAccountId: "1234",
);
} on DioException catch (e) {
throw Exception(
'Request failed (status: ${e.response?.statusCode}): ${e.response?.data}',
);
}
final client = M8tyClientCustodyaccount();
client.setOAuthToken('ApiOAuth2', oauthToken);
final api = client.getCustodyPositionsApi();
final Response<CustodyPositionsSearchResponseModel> response = await api.searchCustodyPositions(
custodyAccountId: "123",
custodyPositionsSearchRequestModel: custodyPositionsSearchRequestModel,
);
final client = M8tyClientCustodyaccount();
client.setOAuthToken('ApiOAuth2', oauthToken);
final api = client.getCustodyPositionsApi();
final Response<CustodyPositionModel> response = await api.fetchCustodyPositionById(
custodyAccountId: "123",
custodyAccountTransactionId: "789",
);
final custodyTransactionSearchRequestModel = CustodyTransactionSearchRequestModel((b) => b
..orderId = "123"
..positionId = "789",
);
final client = M8tyClientCustodyaccount();
client.setOAuthToken('ApiOAuth2', oauthToken);
final api = client.getCustodyTransactionsApi();
final Response<CustodyTransactionSearchResponseModel> response = await api.searchCustodyTransactions(
custodyAccountId: "123",
custodyTransactionSearchRequestModel: custodyTransactionSearchRequestModel,
page: 1,
size: 100,
);
final client = M8tyClientCustodyaccount();
client.setOAuthToken('ApiOAuth2', oauthToken);
final api = client.getCustodyTransactionsApi();
final Response<CustodyPositionModel> response = await api.fetchCustodyTransactionById(
custodyAccountId: "123",
custodyAccountTransactionId: "789",
);