Arbiter Bot Part 2 - Cancel Logic
First part @strangedad/arbiter-bot-for-all-hive is aribter_bot.py
This is the cancelling logic I've been working on for the arbiter systems.
I apologize I'm not putting a lot into writing of these individually but I will answer any questions.
I've been working on these bots for a long time, I just haven't had the time to upload all of these. So I definitely appreciate you folks hanging in there with me.
arbiter_cancel.py
import os
import json
import sys
import time
from place_order import cancel_oldest_order
def read_bot_info(path="bot_info.txt"):
try:
with open(path, "r", encoding="utf-8") as file:
lines = [line.strip() for line in file if line.strip()]
if len(lines) >= 2:
return lines[0], lines[1]
except Exception as exc:
print(f"[ERROR] Failed to read credentials: {exc}")
return None, None
def load_config(root):
config_path = os.path.join(root, "bot_config.json")
if os.path.exists(config_path):
try:
with open(config_path, "r", encoding="utf-8") as file:
return json.load(file)
except Exception as exc:
print(f"[ERROR] Failed to read bot_config.json: {exc}")
return None
account, key = read_bot_info(os.path.join(root, "bot_info.txt"))
if account and key:
return {
"account_name": account,
"active_key": key,
"token": "ARBITER",
"hive_nodes": ["https://api.hive.blog", "https://anyx.io"],
}
return None
def cancel_one(account_name, active_key, token="ARBITER", nodes=None):
return cancel_oldest_order(
account_name,
active_key=active_key,
nodes=nodes or ["https://api.hive.blog", "https://anyx.io"],
token=token,
)
if __name__ == "__main__":
root = os.path.dirname(__file__)
config = load_config(root)
if not config:
print("[ERROR] Missing bot configuration. Run arbiter_bot.py first.")
raise SystemExit(1)
account = (config.get("account_name") or "").strip()
key = (config.get("active_key") or "").strip()
token = (config.get("token") or "ARBITER").strip()
nodes = config.get("hive_nodes") or ["https://api.hive.blog", "https://anyx.io"]
if not account or not key:
print("[ERROR] bot_config.json must include account_name and active_key")
raise SystemExit(1)
run_once = len(sys.argv) > 1 and sys.argv[1] == "--once"
if run_once:
cancel_one(account, key, token=token, nodes=nodes)
else:
while True:
cancel_one(account, key, token=token, nodes=nodes)
time.sleep(300)
Arbiter Bot Part 1 - arbiter_bot.py
π€ PeakeBot β Autonomous Trading System (RC-AWARE)
Independent multi-token trading bot featuring:
RC-aware execution, adaptive delay logic, and self-regulating trade cycles.
π Trading bot details:
π https://geocities.ws/p/e/peakecoin/trading-bot/peakebot_v0_01.html
π» Open-source repositories:
π https://github.com/paulmoon410
π Acknowledgements
For their continued support, guidance, and help expanding the PeakeCoin ecosystem.
Leave Arbiter Bot Part 2 - Cancel Logic to:
Read more #hive-167922 posts
Best Posts From Peake_Dad
We have not curated any of strangedad's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Peake_Dad
- Stolen Funds
- PeakeCoin Bots: Automated Trading Dashboard
- Peake RPG - MMO - Beta Version
- Peake RPG β Current Project Rundown
- Poor Manβs AI β Building While the Servers Are Down
- Hive Trading Bot - strategy.py - Part 4
- Hive Engine Trading Bot - Part 3 - rc_intelligence.py
- Hive Engine Trading Bot - Cycle Control - Part 2
- Hive Engine Trading Bot - Unified Logic - Part 1
- Arbiter Bot - Part 4 - place_order.py
- Arbiter Bot - Part 3 - fetch_market.py
- Arbiter Bot Part 2 - Cancel Logic
- Arbiter Bot - For All Hive Engine Tokens
- Turning Old Cell Phones Into CPU Miners
- Electrical Masters Exam... Passed.
- PeakeCoinBot.exe - Update
- Hive / Cronos - Hive Engine to CRO
- FPS - main.py - python
- PekAblo - Move Mechanics Problems
- Pekario - Now Mobile Friendly