Skip to content
This repository has been archived by the owner on Jan 4, 2025. It is now read-only.

leandrodalbo/trading-signal-old

Repository files navigation

Trade the day API

  • Fetching and analysing data from different exchanges.
  • The data is saved identifying possible trading opportunities.
  • Using Kraken API to open market/stop-loss/take-profit orders.
  • Strategies used: Engulfing candles and MA crossovers.

API Documentation

  • /tradetheday/swagger.html
  • /tradetheday/docs

Postgres container

docker run  --name opentrades -e POSTGRES_USER=user -e POSTGRES_PASSWORD=password -e POSTGRES_DB=tradetheday -p 5432:5432  postgres:14.4

Local Docker image

$ ./gradlew bootBuildImage

Running with docker-compose

$ docker-compose -f ./dcompose/docker-compose.yml up

Observability

Prometheus: http://localhost:9090/ Grafana: http://localhost:3000/explore

K8s

create/start/stop a cluster

$ minikube start --cpus 2 --memory 4g --driver docker --profile tradetheday
$ minikube stop --profile tradetheday
$ minikube start --profile tradetheday

setup context

$ kubectl config get-contexts
$ kubectl config current-context
$ kubectl config use-context tradetheday

list all nodes

$ kubectl get nodes

Postgres pod

$ kubectl apply -f ./k8s/db.yml
$ kubectl get pod

Create deployment

$ kubectl apply -f ./k8s/deployment.yml
$ kubectl get deployments

Create service

$ kubectl apply -f ./k8s/service.yml
$ kubectl get services

Expose

$ kubectl port-forward service/tradetheday 8181:80
$ curl http://127.0.0.1:8181/actuator/health/liveness

About

Proof of Concept

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages