88b7fb7a0a
Forked from crypto_monitor OKX instance (copy-only). Keeps standalone options, perp-options and options-options hedge; drops standalone perp entrypoints; forces coin margin; adds sim wallets; default port 5010. Co-authored-by: Cursor <cursoragent@cursor.com>
34 lines
1.1 KiB
Python
34 lines
1.1 KiB
Python
"""Repository path helpers for lib/ assets."""
|
|
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
LIB_DIR = Path(__file__).resolve().parent
|
|
REPO_ROOT = LIB_DIR.parent
|
|
|
|
|
|
def strategy_templates_dir(repo_root: str | Path | None = None) -> str:
|
|
root = Path(repo_root) if repo_root is not None else REPO_ROOT
|
|
return str(root / "lib" / "strategy" / "templates")
|
|
|
|
|
|
def embed_templates_dir(repo_root: str | Path | None = None) -> str:
|
|
root = Path(repo_root) if repo_root is not None else REPO_ROOT
|
|
return str(root / "lib" / "instance" / "templates")
|
|
|
|
|
|
def common_static_dir(repo_root: str | Path | None = None) -> str:
|
|
root = Path(repo_root) if repo_root is not None else REPO_ROOT
|
|
return str(root / "lib" / "common" / "static")
|
|
|
|
|
|
def manual_trading_hub_dir(repo_root: str | Path | None = None) -> Path:
|
|
root = Path(repo_root) if repo_root is not None else REPO_ROOT
|
|
return root / "manual_trading_hub"
|
|
|
|
|
|
def hub_data_dir(repo_root: str | Path | None = None) -> Path:
|
|
path = manual_trading_hub_dir(repo_root) / "data"
|
|
path.mkdir(parents=True, exist_ok=True)
|
|
return path
|