Skip to content

Instantly share code, notes, and snippets.

View tripolskypetr's full-sized avatar
💻
Fueled by a passion for software design

Petr Tripolsky tripolskypetr

💻
Fueled by a passion for software design
View GitHub Profile
# A Full-Fledged Trading Engine for the Node.js Ecosystem
> You can check out [the project repo here](https://github.com/tripolskypetr/backtest-kit)
![](https://habrastorage.org/r/w1560/getpro/habr/upload_files/a8c/e63/1f9/a8ce631f90fb8048c239226d356c5731.jpg)
Over the past five years the Node.js ecosystem has stabilized. Nothing fundamentally new shows up in it: we discuss why Fastify beats Express, choose between Prisma and Drizzle, argue about ESM versus CommonJS, and swap one bundler for another that does the same thing, only faster. The niches are taken, the tools are mature, the hype has moved to neighboring runtimes. That is good news for production and boring news for an engineer.
Which makes it all the more interesting when an entire new application domain opens up in the ecosystem.

SDK maqsadli arxitekturasi

TODO

TadSigningSDK faqat bitta metodni taqdim etadi — sign(dto). Bank ilovasining dasturchisi bitta qator yozadi:

let result = await TadSigning.sign(dto: ["amount": 1000, "to": "IBAN..."])
@tripolskypetr
tripolskypetr / HOWTO.md
Created May 10, 2026 13:33
Signing SDK

Signature Validation HOWTO

Каждый успешный ответ сервера содержит поле signature — JWT, подписанный приватным ключом сервера по алгоритму RS256 со временем жизни 15 минут.

SDK должен верифицировать signature сразу после получения ответа, до использования данных из data. Это исключает MITM: атакующий не может сфабриковать валидную подпись без приватного ключа сервера.


sudo systemctl stop docker.socket
sudo systemctl stop docker
sudo systemctl stop containerd
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd
sudo systemctl start docker
sudo systemctl start docker.socket
sudo systemctl start containerd
@tripolskypetr
tripolskypetr / report.json
Created April 13, 2026 20:02
report.json
{
"report": {
"date": "01 февраля 2026 09:00 UTC",
"instruments": ["BTC"],
"prepared_for": "Краткосрочный трейдинг (1 час)",
"summary": {
"bias": "NEUTRAL-LOW / BEARISH",
"overall_sentiment": "Рынок в состоянии сильного страха, продолжается отток ликвидности, BTC упал ниже $80K",
"key_levels_btc": {
"current_price": 78978.73,
//@version=5
indicator("SuperTrend", overlay=true)
plotcandle(open, high, low, close,
color = close > open ? color.new(color.green, 70) : color.new(color.red, 70),
wickcolor = color.new(color.gray, 70),
bordercolor = color.new(color.gray, 70))
atrPeriod = input(10, "ATR Period")
factor = input(3.0, "Factor")
import { Subject, singleshot, randomString } from "functools-kit";
declare global {
interface Window {
onFetchApiResponse: (requestId: string, text: string) => void;
AndroidBinding: {
beginFetchApi: (requestId: string, url: string, totalChunks: number) => void;
sendFetchApiChunk: (requestId: string, chunkIndex: number, chunk: string) => void;
endFetchApi: (requestId: string, contentLength: number) => void;
};
@tripolskypetr
tripolskypetr / terminal.txt
Created December 23, 2025 08:37 — forked from joulgs/terminal.txt
How install libssl1.1 on ubuntu 22.04
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
@tripolskypetr
tripolskypetr / README.md
Last active December 22, 2025 08:55
FX Cache Demo - Демонстрация критических проблем в финансовых системах

FX Cache Demo - Демонстрация критических проблем в финансовых системах

Этот проект воспроизводит три критические уязвимости в системе обработки курсов валют и банковского клиринга, которые приводят к финансовым потерям и проблемам производительности.

Проблема 1: Устаревшие курсы валют без кеширования

Описание проблемы