https://github.com/andrewhsugithub/transaction-metrics
Calculate your OKX Transaction Metrics
https://github.com/andrewhsugithub/transaction-metrics
backend flask maximum-drawdown profit-factor rest-api roi sharpe
Last synced: 6 months ago
JSON representation
Calculate your OKX Transaction Metrics
- Host: GitHub
- URL: https://github.com/andrewhsugithub/transaction-metrics
- Owner: andrewhsugithub
- Created: 2024-04-30T19:44:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-01T18:48:19.000Z (over 1 year ago)
- Last Synced: 2025-02-12T19:40:00.332Z (8 months ago)
- Topics: backend, flask, maximum-drawdown, profit-factor, rest-api, roi, sharpe
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Calculate your OKX Transaction Metrics
Metrics supported:
ROI, Win Rate, MDD(maximum drawdown), Profit Factor, Sharpe Ratio## How to execute
Turn on your local server:
```
pip install -r requirements.txt
python main.py
```API to calculate metrics:
POST http://localhost:5000/api/v1/metricsrequest is your OKX transaction json
response format example:```json
{
"message": "Calculation successful",
"results": {
"maxDrawdown": "-73.59%",
"oddsRatio": "0.33",
"profitFactor": "1.55",
"roi": "14.83%",
"sharpeRatio": "-0.24",
"winRate": "25.00%"
}
}
```