Practical overview
When it fits
Use it when you need a local exchange-style schema and API to study, prototype, or query with synthetic data, rather than a hosted venue for live trading.
Who it is for
- Developers prototyping exchange-style backend data models and REST services.
- Database-design learners examining how custody, trading, and money movement can be represented relationally.
- Analysts or students exploring SQL reports over synthetic exchange activity.
Documented uses
- Inspect and adapt relational tables for user records, wallets, assets, markets, orders, trades, and transactions.
- Load fabricated records into a PostgreSQL database for local development or query practice.
- Retrieve market pairs, OTC prices, wallet balances, and transaction history through the Flask API.
- Create or delete OTC and P2P order records through the documented API routes.
- Study the included analytical SQL queries and their CSV results.
Requirements & limits
The project is public on GitHub and licensed under MIT. The documented setup is self-hosted and requires PostgreSQL 14 or later and Python 3.10 or later.
- The design separates fiat and crypto wallet tables and models blockchain networks where an asset can exist on multiple chains.
- Order-book, OTC, and P2P activity are represented as distinct trade paths.
- The repository supplies both a smaller synthetic seed dataset and a full synthetic dataset.
- The Flask API is backed by local PostgreSQL configuration supplied through environment variables.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up the database and local API
Create the PostgreSQL schema, load the smaller synthetic dataset, and configure the Flask API to connect to it.
Before you start
- PostgreSQL 14 or later
- Python 3.10 or later
- Flask and psycopg2-binary
- A local PostgreSQL database and connection credentials
Steps
Create a database named crypto.
Run Postgresql/1_Creat_Tables.sql and Postgresql/1_2_Indexing.sql against that database.
Load Postgresql/seed_shorter_version.sql, or use seed.sql for the full synthetic dataset.
Install Flask and psycopg2-binary, set DB_NAME, DB_USER, DB_PASS, and DB_PORT, then run python API/api.py.
Expected outcome
A locally configured database populated with synthetic records and the Flask API started using the configured connection settings.
Guide limitations
- The setup instructions describe local database and API configuration; they do not establish that the service has been run or that endpoints have been verified.
- The included seed records are synthetic.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 8 October 2026
- Original website title
- erfnzdeh/crypto-exchange-postgres · Official homepage title · retained in its source language

