Help Instance Help

m8ty_client_securities

Securities client for searching, listing, and fetching details of securities, stock exchanges, and realtime prices.

Before you start

Check the documentation of the m8ty_client_securities library.

Import all needed libraries

import 'package:dio/dio.dart'; import 'package:m8ty_client_securities/m8ty_client_securities.dart';

Client Setup

final client = M8tyClientSecurities(); client.setOAuthToken('ApiOAuth2', oauthToken);

API Surface

SecuritiesApi

Method

Description

searchSecurities

Search for securities

fetchSecurityById

Get security details

SecurityListingApi

Method

Description

searchSecurityListing

Search in the list of securities

fetchSecurityListingById

Get security listing details

SecurityTypesApi

Method

Description

searchSecurityTypes

Get all security types

fetchSecurityTypeById

Get security type details

StockExchangesApi

Method

Description

searchStockExchanges

Search for stock exchanges

fetchStockExchangeById

Get stock exchange details

RealtimePriceApi

Method

Description

fetchRealtimePrice

Get realtime price for a security on a certain stock exchange

How to perform different tasks

Here some examples how the dart client can be used

Search for securities

final client = M8tyClientSecurities(); client.setOAuthToken('ApiOAuth2', oauthToken); final api = client.getSecuritiesApi(); try { final response = await api.searchSecurities( // provide search parameters ); print('Securities: ${response.data}'); } on DioException catch (e) { throw Exception( 'Request failed (status: ${e.response?.statusCode}): ${e.response?.data}', ); }

Fetch realtime price

final client = M8tyClientSecurities(); client.setOAuthToken('ApiOAuth2', oauthToken); final api = client.getRealtimePriceApi(); try { final response = await api.fetchRealtimePrice( securityNumber: '1234', stockExchangeId: 'SIX', currencyIsoCode: IsoCurrencyEnumModel.CHF, ); print('Price: ${response.data}'); } on DioException catch (e) { throw Exception( 'Request failed (status: ${e.response?.statusCode}): ${e.response?.data}', ); }

Search stock exchanges

final client = M8tyClientSecurities(); client.setOAuthToken('ApiOAuth2', oauthToken); final api = client.getStockExchangesApi(); final response = await api.searchStockExchanges();
03 June 2026