https://github.com/temp3l/influx-bitmex
sample influx bitmex project with simple stats
https://github.com/temp3l/influx-bitmex
bitcoin bitmex highspeed influxdb orderbook technical-indicators trading websocket
Last synced: about 2 months ago
JSON representation
sample influx bitmex project with simple stats
- Host: GitHub
- URL: https://github.com/temp3l/influx-bitmex
- Owner: temp3l
- Created: 2020-05-03T19:42:19.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T02:33:45.000Z (over 2 years ago)
- Last Synced: 2024-12-25T09:58:01.049Z (9 months ago)
- Topics: bitcoin, bitmex, highspeed, influxdb, orderbook, technical-indicators, trading, websocket
- Language: JavaScript
- Size: 614 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Playground Fomo Bot
0. simple analysis of changes in the orderbook (compares current volumes and average-vol)
1. Fetches historic trade/candle data from REST-API and saves them in influx-database
- 1m,5m,1h,1d candles (1000 per interval)
2. Connects Orderbook via websocket
- tracks 5m,10m,15m moving-averages for the top25 orderbook entries (bids/asks)
- groups the orderbook into 2$-chunks (instead of 0.5$)3. Outputs to console:
```js
{
volDiffs: { diff3: 2429, diffN: 1628340 },
askAvgs: { askVol: 4588606, askVolAvg: 4183006, diff: 405600 },
bidAvgs: { bidVol: 2960266, bidVolAvg: 5148133, diff: -2187867 },
Guess: 'LONG'
}
```- vollDiffs: difference between low & ask -volume/1000
- askAvgs:
- askVol: currentTotal askVolume
- askVolAvg: average 5m volume
- diff: difference between 5m-avg and current Volume
- biAvgs:
- ...
- Guess: if all ask-values are below bid-values - it suggests: SHORT ...## Prerequisite
1. download & install influxdb from https://v2.docs.influxdata.com/v2.0/get-started/#start-with-influxdb-oss
2. Set up InfluxDB through the UI: http://localhost:9999
- create an organisation called "de"
- create a bucket called "bitmex"
- see https://v2.docs.influxdata.com/v2.0/get-started/#set-up-influxdb
## Install
```bash
yarn
yarn start# optional install: typescript and ts-node globally
yarn global add typescript
yarn global add ts-node-dev# disabling livedata or REST in index.ts
// const history = fetchMex(writeApi);
// const live = handleLiveData(writeApi);```
- create `.env` file
```bash
url="http://localhost:9999"
token=".....=="
org="de"
bucket="bitmex"
beep=1
```## Influx Dasboards
- Data will be pumped to your influxdb

## sample output

## Orderbot coming soon
