Predict Signal #1152
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Predict Signal | |
on: | |
# push: | |
# branches: | |
# - feature/predict | |
schedule: | |
- cron: "00 22 * * *" | |
# 5:00pm EST / 22:00 UTC every day | |
# 2 hr before 00:00 UTC | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Cache pip dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 pytest coverage | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Decrypt script | |
env: | |
RH_PASSWORD: ${{ secrets.RH_PASSWORD }} | |
SALT: ${{ secrets.SALT }} | |
run: | | |
python util/decrypt.py encrypted/predict_signal.py | |
- name: Sleep until 00:00 UTC | |
run: python scripts/sleep.py 00:00 | |
- name: Predict signal | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
S3_BUCKET: ${{ secrets.S3_BUCKET }} | |
POLYGON: ${{ secrets.POLYGON }} | |
GLASSNODE: ${{ secrets.GLASSNODE }} | |
RH_USERNAME: ${{ secrets.RH_USERNAME }} | |
GLASSNODE_PASS: ${{ secrets.GLASSNODE_PASS }} | |
EMIT_SECRET: ${{ secrets.EMIT_SECRET }} | |
SALT: ${{ secrets.SALT }} | |
RH_PASSWORD: ${{ secrets.RH_PASSWORD }} | |
run: | | |
python encrypted/predict_signal.py | |
- name: Execute order | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
S3_BUCKET: ${{ secrets.S3_BUCKET }} | |
BINANCE_KEY: ${{ secrets.BINANCE_KEY }} | |
BINANCE_SECRET: ${{ secrets.BINANCE_SECRET }} | |
KRAKEN_KEY: ${{ secrets.KRAKEN_KEY }} | |
KRAKEN_SECRET: ${{ secrets.KRAKEN_SECRET }} | |
PREF_EXCHANGE: ${{ secrets.PREF_EXCHANGE }} | |
run: | | |
python scripts/execute_order.py |