+ {[
+ {
+ label: '예수금',
+ value:
+ balance?.cash ??
+ balance?.available_cash ??
+ balance?.deposit,
+ },
+ {
+ label: '총평가',
+ value:
+ balance?.total_eval ??
+ balance?.total_value ??
+ balance?.evaluation,
+ },
+ {
+ label: '손익',
+ value:
+ balance?.pnl ??
+ balance?.profit_loss ??
+ balance?.total_pnl,
+ },
+ ]
+ .filter((item) => item.value !== undefined)
+ .map((item) => (
+
+ {item.label}
+ {formatNumber(item.value)}
+
+ ))}
+
+ {Array.isArray(
+ balance?.holdings ??
+ balance?.positions ??
+ balance?.items
+ ) &&
+ (balance?.holdings ??
+ balance?.positions ??
+ balance?.items).length ? (
+
+ {(balance?.holdings ??
+ balance?.positions ??
+ balance?.items
+ ).map((item, idx) => (
+
+
+
+ {item.name ?? item.code ?? '종목'}
+
+
+ {item.code ?? item.symbol ?? ''}
+
+
+
+ 수량
+
+ {formatNumber(
+ item.qty ??
+ item.quantity ??
+ item.holding
+ )}
+
+
+
+ 평균단가
+
+ {formatNumber(
+ item.avg_price ??
+ item.avg ??
+ item.price
+ )}
+
+
+
+ ))}
+