figiCapMarkets(Trading)

Mock Jutsu HOW-TO | UK

In the complex world of capital markets, maintaining accurate records for financial instruments is paramount. The Financial Instrument Global Identifier, or FIGI, serves as a non-proprietary identifier that simplifies data mapping across various trading platforms and exchanges. For developers building fintech applications, generating realistic test data is essential to ensure systems can handle these identifiers correctly. The mock-jutsu library provides a seamless way to generate high-quality mock data for this specific purpose, allowing engineering teams to simulate market environments without relying on production datasets.

The figi function within mock-jutsu strictly adheres to the OpenFIGI standard to provide maximum utility for capital markets testing. Each generated identifier follows a precise 12-character alphanumeric structure: a two-letter prefix, followed by the letter 'G', an eight-character National Securities Identifying Number (NSIN), and a final check digit calculated via the modified Luhn algorithm. By automating the creation of these strings, mock-jutsu ensures that every figi produced is syntactically valid, which is critical for validating checksum logic and data ingestion pipelines in trading software.

Utilising realistic test data is particularly beneficial when performing integration testing for order management systems (OMS) or portfolio management tools. Developers can use the figi generator to populate databases, test search functionalities, or verify that user interface components display instrument identifiers correctly. Since the library supports multiple interfaces, including a CLI tool, a native Python API, and even a JMeter plugin, it integrates effortlessly into existing CI/CD pipelines and performance testing suites. This flexibility allows for the rapid generation of thousands of unique identifiers in seconds, facilitating robust stress testing of financial databases.

Beyond basic validation, using mock-jutsu to generate a figi helps mitigate the risks associated with using sensitive or proprietary financial data during the development lifecycle. It empowers engineers to focus on building robust features while maintaining compliance with data privacy regulations. Whether you are benchmarking a high-frequency trading engine or developing a retail investment app, having access to reliable, on-demand mock data ensures your application remains resilient and ready for the demands of the global financial market.

CLI Usage
mockjutsu generate figimockjutsu bulk figi --count 10mockjutsu export figi --count 10 --format jsonmockjutsu export figi --count 10 --format csvmockjutsu export figi --count 10 --format sql
Python API
from mockjutsu import jutsujutsu.generate('figi')jutsu.bulk('figi', count=10)jutsu.template(['figi'], count=5)
JMeter
${__mockjutsu_markets(figi)}# JMeter Function: __mockjutsu_markets# Parameter 1: figi# Parameter 2: (not required for this function)
REST API
GET /generate/figi# → {"type":"figi","result":"...","status":"ok"}GET /bulk/figi?count=10POST /template {"types":["figi"],"count":1}

Other Languages