Description
First time running Blankly, following the quickstart with blankly init
and "keyless" exchange, then running the auto-generated bot.py
. Errors below:
settings.json
{
"settings": {
"use_sandbox_websockets": false,
"websocket_buffer_size": 10000,
"test_connectivity_on_auth": true,
"auto_truncate": false,
"coinbase_pro": {
"cash": "USD"
},
"binance": {
"cash": "USDT",
"binance_tld": "com"
},
"binance_futures": {
"cash": "USDT",
"margin_type": "USDT-M"
},
"alpaca": {
"websocket_stream": "iex",
"cash": "USD",
"enable_shorting": true,
"use_yfinance": false
},
"oanda": {
"cash": "USD"
},
"okx": {
"cash": "USDT"
},
"keyless": {
"cash": "USD"
},
"kucoin": {
"cash": "USDT"
},
"ftx": {
"cash": "USD",
"ftx_tld": "com"
},
"ftx_futures": {
"cash": "USD",
"ftx_tld": "com"
}
}
}
backtest.json (if applicable)
{
"price_data": {
"assets": []
},
"settings": {
"use_price": "close",
"smooth_prices": false,
"GUI_output": true,
"show_tickers_with_zero_delta": false,
"save_initial_account_value": true,
"show_progress_during_backtest": true,
"cache_location": "./price_caches",
"continuous_caching": true,
"resample_account_value_for_metrics": "1d",
"quote_account_value_in": "USD",
"ignore_user_exceptions": true,
"risk_free_return_rate": 0.0,
"benchmark_symbol": null
}
}
Error (if applicable)
PS E:\Blankly> python bot.py
Backtesting...
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 11, in price_event
if rsi[-1] < 30 and not curr_value:
IndexError: list index out of range
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 11, in price_event
if rsi[-1] < 30 and not curr_value:
IndexError: list index out of range
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 11, in price_event
if rsi[-1] < 30 and not curr_value:
IndexError: list index out of range
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 11, in price_event
if rsi[-1] < 30 and not curr_value:
IndexError: list index out of range
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 11, in price_event
if rsi[-1] < 30 and not curr_value:
IndexError: list index out of range
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 11, in price_event
if rsi[-1] < 30 and not curr_value:
IndexError: list index out of range
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 11, in price_event
if rsi[-1] < 30 and not curr_value:
IndexError: list index out of range
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 11, in price_event
if rsi[-1] < 30 and not curr_value:
IndexError: list index out of range
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 11, in price_event
if rsi[-1] < 30 and not curr_value:
IndexError: list index out of range
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 11, in price_event
if rsi[-1] < 30 and not curr_value:
IndexError: list index out of range
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 11, in price_event
if rsi[-1] < 30 and not curr_value:
IndexError: list index out of range
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 11, in price_event
if rsi[-1] < 30 and not curr_value:
IndexError: list index out of range
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 11, in price_event
if rsi[-1] < 30 and not curr_value:
IndexError: list index out of range
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 11, in price_event
if rsi[-1] < 30 and not curr_value:
IndexError: list index out of range
Progress: [####------] 41.74% Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 14, in price_event
state.interface.market_order(symbol, side='buy', size=buy)
File "E:\Blankly\venv\lib\site-packages\blankly\exchanges\interfaces\paper_trade\paper_trade_interface.py", line 383, in market_order
raise InvalidOrder("Size resolution is too high, the highest resolution allowed for this symbol is: " +
blankly.utils.exceptions.InvalidOrder: Size resolution is too high, the highest resolution allowed for this symbol is: 1e-09. You specified 0.2294604238134028. Try using blankly.trunc(size, decimal_number) to match the exchange resolution.
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 14, in price_event
state.interface.market_order(symbol, side='buy', size=buy)
File "E:\Blankly\venv\lib\site-packages\blankly\exchanges\interfaces\paper_trade\paper_trade_interface.py", line 383, in market_order
raise InvalidOrder("Size resolution is too high, the highest resolution allowed for this symbol is: " +
blankly.utils.exceptions.InvalidOrder: Size resolution is too high, the highest resolution allowed for this symbol is: 1e-09. You specified 0.23333329444445092. Try using blankly.trunc(size, decimal_number) to match the exchange resolution.
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 14, in price_event
state.interface.market_order(symbol, side='buy', size=buy)
File "E:\Blankly\venv\lib\site-packages\blankly\exchanges\interfaces\paper_trade\paper_trade_interface.py", line 383, in market_order
raise InvalidOrder("Size resolution is too high, the highest resolution allowed for this symbol is: " +
blankly.utils.exceptions.InvalidOrder: Size resolution is too high, the highest resolution allowed for this symbol is: 1e-09. You specified 0.27224403955705895. Try using blankly.trunc(size, decimal_number) to match the exchange resolution.
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 14, in price_event
state.interface.market_order(symbol, side='buy', size=buy)
File "E:\Blankly\venv\lib\site-packages\blankly\exchanges\interfaces\paper_trade\paper_trade_interface.py", line 383, in market_order
raise InvalidOrder("Size resolution is too high, the highest resolution allowed for this symbol is: " +
blankly.utils.exceptions.InvalidOrder: Size resolution is too high, the highest resolution allowed for this symbol is: 1e-09. You specified 0.2678037972971634. Try using blankly.trunc(size, decimal_number) to match the exchange resolution.
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 14, in price_event
state.interface.market_order(symbol, side='buy', size=buy)
File "E:\Blankly\venv\lib\site-packages\blankly\exchanges\interfaces\paper_trade\paper_trade_interface.py", line 383, in market_order
raise InvalidOrder("Size resolution is too high, the highest resolution allowed for this symbol is: " +
blankly.utils.exceptions.InvalidOrder: Size resolution is too high, the highest resolution allowed for this symbol is: 1e-09. You specified 0.2668315329765084. Try using blankly.trunc(size, decimal_number) to match the exchange resolution.
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 14, in price_event
state.interface.market_order(symbol, side='buy', size=buy)
File "E:\Blankly\venv\lib\site-packages\blankly\exchanges\interfaces\paper_trade\paper_trade_interface.py", line 383, in market_order
raise InvalidOrder("Size resolution is too high, the highest resolution allowed for this symbol is: " +
blankly.utils.exceptions.InvalidOrder: Size resolution is too high, the highest resolution allowed for this symbol is: 1e-09. You specified 0.2876980045554102. Try using blankly.trunc(size, decimal_number) to match the exchange resolution.
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 14, in price_event
state.interface.market_order(symbol, side='buy', size=buy)
File "E:\Blankly\venv\lib\site-packages\blankly\exchanges\interfaces\paper_trade\paper_trade_interface.py", line 383, in market_order
raise InvalidOrder("Size resolution is too high, the highest resolution allowed for this symbol is: " +
blankly.utils.exceptions.InvalidOrder: Size resolution is too high, the highest resolution allowed for this symbol is: 1e-09. You specified 0.2119949273853775. Try using blankly.trunc(size, decimal_number) to match the exchange resolution.
Progress: [########--] 83.75% Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 14, in price_event
state.interface.market_order(symbol, side='buy', size=buy)
File "E:\Blankly\venv\lib\site-packages\blankly\exchanges\interfaces\paper_trade\paper_trade_interface.py", line 383, in market_order
raise InvalidOrder("Size resolution is too high, the highest resolution allowed for this symbol is: " +
blankly.utils.exceptions.InvalidOrder: Size resolution is too high, the highest resolution allowed for this symbol is: 1e-09. You specified 0.24058599048530524. Try using blankly.trunc(size, decimal_number) to match the exchange resolution.
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 14, in price_event
state.interface.market_order(symbol, side='buy', size=buy)
File "E:\Blankly\venv\lib\site-packages\blankly\exchanges\interfaces\paper_trade\paper_trade_interface.py", line 383, in market_order
raise InvalidOrder("Size resolution is too high, the highest resolution allowed for this symbol is: " +
blankly.utils.exceptions.InvalidOrder: Size resolution is too high, the highest resolution allowed for this symbol is: 1e-09. You specified 0.2398953672366261. Try using blankly.trunc(size, decimal_number) to match the exchange resolution.
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 14, in price_event
state.interface.market_order(symbol, side='buy', size=buy)
File "E:\Blankly\venv\lib\site-packages\blankly\exchanges\interfaces\paper_trade\paper_trade_interface.py", line 383, in market_order
raise InvalidOrder("Size resolution is too high, the highest resolution allowed for this symbol is: " +
blankly.utils.exceptions.InvalidOrder: Size resolution is too high, the highest resolution allowed for this symbol is: 1e-09. You specified 0.2742961971026641. Try using blankly.trunc(size, decimal_number) to match the exchange resolution.
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 14, in price_event
state.interface.market_order(symbol, side='buy', size=buy)
File "E:\Blankly\venv\lib\site-packages\blankly\exchanges\interfaces\paper_trade\paper_trade_interface.py", line 383, in market_order
raise InvalidOrder("Size resolution is too high, the highest resolution allowed for this symbol is: " +
blankly.utils.exceptions.InvalidOrder: Size resolution is too high, the highest resolution allowed for this symbol is: 1e-09. You specified 0.2851730273084543. Try using blankly.trunc(size, decimal_number) to match the exchange resolution.
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 14, in price_event
state.interface.market_order(symbol, side='buy', size=buy)
File "E:\Blankly\venv\lib\site-packages\blankly\exchanges\interfaces\paper_trade\paper_trade_interface.py", line 383, in market_order
raise InvalidOrder("Size resolution is too high, the highest resolution allowed for this symbol is: " +
blankly.utils.exceptions.InvalidOrder: Size resolution is too high, the highest resolution allowed for this symbol is: 1e-09. You specified 0.27561519378366467. Try using blankly.trunc(size, decimal_number) to match the exchange resolution.
Traceback (most recent call last):
File "E:\Blankly\venv\lib\site-packages\blankly\frameworks\strategy\strategy.py", line 134, in rest_event
callback(*args)
File "bot.py", line 14, in price_event
state.interface.market_order(symbol, side='buy', size=buy)
File "E:\Blankly\venv\lib\site-packages\blankly\exchanges\interfaces\paper_trade\paper_trade_interface.py", line 383, in market_order
raise InvalidOrder("Size resolution is too high, the highest resolution allowed for this symbol is: " +
blankly.utils.exceptions.InvalidOrder: Size resolution is too high, the highest resolution allowed for this symbol is: 1e-09. You specified 0.27252916879693634. Try using blankly.trunc(size, decimal_number) to match the exchange resolution.
Progress: [##########] 100% Done...
INFO: View your backtest here: https://app.blankly.finance/tNCUuA37tlaRvGsJt1SafNzvDWq1/pYqm1mhqsOWPXXaynm7T/fcaf0f79-72bb-4eac-866a-9d831b192f44/backtest
Historical Dataframes:
Account History:
BTC USD time Account Value (USD)
0 0 10000 1588377600.0 10000.0
1 0 10000 1588377600.0 10000.0
2 0 10000 1588464000.0 10000.0
3 0 10000 1588550400.0 10000.0
4 0 10000 1588636800.0 10000.0
.. .. ... ... ...
711 0 10000 1649721600.0 10000.0
712 0 10000 1649808000.0 10000.0
713 0 10000 1649894400.0 10000.0
714 0 10000 1649980800.0 10000.0
715 0 10000 1650067200.0 10000.0
[716 rows x 4 columns]
Account Returns:
time value
0 1.588378e+09 NaN
1 1.588464e+09 0.0
2 1.588550e+09 0.0
3 1.588637e+09 0.0
4 1.588723e+09 0.0
.. ... ...
710 1.649722e+09 0.0
711 1.649808e+09 0.0
712 1.649894e+09 0.0
713 1.649981e+09 0.0
714 1.650067e+09 0.0
[715 rows x 2 columns]
Resampled Account Value:
time value
0 1.588378e+09 10000.0
1 1.588464e+09 10000.0
2 1.588550e+09 10000.0
3 1.588637e+09 10000.0
4 1.588723e+09 10000.0
.. ... ...
710 1.649722e+09 10000.0
711 1.649808e+09 10000.0
712 1.649894e+09 10000.0
713 1.649981e+09 10000.0
714 1.650067e+09 10000.0
[715 rows x 2 columns]
Blankly Metrics:
Calmar Ratio: 0.0
Compound Annual Growth Rate (%): 0.0%
Conditional Value-at-Risk: 0.0
Cumulative Returns (%): 0.0%
Max Drawdown (%): 0.0%
Resampled Time: 86400.0
Risk Free Return Rate: 0.0
Sharpe Ratio: 0.0
Sortino Ratio: None
Value-at-Risk: 0.0
Variance (%): 0.0%
Volatility: 0.0
Platform Info
- Python version: 3.8.2
- Platform: Windows 11, PyCharm 2021.2.1
Additional context