https://github.com/ujstor/probit-exchange-api
API for interaction with ProBit Global crypto exchange (live link on private repo)
https://github.com/ujstor/probit-exchange-api
api cryptocurrency flask probit trading
Last synced: 3 months ago
JSON representation
API for interaction with ProBit Global crypto exchange (live link on private repo)
- Host: GitHub
- URL: https://github.com/ujstor/probit-exchange-api
- Owner: Ujstor
- License: mit
- Created: 2023-03-31T22:31:51.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-11-04T15:05:42.000Z (over 2 years ago)
- Last Synced: 2025-04-15T09:45:57.156Z (about 1 year ago)
- Topics: api, cryptocurrency, flask, probit, trading
- Language: Python
- Homepage: https://probit.astipan.com/
- Size: 23.4 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# **ProBit Global exchange API**
1. Clone git repo
2. Create and add credentials in `.env` file
```
ID= #probit API id
SECRET= #probit API secret
KEY= #random string
```
3. Run `python main.py`
4. Open `127.0.0.1:5000` in local browser
# Docker
To build the Docker image from the code, run:
```
docker compose -f .\docker-compose-dev.yml up
```
If you want to pull the image from the Docker repository instead, use:
```
docker compose -f .\docker-compose-prod.yml up
```
Image is automatically built and deployed through the Jenkins pipeline after changes in GitHub, and it expects a .env file for loading variables.

# Jenkins Pipeline
Pipeline is designed to automate the building and deployment of a Docker image for the Probit Exchange API. It is configured to execute different stages of the CI/CD process based on the branch being built. It assumes you have a specific versioning strategy for your application, denoted by "Patch," "Minor," and "Major."
## Pipeline Execution Flow
The pipeline is executed as follows:
1. Code is checked out from the GitHub repository.
2. The environment is prepared by copying the `.env` file.
3. Tests are run.
4. If the branch is 'master', a Docker image tag is generated.
5. If the branch is 'master', a Docker image is built with the generated tag.
6. If the branch is 'master', the Docker image is pushed to Docker Hub.
7. If the branch is 'master', the Docker image is removed.
## Execution Conditions
The stages for image tagging, building, deploying, and environment cleanup are conditional and will only run when the branch being built is 'master'.
Please ensure that you have the necessary plugins and tools set up in your Jenkins environment to support Docker and the required scripts for testing. Scripts are in [IaC Repo](https://github.com/Ujstor/k8s-infra/tree/master/jenkins/scripts)
## Expected output
Probit is primarily used for fat finger orders. In the event of market volatility and lack of liquidity, these extreme orders can be executed.
The tool is now used for order monitoring.


## Pytest
To run tests, use `pytest -v -s` command.
