No project description provided
Project description
Runespreader
A python runescape market making library / app
Installing
From PyPI
pip install runespreader
From Project
make create-dev
Running the applets
I recommend setting up systemd services (ideally user services - make sure to enable linger!) for all of the apps like such:
OSRS Discord Bot:
[Unit]
Description= OSRS Bot
[Service]
User=<your_user_here>
ExecStart= /bin/bash -c "source /home/<your_user_here>/.venvs/runespreader/bin/activate && python3 /home/<your_user_here>/runescape/runespreader/bot.py"
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
Scraping script to populate clickhouse:
[Unit]
Description= OSRS GE Ripper
[Service]
User=<your_user_here>
ExecStart= /bin/bash -c "source /home/<your_user_here>/.venvs/runespreader/bin/activate && python3 /home/<your_user_here>/runescape/runespreader/clickhouse.py"
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
Spreadfinder - The simple opportunity finder bot
[Unit]
Description= OSRS GE Market Maker
[Service]
User=charles
ExecStart= /bin/bash -c "source /home/<your_user_here>/.venvs/runespreader/bin/activate && python3 /home/<your_user_here>/runescape/runespreader/spreadfinder.py"
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
Setting up clickhouse
Installing and configuring clickhouse
Clickhouse table creation statements:
CREATE TABLE default.rs_buys
(
`high` UInt64 COMMENT 'Buy price',
`highTime` DateTime COMMENT 'Buy time',
`name` String COMMENT 'Friendly Name',
`id` UInt64 COMMENT 'Not friendly Name'
)
ENGINE = ReplacingMergeTree
ORDER BY (id, highTime)
PRIMARY KEY (id, highTime)
SETTINGS index_granularity = 8192
CREATE TABLE default.rs_sells
(
`low` UInt64 COMMENT 'Sell price',
`lowTime` DateTime COMMENT 'Sell time',
`name` String COMMENT 'Friendly Name',
`id` UInt64 COMMENT 'Not friendly Name'
)
ENGINE = ReplacingMergeTree
ORDER BY (id, lowTime)
PRIMARY KEY (id, lowTime)
SETTINGS index_granularity = 8192
Using grafana for visualization
I have a public instance that I can share with anyone interested, but feel free to point a grafana clickhouse datasource at your instance and then use the grafana-dashboard.json
file to import. The discord bot in its excerpt for linking graphs assumes that you have the same public IP that is running the discord bot and the grafana server
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for runespreader-0.1.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e9343c91e11d3d77507b3c0349f5458cf7edebb7e5709da5ef5d98bb36e2d1f |
|
MD5 | 21a21fb5889afe1e8b7fa04159f29df0 |
|
BLAKE2b-256 | f9f0693a0e2c2fdf9304535c93ddb5a77c5e710e4e913860945f541ace203043 |