using HA trading-calendar and config service
This commit is contained in:
parent
d5e1f0a446
commit
9f789738e9
2
VERSION
2
VERSION
@ -1 +1 @@
|
||||
1.9.9.F2,docker build imagages script fix
|
||||
2.0.1,using HA trading-calendar and config service
|
||||
|
||||
@ -19,7 +19,7 @@ fi
|
||||
RegistryService=cloud21.cvtt.vpn:5500
|
||||
RegistryProtocol=http
|
||||
|
||||
ConfigUrl=http://cloud23.cvtt.vpn:6789/admin/docker_images
|
||||
ConfigUrl=http://cloud16.cvtt.vpn:6789/admin/docker_images
|
||||
|
||||
|
||||
ReleaseHost="cloud21.cvtt.vpn"
|
||||
|
||||
@ -9,7 +9,7 @@ get_user_hosts() {
|
||||
local User=${1}
|
||||
local Domain=${2}
|
||||
|
||||
Cmd="curl -s http://cloud23.cvtt.vpn:6789/admin/cvtt_hosts"
|
||||
Cmd="curl -s http://cloud16.cvtt.vpn:6789/admin/cvtt_hosts"
|
||||
Cmd="${Cmd} | ${HOME}/bin/hjson -j"
|
||||
Cmd="${Cmd} | jq -r"
|
||||
Cmd="${Cmd} --arg domain \"${Domain}\""
|
||||
|
||||
@ -17,7 +17,7 @@ is_container_running() {
|
||||
fi
|
||||
}
|
||||
|
||||
export CalendarURL=http://cloud23.cvtt.vpn:8000/api/v1/markets/hours?mic=XNYS
|
||||
export CalendarURL=https://trading-calendar.cvtt.net/api/v1/markets/hours?mic=XNYS
|
||||
|
||||
is_business_day() {
|
||||
dt=${1}
|
||||
|
||||
@ -16,7 +16,7 @@ Cmd+=" --network=host"
|
||||
Cmd+=" --name=crypto_md_day.${host}.${date}"
|
||||
Cmd+=" --rm"
|
||||
Cmd+=" --volume=${HOME}/.creds:/.creds"
|
||||
Cmd+=" -e CONFIG_SERVICE=cloud23.cvtt.vpn:6789"
|
||||
Cmd+=" -e CONFIG_SERVICE=cloud16.cvtt.vpn:6789"
|
||||
Cmd+=" ${DockerImage}"
|
||||
Cmd+=" -h ${host}"
|
||||
Cmd+=" -d ${date}"
|
||||
|
||||
@ -15,7 +15,7 @@ is_container_running() {
|
||||
fi
|
||||
}
|
||||
|
||||
export CalendarURL=http://cloud23.cvtt.vpn:8000/api/v1/markets/hours?mic=XNYS
|
||||
export CalendarURL=https://trading-calendar.cvtt.net/api/v1/markets/hours?mic=XNYS
|
||||
|
||||
is_business_day() {
|
||||
dt=${1}
|
||||
@ -92,7 +92,7 @@ Cmd+=" --name=${ContainerName}"
|
||||
Cmd+=" --rm"
|
||||
Cmd+=" --volume=${LogDir}:/logs"
|
||||
Cmd+=" --volume=${HOME}/.creds:/.creds"
|
||||
Cmd+=" -e CONFIG_SERVICE=cloud23.cvtt.vpn:6789"
|
||||
Cmd+=" -e CONFIG_SERVICE=cloud16.cvtt.vpn:6789"
|
||||
Cmd+=" ${DockerImage}"
|
||||
Cmd+=" -d ${date_to_load}"
|
||||
if [ -n "${NumSymbols}" ]; then
|
||||
|
||||
@ -15,7 +15,7 @@ is_container_running() {
|
||||
fi
|
||||
}
|
||||
|
||||
export CalendarURL=http://cloud23.cvtt.vpn:8000/api/v1/markets/hours?mic=XNYS
|
||||
export CalendarURL=https://trading-calendar.cvtt.net/api/v1/markets/hours?mic=XNYS
|
||||
|
||||
is_business_day() {
|
||||
dt=${1}
|
||||
@ -97,7 +97,7 @@ Cmd+=" --name=${ContainerName}"
|
||||
Cmd+=" --rm"
|
||||
Cmd+=" --volume=${LogDir}:/logs"
|
||||
Cmd+=" --volume=${HOME}/.creds:/.creds"
|
||||
Cmd+=" -e CONFIG_SERVICE=cloud23.cvtt.vpn:6789"
|
||||
Cmd+=" -e CONFIG_SERVICE=cloud16.cvtt.vpn:6789"
|
||||
Cmd+=" ${DockerImage}"
|
||||
Cmd+=" -d ${date_to_load}"
|
||||
Cmd+=" -S ${Symbols}"
|
||||
|
||||
@ -52,7 +52,7 @@ Cmd+=" --name=${ContainerName}"
|
||||
Cmd+=" -v /home/cvtt/.creds:/.creds"
|
||||
Cmd+=" -v /home/cvtt/prod/data:/app/data"
|
||||
Cmd+=" -v /home/cvtt/prod/logs:/logs"
|
||||
Cmd+=" -e CONFIG_SERVICE=cloud23.cvtt.vpn:6789"
|
||||
Cmd+=" -e CONFIG_SERVICE=cloud16.cvtt.vpn:6789"
|
||||
Cmd+=" cloud21.cvtt.vpn:5500/md_recorder:latest"
|
||||
Cmd+=" ${job}"
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ Cmd+=" --pull=always"
|
||||
Cmd+=" --name=${ContainerName}"
|
||||
Cmd+=" -v /home/cvtt/.creds:/.creds"
|
||||
Cmd+=" -v /home/cvtt/prod/logs:/logs"
|
||||
Cmd+=" -e CONFIG_SERVICE=cloud23.cvtt.vpn:6789"
|
||||
Cmd+=" -e CONFIG_SERVICE=cloud16.cvtt.vpn:6789"
|
||||
Cmd+=" cloud21.cvtt.vpn:5500/md_recorder_monitor:latest"
|
||||
Cmd+=" ${Instance} ${AdminPort}"
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ Cmd+=" --network=host"
|
||||
Cmd+=" --name=crypto_exch_stats"
|
||||
Cmd+=" --volume=${HOME}/prod/data:/app/data"
|
||||
Cmd+=" --volume=${HOME}/prod/logs:/logs"
|
||||
Cmd+=" -e CONFIG_SERVICE=cloud23.cvtt.vpn:6789"
|
||||
Cmd+=" -e CONFIG_SERVICE=cloud16.cvtt.vpn:6789"
|
||||
Cmd+=" cloud21.cvtt.vpn:5500/crypto_exch_stats:latest"
|
||||
|
||||
echo ${Cmd}
|
||||
|
||||
@ -15,7 +15,7 @@ is_business_day() {
|
||||
dt=${1}
|
||||
date=$(date -d "${dt}" +"%Y-%m-%d")
|
||||
|
||||
CalendarURL=http://cloud23.cvtt.vpn:8000/api/v1/markets/hours?mic=XNYS
|
||||
CalendarURL=https://trading-calendar.cvtt.net/api/v1/markets/hours?mic=XNYS
|
||||
URL="${CalendarURL}&start=${date}&end=${date}"
|
||||
open_time=$(curl -s "${URL}" | jq '.[] | .open_time')
|
||||
if [ -n "${open_time}" ]; then
|
||||
|
||||
@ -31,7 +31,7 @@ echo "Schemas=${Schemas}"
|
||||
Cmd=
|
||||
Cmd="${Python}"
|
||||
Cmd="${Cmd} ${RootDir}/cvttpy/research/utils/archive_ts_md.py"
|
||||
Cmd="${Cmd} --config=http://cloud23.cvtt.vpn:6789/apps/md_recorder"
|
||||
Cmd="${Cmd} --config=http://cloud16.cvtt.vpn:6789/apps/md_recorder"
|
||||
Cmd="${Cmd} --db_credentials_key=${CredKey}"
|
||||
Cmd="${Cmd} --date=${yesterday}"
|
||||
Cmd="${Cmd} --schemas=${Schemas}"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
usage() {
|
||||
echo -n "Usage: ${0}"
|
||||
echo -n " [-c <config (dflt: apps/cvtt_eqt_alpaca)>]"
|
||||
echo -n " [-s <config_serverice (dflt: http://cloud23.cvtt.vpn:6789)>]"
|
||||
echo -n " [-s <config_serverice (dflt: http://cloud16.cvtt.vpn:6789)>]"
|
||||
echo -n " [-N <name (dflt: ALPACA-SNDBX)>]"
|
||||
echo
|
||||
exit 1
|
||||
@ -23,7 +23,7 @@ export PYTHONPATH=${RootDir}
|
||||
StatusChannel=Status-CVTT
|
||||
AlertChannel=Alerts-CVTT
|
||||
Sender=${RootDir}/ops/utils/send_mmost.sh
|
||||
ConfigService=http://cloud23.cvtt.vpn:6789
|
||||
ConfigService=http://cloud16.cvtt.vpn:6789
|
||||
Config=apps/cvtt_eqt_alpaca
|
||||
Name="ALPACA-SNDBX"
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ RootDir="${HOME}/prod"
|
||||
|
||||
AlertChannel=Alerts-CVTT
|
||||
Sender=${RootDir}/ops/utils/send_mmost.sh
|
||||
ConfigUrl=http://cloud23.cvtt.vpn:6789/admin/cvtt_hosts
|
||||
ConfigUrl=http://cloud16.cvtt.vpn:6789/admin/cvtt_hosts
|
||||
|
||||
HOSTS_CONFIG=$(curl -s ${ConfigUrl} | ${HOME}/bin/hjson -j)
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ RootDir="${HOME}/prod"
|
||||
|
||||
AlertChannel=Alerts-CVTT
|
||||
Sender=${RootDir}/ops/utils/send_mmost.sh
|
||||
ConfigUrl=http://cloud23.cvtt.vpn:6789/admin/cvtt_services
|
||||
ConfigUrl=http://cloud16.cvtt.vpn:6789/admin/cvtt_services
|
||||
|
||||
SERVICES_CONFIG=$(curl -s ${ConfigUrl} | ${HOME}/bin/hjson -j)
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ get_user_hosts() {
|
||||
local User=${1}
|
||||
local Domain=${2}
|
||||
|
||||
Cmd="curl -s http://cloud23.cvtt.vpn:6789/admin/cvtt_hosts"
|
||||
Cmd="curl -s http://cloud16.cvtt.vpn:6789/admin/cvtt_hosts"
|
||||
Cmd+=" | ${HOME}/bin/hjson -j"
|
||||
Cmd+=" | jq -r"
|
||||
Cmd+=" --arg domain \"${Domain}\""
|
||||
|
||||
@ -4,7 +4,7 @@ Start=${1}
|
||||
NumJobs=${2}
|
||||
InstListFile=${3}
|
||||
|
||||
export CalendarURL=http://cloud23.cvtt.vpn:8000/api/v1/markets/hours?mic=XNYS
|
||||
export CalendarURL=https://trading-calendar.cvtt.net/api/v1/markets/hours?mic=XNYS
|
||||
|
||||
is_business_day() {
|
||||
dt=${1}
|
||||
@ -46,7 +46,7 @@ echo "Start=${Start} End=${End} NumJobs=${NumJobs}"
|
||||
|
||||
export PYTHONPATH=/home/cvtt/prod
|
||||
export Python=/home/cvtt/.pyenv/python3.12-venv/bin/python3
|
||||
export Config=http://cloud23.cvtt.vpn:6789/apps/minimal_md
|
||||
export Config=http://cloud16.cvtt.vpn:6789/apps/minimal_md
|
||||
export PyScript=/home/cvtt/prod/cvttpy/exchanges/alpaca/hist_md/hist_md_bars.py
|
||||
|
||||
export OutputDir=/home/cvtt/prod/archive/md_archive/equity/alpaca_md # Local
|
||||
|
||||
@ -5,7 +5,7 @@ export PYTHONPATH=${HOME}/prod
|
||||
Python=${HOME}/.pyenv/python3.12-venv/bin/python3
|
||||
Script=${HOME}/prod/cvttpy/exchanges/alpaca/hist_md/rl_calc_loader.py
|
||||
DbFile=${HOME}/prod/data/rel_liquidity.db
|
||||
Config=http://cloud23.cvtt.vpn:6789/apps/minimal_md_eqt
|
||||
Config=http://cloud16.cvtt.vpn:6789/apps/minimal_md_eqt
|
||||
|
||||
Cmd="${Python}"
|
||||
Cmd="${Cmd} ${Script}"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
is_business_day() {
|
||||
dt=${1}
|
||||
|
||||
CalendarURL=http://cloud23.cvtt.vpn:8000/api/v1/markets/hours?mic=XNYS
|
||||
CalendarURL=https://trading-calendar.cvtt.net/api/v1/markets/hours?mic=XNYS
|
||||
open_time=$(curl -s "${CalendarURL}&start=${dt}&end=${dt}" | jq '.[] | .open_time')
|
||||
if [ -n "${open_time}" ]; then
|
||||
return 0
|
||||
|
||||
@ -4,7 +4,7 @@ export PYTHONPATH=/home/cvtt/prod
|
||||
|
||||
Cmd="/home/cvtt/.pyenv/python3.12-venv/bin/python3"
|
||||
Cmd="${Cmd} /home/cvtt/prod/cvttpy/apps/research/exchange_trading_stats.py"
|
||||
Cmd="${Cmd} --config=http://cloud23.cvtt.vpn:6789/apps/tests/listen_market_data"
|
||||
Cmd="${Cmd} --config=http://cloud16.cvtt.vpn:6789/apps/tests/listen_market_data"
|
||||
Cmd="${Cmd} --active_exchanges=OKX,GEMINI,BITSTAMP,COINBASE_AT,BNBSPOT,KRAKEN"
|
||||
Cmd="${Cmd} --instruments=OKX:PAIR-BTC-USDT,GEMINI:PAIR-BTC-USD,BITSTAMP:PAIR-BTC-USD,COINBASE:PAIR-BTC-USD,BNBSPOT:PAIR-BTC-USDT,KRAKEN:PAIR-BTC-USD"
|
||||
Cmd="${Cmd} --db_file=/home/cvtt/prod/data/exchange_trading_stats.db"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user