Loading...
Loading...
Owner identity, account balance, portfolio, orders, and profit/loss. Use when user asks about their account identity, account balance, total assets, trading account, stock holdings, order history, or today's PnL.
npx skill4agent add finhay-pro/finhay-skills-hub finhay-portfolioGETMANDATORY: Before any action, read and complete pre-flight checks. Required:,FINHAY_API_KEY,FINHAY_API_SECRET, and the relevantUSER_IDvariable. Do not skip or defer.SUB_ACCOUNT_*
USER_IDSUB_ACCOUNT_*./_shared/scripts/infer-sub-account.shUSER_IDSUB_ACCOUNT_NORMALSUB_ACCOUNT_MARGIN~/.finhay/credentials/.envrequest.sh{subAccountId}{userId}source ~/.finhay/credentials/.env
./_shared/scripts/request.sh GET "/trading/accounts/$SUB_ACCOUNT_NORMAL/summary"
./_shared/scripts/request.sh GET "/users/v4/users/$USER_ID/assets/summary"
./_shared/scripts/request.sh GET "/trading/sub-accounts/$SUB_ACCOUNT_MARGIN/orders" "fromDate=2024-01-01&toDate=2024-01-31"
./_shared/scripts/request.sh GET "/trading/v2/sub-accounts/$SUB_ACCOUNT_NORMAL/portfolio"
./_shared/scripts/request.sh GET "/trading/pnl-today/$USER_ID"
./_shared/scripts/request.sh GET "/trading/market/session" "exchange=HOSE"{subAccountId}$SUB_ACCOUNT_NORMAL$SUB_ACCOUNT_MARGIN| Endpoint | Use when | Path param | Query params | Res key |
|---|---|---|---|---|
| Account detail, margin, debt | | — | |
| Balance, total assets, NAV | | | |
| Order history | | | |
| Today's order book | | — | |
| Single order detail | | — | |
| Stock holdings | | — | |
| Today's P&L | | — | |
| Trading permissions | | — | |
| Market open/close | — | | |
v1v2v4v5{variables}{subAccountId}