Closed
Description
Describe the bug
Errors at launch. It only affects one of my 3 portfolios on startup, as the format doesn't confirm to the specc here:
pycryptobot/models/CoinbasePro.py
Line 192 in d530ab7
To Reproduce
Steps to reproduce the behavior:
- launch using
python3 pycryptobot.py
- See error
Error Log
Traceback (most recent call last):
File "pycryptobot.py", line 66, in <module>
orders = account.getOrders(app.getMarket(), '', 'done')
File "/home/pi/pycryptobot/BTC/models/TradingAccount.py", line 110, in getOrders
self.orders = model.getOrders(market, action, status)
File "/home/pi/pycryptobot/BTC/models/CoinbasePro.py", line 195, in getOrders
df = resp.copy()[[ 'created_at', 'product_id', 'side', 'type', 'filled_size', 'specified_funds', 'executed_value', 'fill_fees', 'status' ]]
File "/home/pi/.local/lib/python3.7/site-packages/pandas/core/frame.py", line 3030, in __getitem__
indexer = self.loc._get_listlike_indexer(key, axis=1, raise_missing=True)[1]
File "/home/pi/.local/lib/python3.7/site-packages/pandas/core/indexing.py", line 1265, in _get_listlike_indexer
self._validate_read_indexer(keyarr, indexer, axis, raise_missing=raise_missing)
File "/home/pi/.local/lib/python3.7/site-packages/pandas/core/indexing.py", line 1315, in _validate_read_indexer
raise KeyError(f"{not_found} not in index")
KeyError: "['specified_funds'] not in index"
I've gone in to actually check the columns of resp
, and it only contains the following:
['id', 'price', 'size', 'product_id', 'profile_id', 'side', 'type', 'time_in_force', 'post_only', 'created_at', 'done_at', 'done_reason', 'fill_fees', 'filled_size', 'executed_value', 'status', 'settled']
Desktop (please complete the following information):
- OS: Linux; Debian
- Version: latest git pull as of 2.0.6
Additional context
Config file, aside from base_currency
identical to working ones. :
{
"coinbasepro" : {
"api_url" : "https://api.pro.coinbase.com",
"api_key" : "...",
"api_secret" : "...",
"api_passphrase" : "...",
"config" : {
"base_currency" : "BTC",
"quote_currency" : "USD",
"live" : 1,
"sellatloss" : 0,
"granularity": 60
}
},
"telegram" : {
"token" : "...",
"client_id" : "..."
}
}
Activity