Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ OKX_API_LIVE_TRADING_KEY= # <<<Enter here>>>
OKX_API_LIVE_TRADING_SECRET= # <<<Enter here>>>
OKX_API_LIVE_TRADING_PASSPHRASE= # <<<Enter here>>>
FEE_PER_COST="fast"
# Number of wallet addresses (synthetic keys) each bot derives and scans for coins. Keepers usually hold CRT/XCH on the first indexes, so a low count (eg 1-20) is enough and avoids scanning many empty addresses (which can trip the node's per-wallet coin-fetch limit or time out). blank = 500
KEY_COUNT=
OKX_URL=wss://ws.okx.com:8443/ws/v5/public # Base URL for OKX v5 API

# Bot specific env vars
Expand Down
2 changes: 1 addition & 1 deletion keeper_bots/announcer_configure_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
if not private_key:
raise ValueError("No master private key found")

rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost)
rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost, key_count=int(os.getenv("KEY_COUNT", "500")))


async def run_announcer():
Expand Down
2 changes: 1 addition & 1 deletion keeper_bots/announcer_penalize_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
if not private_key:
raise ValueError("No master private key found")

rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost)
rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost, key_count=int(os.getenv("KEY_COUNT", "500")))


async def penalize_announcer(announcer_name, rpc_client):
Expand Down
2 changes: 1 addition & 1 deletion keeper_bots/announcer_rewards_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
elif TARGET_PUZZLE_HASH == "":
TARGET_PUZZLE_HASH = None

rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost)
rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost, key_count=int(os.getenv("KEY_COUNT", "500")))


async def run_announcer_rewards_bot():
Expand Down
2 changes: 1 addition & 1 deletion keeper_bots/announcer_update_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async def run_announcer():
UPDATE_THRESHOLD_BPS_ADJ = UPDATE_THRESHOLD_BPS # setting default value
log.info("Set default adjusted update threshold [bps]: %s", UPDATE_THRESHOLD_BPS_ADJ)

rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost)
rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost, key_count=int(os.getenv("KEY_COUNT", "500")))
if "testnet" in rpc_url or "localhost" in rpc_url:
sym = "XRP-USDT"
sym_gate = "XRP_USDT" # Gate.io uses underscore
Expand Down
2 changes: 1 addition & 1 deletion keeper_bots/bad_debt_recovery_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
log.error("No master private key found")
raise ValueError("No master private key found")

rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost)
rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost, key_count=int(os.getenv("KEY_COUNT", "500")))


async def run_bad_debt_recovery_bot():
Expand Down
2 changes: 1 addition & 1 deletion keeper_bots/governance_implement_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async def run_governance_implement_bot():
if not private_key:
raise ValueError("No master private key found")

rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost)
rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost, key_count=int(os.getenv("KEY_COUNT", "500")))

try:
while True:
Expand Down
2 changes: 1 addition & 1 deletion keeper_bots/governance_veto_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def run_governance_veto_bot():
if not args.private_key:
raise ValueError("No private key provided")

rpc_client = CircuitRPCClient(args.rpc_url, args.private_key)
rpc_client = CircuitRPCClient(args.rpc_url, args.private_key, key_count=int(os.getenv("KEY_COUNT", "500")))

while True:

Expand Down
2 changes: 1 addition & 1 deletion keeper_bots/liquidation_bid_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class OrderRejectedError(Exception):
log.error("No master private key found")
raise ValueError("No master private key found")

rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost)
rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost, key_count=int(os.getenv("KEY_COUNT", "500")))


def get_okx_symbols(base_symbol, quote_symbol):
Expand Down
2 changes: 1 addition & 1 deletion keeper_bots/liquidation_start_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
)
raise

rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost)
rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost, key_count=int(os.getenv("KEY_COUNT", "500")))


async def start_liquidation(vault_name, initiator_puzzle_hash, rpc_client):
Expand Down
2 changes: 1 addition & 1 deletion keeper_bots/oracle_update_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async def run_oracle():
raise ValueError("No private key provided")

rpc_client = CircuitRPCClient(
args.rpc_url, args.private_key, args.add_sig_data, fee_per_cost=args.fee_per_cost
args.rpc_url, args.private_key, args.add_sig_data, fee_per_cost=args.fee_per_cost, key_count=int(os.getenv("KEY_COUNT", "500"))
)
while True:
# update oracle
Expand Down
2 changes: 1 addition & 1 deletion keeper_bots/recharge_bid_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def _env(name: str) -> str | None:
"RECHARGE_BID_STARTING_CRT_PRICE must be <= RECHARGE_BID_MAX_CRT_PRICE"
)

rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost)
rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost, key_count=int(os.getenv("KEY_COUNT", "500")))

# Puzzle hashes controlled by us, used to detect when we are already the leading bidder.
my_puzzle_hashes = {
Expand Down
2 changes: 1 addition & 1 deletion keeper_bots/recharge_start_settle_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async def run_recharge_start_settle_bot():
if not args.private_key:
raise ValueError("No private key provided")

rpc_client = CircuitRPCClient(args.rpc_url, args.private_key)
rpc_client = CircuitRPCClient(args.rpc_url, args.private_key, key_count=int(os.getenv("KEY_COUNT", "500")))

while True:

Expand Down
2 changes: 1 addition & 1 deletion keeper_bots/savings_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
log.error("No master private key found")
raise ValueError("No master private key found")

rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost)
rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost, key_count=int(os.getenv("KEY_COUNT", "500")))


async def run_savings_job():
Expand Down
2 changes: 1 addition & 1 deletion keeper_bots/stability_fee_transfer_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@


async def run_stability_fee_transfer_bot():
rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost)
rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost, key_count=int(os.getenv("KEY_COUNT", "500")))

while True:
# get vaults
Expand Down
2 changes: 1 addition & 1 deletion keeper_bots/statutes_update_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async def run_statutes():
if not args.private_key:
raise ValueError("No private key provided")

rpc_client = CircuitRPCClient(args.rpc_url, args.private_key, args.add_sig_data, fee_per_cost=args.fee_per_cost)
rpc_client = CircuitRPCClient(args.rpc_url, args.private_key, args.add_sig_data, fee_per_cost=args.fee_per_cost, key_count=int(os.getenv("KEY_COUNT", "500")))
while True:
# Update Statutes price
log.info("Updating Statutes Price")
Expand Down
2 changes: 1 addition & 1 deletion keeper_bots/surplus_bid_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def _env(name: str) -> str | None:
"SURPLUS_BID_STARTING_CRT_PRICE must be >= SURPLUS_BID_MIN_CRT_PRICE"
)

rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost)
rpc_client = CircuitRPCClient(rpc_url, private_key, add_sig_data, fee_per_cost, key_count=int(os.getenv("KEY_COUNT", "500")))

# Puzzle hashes controlled by us, used to detect when we are already the leading bidder.
my_puzzle_hashes = {
Expand Down
2 changes: 1 addition & 1 deletion keeper_bots/surplus_start_settle_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async def run_surplus_start_settle_bot():
raise ValueError("No private key provided")

rpc_client = CircuitRPCClient(
args.rpc_url, args.private_key, args.add_sig_data, args.fee_per_cost
args.rpc_url, args.private_key, args.add_sig_data, args.fee_per_cost, key_count=int(os.getenv("KEY_COUNT", "500"))
)

while True:
Expand Down
2 changes: 1 addition & 1 deletion keeper_bots/treasury_rebalance_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async def run_bot():
"--private-key", "-p", type=str, default=os.environ.get("PRIVATE_KEY"), help="Private key for your coins"
)
args = parser.parse_args()
rpc_client = CircuitRPCClient(args.base_url, args.private_key)
rpc_client = CircuitRPCClient(args.base_url, args.private_key, key_count=int(os.getenv("KEY_COUNT", "500")))

while True:

Expand Down
Loading