|
|
@@ -7,7 +7,8 @@ SYMBOL_LIST=CAN #,COIN,GBTC,HOOD,MSTR,PYPL,XYZ
|
|
|
|
OUTPUT_DIR=/tmp
|
|
|
|
OUTPUT_DIR=/tmp
|
|
|
|
DATE=20250514
|
|
|
|
DATE=20250514
|
|
|
|
RSYNC_TARGETS="cvtt@hs01.cvtt.vpn:/works/cvtt/md_archive/equity/test/alpaca_md/sim/"
|
|
|
|
RSYNC_TARGETS="cvtt@hs01.cvtt.vpn:/works/cvtt/md_archive/equity/test/alpaca_md/sim/"
|
|
|
|
# RSYNC_TARGETS="cvtt@hs01.cvtt.vpn:/works/cvtt/md_archive/equity/alpaca_md/sim/ cvtt@cloud21.cvtt.vpn:/opt/store/cvtt/md_archive/equity/alpaca_md/sim/"
|
|
|
|
# RSYNC_TARGETS="cvtt@hs01.cvtt.vpn:/works/cvtt/md_archive/equity/alpaca_md/sim/
|
|
|
|
|
|
|
|
#cvtt@cloud21.cvtt.vpn:/opt/store/cvtt/md_archive/equity/alpaca_md/sim/"
|
|
|
|
# --------------------- Settings
|
|
|
|
# --------------------- Settings
|
|
|
|
|
|
|
|
|
|
|
|
# --------------------- Settings
|
|
|
|
# --------------------- Settings
|
|
|
@@ -19,7 +20,10 @@ is_business_day() {
|
|
|
|
|
|
|
|
|
|
|
|
CalendarURL=https://trading-calendar.cvtt.net/api/v1/markets/hours?mic=XNYS
|
|
|
|
CalendarURL=https://trading-calendar.cvtt.net/api/v1/markets/hours?mic=XNYS
|
|
|
|
URL="${CalendarURL}&start=${date}&end=${date}"
|
|
|
|
URL="${CalendarURL}&start=${date}&end=${date}"
|
|
|
|
|
|
|
|
echo "URL=${URL}"
|
|
|
|
open_time=$(curl -s "${URL}" | jq '.[] | .open_time')
|
|
|
|
open_time=$(curl -s "${URL}" | jq '.[] | .open_time')
|
|
|
|
|
|
|
|
echo "open_time=${open_time}"
|
|
|
|
|
|
|
|
|
|
|
|
if [ -n "${open_time}" ]; then
|
|
|
|
if [ -n "${open_time}" ]; then
|
|
|
|
return 0
|
|
|
|
return 0
|
|
|
|
else
|
|
|
|
else
|
|
|
@@ -41,7 +45,7 @@ mkdir -p ${OUTPUT_DIR}
|
|
|
|
|
|
|
|
|
|
|
|
if ! is_business_day ${DATE}; then
|
|
|
|
if ! is_business_day ${DATE}; then
|
|
|
|
echo "${DATE} is not business day"
|
|
|
|
echo "${DATE} is not business day"
|
|
|
|
usage
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
OLD_IFS=${IFS}
|
|
|
|
OLD_IFS=${IFS}
|
|
|
|