1
This commit is contained in:
1 parent
2ea1a79bda
commit
85425483c0
50 files changed
+6468
-1854
No files matched your search
@@ -28,6 +28,8 @@
|
||||
|
||||
### Установка вручную через PowerShell
|
||||
|
||||
Python 3.11+; dependencies are pinned in `requirements.txt`. Recovery semantics, module layout and offline tests: [docs/reliability.md](docs/reliability.md).
|
||||
|
||||
```powershell
|
||||
cd C:\Crypto_Scam
|
||||
py -3 -m venv .venv
|
||||
@@ -88,7 +90,52 @@ py -3 -m venv .venv
|
||||
|
||||
`scalp_paper.py` и `algo_hunter.py` содержат экспериментальные модели по стакану, imbalance, микроцене и повторяющимся заявкам. Они предназначены для dry-run и анализа: видимый агрегированный стакан не позволяет надёжно доказать наличие конкретного маркет-мейкера или реальную очередь исполнения.
|
||||
|
||||
<<<<<<< HEAD
|
||||
**Web interface** (`py -3 web_sim.py` or `run_web_sim.bat` → [local page](http://127.0.0.1:8765), opens in the
|
||||
browser): every coin has its own feeds, trade history and Start/Stop. A new coin starts stopped; Stop forbids
|
||||
new entries while existing positions remain managed. All paper coins in «Симулятор» and «Арбитраж → Симуляция»
|
||||
use **one virtual account**, persisted in `web_sim_data/virtual_account.json`. The Tk window
|
||||
(`py -3 scalp_hint.py`) and the main desktop application keep their separate accounts.
|
||||
|
||||
The «Общий виртуальный счёт» panel shows balance, equity, reserved capital and free capital. Enter a positive
|
||||
amount and click «Пополнить» to add it or «Списать» to subtract it; the journal shows recent operations newest
|
||||
first. These are virtual adjustments, not exchange transfers, and do not change the recorded trading result.
|
||||
Free capital is `max(0, min(balance, equity) - reserved)`: unrealized profits cannot fund another entry, while
|
||||
unrealized losses reduce the available amount. Every paper entry must fit the shared capital limit, including
|
||||
its reserve and fees. Withdrawals cannot exceed free capital and are refused if an open position's valuation
|
||||
is older than 30 seconds. Deposits remain available with a working connection. The initial deposit comes once
|
||||
from the old common budget (default 300 $); initial balances of individual coins are not added together.
|
||||
|
||||
Open paper positions, their reserved capital and strategy exit state survive a restart. The shared account
|
||||
snapshot is authoritative for the attached coin and paper-arbitrage engines; old closed trades remain available
|
||||
as history. Restored valuations remain stale until fresh quotes arrive. «Сбросить статистику» does not replenish
|
||||
the virtual account and is refused while the selected engine has open positions or unfinished real execution.
|
||||
Changing a coin between simulation and real trading also requires both modes to be free of open positions and
|
||||
unfinished orders. Real mode uses a **separate private signal ledger**, not the common virtual wallet: virtual
|
||||
top-ups, withdrawals and paper profits cannot change real order sizing or allow real entries. Exchange balances
|
||||
and the real execution gate determine whether those orders can be sent.
|
||||
|
||||
The top status bar distinguishes the selected mode from connection health. A failed initial request is retried
|
||||
by the read polling loop; missing or stale server data disables commands until reconnection. Submitted trading
|
||||
commands are never automatically retried. The separate «Справка» button opens a searchable reference covering
|
||||
terms, every exposed setting, strategy modes, account controls, API keys, the scanner and the budget calculator.
|
||||
|
||||
Common coin settings are applied with «Применить ко всем монетам» and stored in `web_sim_data/settings.json`;
|
||||
the first start copies the Tk window's settings. The former editable per-coin budget is replaced by the shared
|
||||
account controls. Arbitrage simulation and real trading retain separate settings and unsaved drafts when
|
||||
switching between them in the current browser page. Coin tiles show the trading status, open positions, price,
|
||||
result and win rate. The centre shows both prices as percentage changes over 1/5/10 minutes, entry/exit markers,
|
||||
the selected coin's statistics, Start/Stop, «Закрыть все позиции» and the trade table. Open positions appear in
|
||||
yellow with a close button; closed trades follow newest first.
|
||||
|
||||
The last tile «+» opens the **scanner panel**: start/stop of `meme_matcher/autoscan.py`, its log and checked coins.
|
||||
«+ Добавить» adds a supported pool/futures pair stopped and ready to test. «Добавлять найденные автоматически»
|
||||
allows automatic additions (off by default; `meme_matcher/autoscan_config.json`); new connections appear within
|
||||
30 seconds. Removing a pair first stops new entries and requests closing its exposure. If execution or recovery
|
||||
is unfinished, the connection stays available for management; the removal intent survives restart.
|
||||
=======
|
||||
## Реальная торговля и API-ключи
|
||||
>>>>>>> main
|
||||
|
||||
Используйте реальную торговлю только после проверки в симуляции и на Testnet.
|
||||
|
||||
@@ -102,7 +149,15 @@ py -3 -m venv .venv
|
||||
|
||||
В проекте предусмотрены отдельные состояния виртуального и реального счёта. Они не смешиваются. Для реального режима учитывайте funding, проскальзывание, минимальный размер ордера, задержку сети и риск ликвидации при усреднении или плече.
|
||||
|
||||
<<<<<<< HEAD
|
||||
**Local proxy with a VPN on**: `run_web_sim.bat` starts the engine on `127.0.0.1:8766`
|
||||
(`python.exe`) and the page proxy on `127.0.0.1:8765` (`pythonw.exe`). The page remains local even when
|
||||
`pythonw.exe` is excluded from the VPN. Both processes validate the original local Host and browser Origin;
|
||||
POST commands require the page's `X-Sim` header. The app is not configured for public internet hosting.
|
||||
`py -3 web_sim.py` serves the page directly on `127.0.0.1:8765`.
|
||||
=======
|
||||
## VPN, внешний доступ и безопасность
|
||||
>>>>>>> main
|
||||
|
||||
- Если биржи не отдают цены, проверьте VPN и доступ к публичным API.
|
||||
- По умолчанию страница доступна только локально через `127.0.0.1`; это безопаснее, чем открывать её в интернет.
|
||||
|
||||
Reference in new issue
Block a user