src/
├── trades/
│ ├── limit/
│ │ └── ... (логика limit ордеров, controller, etc...)
│ ├── market/
│ │ └── ... (обработка маркет-ордеров)
│ ├── presets/
│ │ └── ... (обработка tp/sl пресетов)
│ └── listeners/
│ ├── auto-buy-bot/
│ │ └── ... обработка авто покупок
│ ├── auto-chat-buy-bot/
│ │ └── ... обработка авто покупок через chat бота
│ └── token-migrated-to-graduated/
│ └── ... обрабокта снайпина когда токен мигрирует
│
└── infrastructure/
├── jupiter/
│ └── ... (весь код, что нужен для работы с jupiter)
├── pumpfun/
│ └── ... (весь код, что нужен для работы с pump и pump amm)
├── raydium/
│ └── ... (весь код, что нужен для работы с raydium)
└── share/
└── ... (общий код, который может быть полезен для всех в этой области)https://app.yodao.dev-2-tech.ru/api-docs
run:
docker-compose up -d run database containernpx prisma db push --force-reset refresh database schemasnpm run seed seed databasenpm run start:dev run appopenssl rand -base64 32 (optional) generate a 256-bit (32-byte) Encryption
Key for JWT_SECRET or ENCRYPTION_KEYssh forge@206.189.63.102tail -f /home/forge/.forge/daemon-276032.log or
yodao-loggrep -A 100 "20e3f77d-a2d3-4dff-9978-5fd97a26e2de" /home/forge/.forge/daemon-276032.logyou need to start three containers specified in docker-compose.prod.yml:
node-exporter – collects system metrics.
Prometheus – receives metrics from node-exporter and forwards them to Grafana.
Grafana – visualizes the system metrics in a clear and convenient way.
sudo docker-compose -f docker-compose.prod.yml up -d run containers
sudo docker-compose -f docker-compose.prod.yml down down containers
Visit: http://app.yodao.dev-2-tech.ru:3005 and use the following credentials:
adminapNNY7m8kG6esUDAfter logging in, open the Dashboard and select yodao-system-metrics – all collected system metrics will be displayed.
start three containers specified in docker-compose.prod.yml:
Loki – stores logs and indexes.
Promtail – collects logs from a specified file and sends them to Loki (the file can be modified in the configuration).
Grafana – visualizes logs with search capabilities.
sudo docker-compose -f docker-compose.prod.yml up -d run containers
sudo docker-compose -f docker-compose.prod.yml down down containers
Visit: http://app.yodao.dev-2-tech.ru:3005 and use the following credentials:
After logging in, open the Dashboard and select nest-loki-logs. Here you will find predefined LogQL queries (the query language for Loki), but you can create your own queries if necessary.
install docker + docker-compose:
Example :sudo curl -L "https://github.com/docker/compose/releases/download/v2.34.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
/usr/local/bin/docker-compose --version
sudo apt install docker.io
docker --versionenter: http://app.yodao.dev-2-tech.ru:3005 (without HTTPS)
add data sources:
add dashboard for loki:
Nest framework TypeScript starter repository.
$ npm install# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:covnpx nest g mo module_name
npx nest g co controller_name
npx nest g s service_name
nest g resource (plural, e.g., "users")
npm i -D prisma
npx prisma init
npx prisma db pushIf db push anticipates that the changes could result in data loss, it will:
Throw an error Require the --accept-data-loss option if you still want to make
the changes
npx prisma db push --force-reset
Create a migration from changes in Prisma schema, apply it to the database, trigger generators (e.g. Prisma Client)
prisma migrate dev
Reset your database and apply all migrations
prisma migrate reset
Apply pending migrations to the database in production/staging
prisma migrate deploy
Helius https://docs.helius.dev/
DexScreener https://api.dexscreener.com/latest/dex/pairs/solana/C7QccNSB3kEUvtPL81o1UJLg2kbtX6ReZidBzWewng2Q
BitQuery https://docs.bitquery.io/docs/examples/Solana/Pump-Fun-API/
Jupiter https://jup.ag/swap/SOL-EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm
PumpFun https://pump.fun/board
PumpFunPortal https://pumpportal.fun/data-api/real-time/
Jito https://docs.jito.wtf/en/latest/lowlatencytxnsend.html#api
Jito Bundle Explorer https://explorer.jito.wtf/
Priority fee: https://solscan.io/analysis/fee_tracker
Example :[!CAUTION] NestJS does not handle uncaught exceptions by default. Uncaught exceptions (e.g., errors that aren’t caught within a try-catch or aren’t properly handled by an HTTP exception filter) will cause the application to crash.
.s$P*.s$$$s.`*T$$b T TP$P.d$P .sd$s.
.s$P .s$$$$$$$b. T$$b T:P d$$P.d$$$$$$bs.
d$$P d$$$$P'`T$$$b $$$;:$bd$$$$$$b`T$$*$$$b.
d$$P d$$$P' .+. *$$:$$$;.$$$P^*""*^b.$$b T$$$b
d$P .d$$$b.s$$$$$b TP^TP dP',d$$$$$s.`T$$b T$$$b
d$P d$$P T$$$P*""*^b.b d,P^*"*^T$$$$$$$b`T$b$$$$$.
,$P d$P .$$$P' `'*` `T$$$$$$$b`T$$$$$$
:$ d$P d$$$P `T$$$$$$b TPT$$$b
:$$d$$ d$$$P T$$$$$$b T.`T$$;
:$$$$$d$$$P T$$$$ $b T.T$$:
$$$$$P$$$$ T$$$$T$b T `T$
$P$$$;$$$; T$^$b Tb b :$
$`$$$ $$$; T.T$b TY$,:$
$:$$$ $$$' `$ T$; $$;'$
$;$$$;$$$ `b T; $$$ $
$:T$$;$$$ .d$$s. .s$$b..$;:$;$$$.T
/ __`*:$$$ *' `*Tb._ _.dP*' `*$;:$:$P__ \
..' .`.:$$$ `*Ts' `sP*' $$:$$P'. `,,
; / ,$$; .+s**s. `. .s**s+. T$:PP' \ :
: , /:$$; \ *ss* \ ; / *ss* / +: \ . ;
.` : $$;, .+s$$$s+. .+s$$$s+. .* ; ; ',
\ *.:$$,*d$P*"$$$T$b ,+**+, d$P*"$$$T$b* .* /
\ `$$;:$; +:$$$:$$;* *:$; +:$$$:$$; : /
$$; T$b._$$$d$P T$b._$$$d$P ;
`._.:$$, `*T$$$P*' `*T$$$P*' :._.'
|$$; ' |P$$b.
;`$$, :. , :b.`T$b
` T$$b._ `*.__.*' d$$b T$b
. *TP*' "" d$$$$b.:$;
\ dP T$$$$$$$
\ .+*"*--*"*+. d$b. T$$^$$$
`. :._.--..--._.; .'$$$$; $$ $$$
;. `. .' .' $$$$$ $P $$;
: `. `*----*' .' $$$$$ $b $P
| `. .' $$$$$Y$$dP
[bug] : `. .' :T$$P$$P,db.
/ `-. .-' dbT d$Pd$$$$b.
/ `****' d$$$PT$$$b T$$$b
.' d$$$P db`T$b T$$$b
_.' :$$$P.d$$b:$$$`$$$$;
_.-*' `. $$$$:$$$$$;$$$:$$$$$
`-. :$$$;$$$$$$$$$;$$$$$
`-. .-T$$$$P$$$$$P d$$$$;
`. `. .* .' T$$$b`T$P.sd$$$$P
`. `- ' .' `T$$b$$$$$$$$P'
`. .' `T.T$$$$P$$$b.
`. .' :$$$$P'd$$$$$;
`. .' $$$$$:d$;$$$$$.
`..' :$$$$;$$$b`T$$;
T$$$:$$$$; $$$
T$$$T$$$;d$$;
`T$b`T$$$$P
`*b T$P'