finhay-trading

Installation
SKILL.md

Finhay Trading

Stock order execution via the Finhay Securities Open API. Real money operations — every action is irreversible once matched on the exchange.

MANDATORY — credentials: Ensure credentials are set (via environment variables FINHAY_API_KEY/FINHAY_API_SECRET or via ./finhay.sh auth). Run ./finhay.sh doctor to verify. If IDs are missing, run ./finhay.sh infer.

MANDATORY — order sub-account: Order execution only uses the sub-account whose subAccountExt ends in .4 (a dedicated account provisioned by Finhay for Open API order routing). After ./finhay.sh infer, the env vars SUB_ACCOUNT_ORDER and SUB_ACCOUNT_EXT_ORDER are populated only when such an account exists in the user's account list. If either is empty, the user does not have an order-execution-capable account — stop immediately and report:

Tài khoản đặt lệnh không tồn tại. Bạn chưa được cấp sub-account hỗ trợ đặt lệnh (subAccountExt kết thúc bằng .4). Vui lòng liên hệ Finhay Securities để đăng ký tài khoản đặt lệnh trước khi sử dụng tính năng đặt/sửa/huỷ lệnh.

Do not fall back to $SUB_ACCOUNT_NORMAL / $SUB_ACCOUNT_MARGIN — orders sent on those accounts will be rejected.

For portfolio queries (balance, holdings, P&L, order history), use the finhay-portfolio skill. This skill is for execution only.

Usage Examples

# Verify the order sub-account exists before any action (fail fast)
[ -z "$SUB_ACCOUNT_ORDER" ] && { echo "❌ Tài khoản đặt lệnh không tồn tại (subAccountExt phải kết thúc bằng .4). Liên hệ Finhay Securities để đăng ký." >&2; exit 1; }
Installs
7
First Seen
Jun 3, 2026
finhay-trading — finhay/finhay-skills-hub