m8ty_client_custodyaccount
Paketübersicht
Abschnitt betitelt „Paketübersicht“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.
Bevor Sie beginnen
Abschnitt betitelt „Bevor Sie beginnen“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.
Alle benötigten Bibliotheken importieren
Abschnitt betitelt „Alle benötigten Bibliotheken importieren“ 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';Client-Einrichtung
Abschnitt betitelt „Client-Einrichtung“final client = M8tyClientCustodyaccount();client.setOAuthToken('ApiOAuth2', oauthToken);API-Oberfläche
Abschnitt betitelt „API-Oberfläche“CustodyAccountsApi
Abschnitt betitelt „CustodyAccountsApi“| Methode | Beschreibung |
|---|---|
searchCustodyAccounts |
Sucht nach den Depots des Benutzers |
fetchCustodyAccountById |
Ruft ein bestimmtes Depot ab |
CustodyPositionsApi
Abschnitt betitelt „CustodyPositionsApi“| 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 |
CustodyTransactionsApi
Abschnitt betitelt „CustodyTransactionsApi“| Methode | Beschreibung |
|---|---|
searchCustodyTransactions |
Sucht nach allen Transaktionen eines Depots |
fetchCustodyTransactionById |
Ruft eine bestimmte Depottransaktion ab |
So führen Sie verschiedene Aufgaben aus
Abschnitt betitelt „So führen Sie verschiedene Aufgaben aus“Hier einige Beispiele, wie der Dart-Client verwendet werden kann
Liste aller Depots abrufen
Abschnitt betitelt „Liste aller Depots abrufen“ 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, );Depot anhand der ID abrufen
Abschnitt betitelt „Depot anhand der ID abrufen“ 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}', ); }Liste aller Positionen abrufen
Abschnitt betitelt „Liste aller Positionen abrufen“ final client = M8tyClientCustodyaccount(); client.setOAuthToken('ApiOAuth2', oauthToken);
final api = client.getCustodyPositionsApi(); final Response<CustodyPositionsSearchResponseModel> response = await api.searchCustodyPositions( custodyAccountId: "123", custodyPositionsSearchRequestModel: custodyPositionsSearchRequestModel, );Position anhand der ID abrufen
Abschnitt betitelt „Position anhand der ID abrufen“ final client = M8tyClientCustodyaccount(); client.setOAuthToken('ApiOAuth2', oauthToken);
final api = client.getCustodyPositionsApi(); final Response<CustodyPositionModel> response = await api.fetchCustodyPositionById( custodyAccountId: "123", custodyAccountTransactionId: "789", );Liste aller Transaktionen abrufen
Abschnitt betitelt „Liste aller Transaktionen abrufen“ 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, );Depottransaktion anhand der ID abrufen
Abschnitt betitelt „Depottransaktion anhand der ID abrufen“ final client = M8tyClientCustodyaccount(); client.setOAuthToken('ApiOAuth2', oauthToken);
final api = client.getCustodyTransactionsApi(); final Response<CustodyPositionModel> response = await api.fetchCustodyTransactionById( custodyAccountId: "123", custodyAccountTransactionId: "789", );© m8ty GmbH 2023 · m8ty.eu
