RE: I Dunno... but I made a GitHub Repo
You are viewing a single comment's thread:
cpuminer@raspberrypi:~/peakecoin/swapbnb/bot $ python3 peakecoin_bnb_bot.py
🟢 Market Price: 2610.56082367 | Buy: 2571.402411 | Sell: 2649.719236
⚡ Placing BUY order: 0.01 SWAP.BNB at 2571.402411
📝 Final Order Payload: {'contractName': 'market', 'contractAction': 'buy', 'contractPayload': {'symbol':
'SWAP.BNB', 'quantity': '0.01', 'price': '2571.402411'}}
❌ Error broadcasting order:
Traceback (most recent call last):
File "/home/cpuminer/peakecoin/swapbnb/bot/place_order.py", line 75, in place_order
tx.sign()
File "/home/cpuminer/.local/lib/python3.9/site-packages/beem/transactionbuilder.py", line 441, in sign
raise MissingKeyError
beem.exceptions.MissingKeyError
✅ Buy Order Response: False
⚡ Placing SELL order: 0.01 SWAP.BNB at 2649.719236
❗ Cannot place order — SWAP.BNB balance is 0.
✅ Sell Order Response: False
Uploaded bnb_trade_log.txt to bnb_trade_log.txt.
^CTraceback (most recent call last):
File "/home/cpuminer/peakecoin/swapbnb/bot/peakecoin_bnb_bot.py", line 55, in <module>
trading_bot()
File "/home/cpuminer/peakecoin/swapbnb/bot/peakecoin_bnb_bot.py", line 51, in trading_bot
time.sleep(SLEEP_TIME)
KeyboardInterrupt
0
0
0.000
The key error is likely that it's wanting to use the active key for the actual transaction but you only have the posting wif loaded. I haven't looked at the code, but if you have it loaded from the wallet, add both keys to the wallet, if you care calling it this way:
Hive(keys=[posting_key])
you should do itHive(keys=[posting_key, active_key])
Also, the beem library is dated, which is why I have taken upon myself to update it and get it caught up with the times under a rebrand. If you would like to use my current iteration, it's listed as hive-nectar and is mostly 1:1 compatible with beem, just
from nectar.hive import Hive
etc instead of beem. Feel free to reach out if you would like.I'm going to try using both keys to verify it's not what I've done. I will look into Hive-Nectar, I'm a rookie so I'm trying to establish this. I'll check it out later this evening or tomorrow after work.