SecuritiesFakers 0.2.0

dotnet add package SecuritiesFakers --version 0.2.0
                    
NuGet\Install-Package SecuritiesFakers -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SecuritiesFakers" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SecuritiesFakers" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="SecuritiesFakers" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SecuritiesFakers --version 0.2.0
                    
#r "nuget: SecuritiesFakers, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SecuritiesFakers@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SecuritiesFakers&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=SecuritiesFakers&version=0.2.0
                    
Install as a Cake Tool

<h1 align="center">SecuritiesFakers</h1>

<p align="center"> <a href="https://github.com/thomas-fazzari/SecuritiesFakers/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/thomas-fazzari/SecuritiesFakers/ci.yml?branch=master&style=flat-square&labelColor=11111B&label=CI&logo=githubactions&logoColor=white" alt="CI"></a> <a href="https://codecov.io/gh/thomas-fazzari/SecuritiesFakers"><img src="https://img.shields.io/codecov/c/github/thomas-fazzari/SecuritiesFakers?style=flat-square&label=Coverage&labelColor=11111B&logo=codecov&logoColor=white" alt="Coverage"></a> <a href="https://www.nuget.org/packages/SecuritiesFakers"><img src="https://img.shields.io/nuget/v/SecuritiesFakers?style=flat-square&labelColor=11111B&label=Version&logo=nuget&logoColor=white&color=313244" alt="Package version"></a> <a href="#license"><img src="https://img.shields.io/badge/License-MIT%20%2B%20CC%20BY%204.0-313244?style=flat-square&labelColor=11111B&logo=opensourceinitiative&logoColor=white" alt="MIT and CC BY 4.0 License"></a> </p>

Generate realistic security identifiers with Bogus.

SecuritiesFakers ships an embedded dataset of exchange-listed instruments. It returns real ISINs, tickers, MICs, currencies, and issuer countries without performing any network calls at runtime.

Install

dotnet add package SecuritiesFakers

Use

using Bogus;
using SecuritiesFakers;

var faker = new Faker();

var isin = faker.Securities().Isin();
var ticker = faker.Securities().Ticker();
var instrument = faker.Securities().One();
var frenchIsin = faker.Securities().Isin(filter => filter.FromCountry("FR"));
var nasdaqTicker = faker.Securities().Nasdaq().Ticker();
var euroInstrument = faker.Securities().One(filter => filter.WithCurrency("EUR"));

Presets

Markets

Market presets restrict generation by listing exchange MIC. They can be combined with regular filters.

var usTicker = faker.Securities().UnitedStates().Ticker();
var londonInstrument = faker.Securities().London().One();
var nasdaqTickers = faker.Securities().Nasdaq().Tickers(10);

Market presets:

Method Markets MICs
UnitedStates() NYSE, Nasdaq XNYS, XNAS
Canada() Toronto XTSE
London() London XLON
Euronext() Amsterdam, Paris XAMS, XPAR
Frankfurt() Frankfurt XFRA
Switzerland() Swiss Exchange XSWX
HongKong() Hong Kong XHKG

Exchange presets use PascalCase MIC method names plus common aliases.

MIC Method Aliases Market
Xams() Amsterdam() Amsterdam
Xasx() Asx() Australian Securities Exchange
Xbom() Bse() Bombay Stock Exchange
Xfra() Frankfurt() Frankfurt
Xhkg() HongKong() Hong Kong
Xjpx() Jpx() Japan Exchange Group
Xkrx() Krx() Korea Exchange
Xlon() London() London Stock Exchange
Xmad() Madrid() Madrid
Xmil() Milan() Milan
Xnas() Nasdaq() Nasdaq
Xnys() Nyse() New York Stock Exchange
Xpar() Paris() Paris
Xswx() SwissExchange() Swiss Exchange
Xtse() Toronto() Toronto Stock Exchange

Batch

Batch methods return unique values within one call.

var isins = faker.Securities().Isins(10);
var tickers = faker.Securities().Tickers(10);
var instruments = faker.Securities().Instruments(10);

Strict mode throws when the filtered pool is too small.

faker.Securities().Xkrx().Isins(100);

Best-effort mode returns as many values as possible.

var values = faker.Securities().Xkrx().Isins(100, mode: StrictMode.BestEffort);

Filters

Filters are case-insensitive.

Note: Exchange presets cover the embedded dataset, so FromExchange is rarely needed. It remains available for custom MICs.

var instruments = faker.Securities().Instruments(
    25,
    filter => filter
        .FromCountry("US")
        .FromExchange("XNAS")
        .WithCurrency("USD")
);

Supported fields:

Method Meaning Example
FromCountry ISIN country prefix US, FR, DE
FromExchange ISO 10383 MIC XNAS, XNYS, XPAR
WithCurrency ISO 4217 currency USD, EUR, GBP

Targets

SecuritiesFakers targets net8.0 and net10.0.

License

Library code is licensed under MIT. The embedded dataset is derived from FinanceDatabase and is licensed under CC BY 4.0.

See THIRD-PARTY-NOTICES.md for source commit, attribution, and transformation details.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

  • net8.0

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 86 5/9/2026
0.1.4 81 5/9/2026
0.1.3 88 5/7/2026