new: hsi options and futures summary
This commit is contained in:
parent
394edce8fa
commit
4ab72b3471
22
sh/hsi-options-futures-summary.sh
Executable file
22
sh/hsi-options-futures-summary.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
MONTH=$(date +%b)
|
||||
FILENAME=$(curl -sq https://www.hkex.com.hk/eng/stat/dmstat/dayrpt/dmreport8.htm | grep -A5 'Day Trading Session' | tail -1 | cut -d\" -f2)
|
||||
echo "* HSI options big player positions" > /tmp/msg
|
||||
echo "3000 support | 4000 strong support | 5000 iron | 6000 steel" >> /tmp/msg
|
||||
echo "" >> /tmp/msg
|
||||
links2 -dump "https://www.hkex.com.hk/eng/stat/dmstat/dayrpt/$FILENAME" \
|
||||
| head -190 | egrep '^\ [A-Z]*\-.*[CP].*' | awk '{if ($21 > 2500) print $1,$2,$3,$21,$NF}' >> /tmp/msg
|
||||
|
||||
echo "" >> /tmp/msg
|
||||
echo "* HSIF position day end" >> /tmp/msg
|
||||
|
||||
mkdir -p /tmp/hsif-tmp
|
||||
FILENAME="DTOP_F_$(date +%Y%m%d).zip"
|
||||
wget -O /tmp/hsif-tmp/$FILENAME "https://www.hkex.com.hk/eng/stat/dmstat/oi/$FILENAME"
|
||||
unzip -qq -d /tmp/hsif-tmp/ /tmp/hsif-tmp/$FILENAME
|
||||
cat /tmp/hsif-tmp/*dtop_f_hkcc_fut_dtl_hsi.rpt | grep ^HSI | head -1 | awk '{print $2,"Gross: ",$4,"Net: ",$5,"Change: ", $6}' >> /tmp/msg
|
||||
rm -rf /tmp/hsif-tmp
|
||||
|
||||
mailx -s "HSI options 大戶位 / HSI future day end / $(date +%x)" -- xpk@headdesk.me,maggie.cmk@gmail.com < /tmp/msg
|
||||
# mailx -s "HSI options 大戶位 $(date +%x)" -- xpk@headdesk.me < /tmp/msg
|
||||
rm -f /tmp/msg
|
Loading…
Reference in New Issue
Block a user