Blankly - 🚀 💸 Trade stocks, cryptos, and forex w/ one package. Easily build, backtest, trade, and deploy across exchanges in a few lines of code.

Overview


💨 Rapidly build and deploy quantitative models for stocks, crypto, and forex 🚀


View Docs · Our Website · Join Our Newsletter · Getting Started


Why Blankly?

Blankly is an elegant python library for interacting with crypto, stocks, and forex for in a consistent and streamlined way. Now, no more reading API or struggling to get data. Blankly offers a powerful feature-set, optimized for speed and ease of use, better backtesting, and ultimately better models.

We're bridging the gap between local development systems & live APIs by building a framework which allows backtesting, paper trading, sandbox testing, and live cross-exchange deployment without modifying a single line of trading logic.

Check out our website and our docs.

Trade Stocks, Crypto, and Forex Seamlessly

from blankly import Alpaca, CoinbasePro

stocks = Alpaca()
crypto = CoinbasePro()

# Easily perform the same actions across exchanges & asset types
stocks.interface.market_order('AAPL', 'buy', 1)
crypto.interface.market_order('BTC-USD', 'buy', 1)

Backtest Instantly Across Symbols

from blankly import Alpaca, Strategy, StrategyState


def price_event(price, symbol, state):
    # Trading logic here
    state.interface.market_order(symbol, 'buy', 1)


# Authenticate
alpaca = Alpaca()
strategy = Strategy(alpaca)

# Check price every hour and send to the strategy function
# Easily switch resolutions and data
strategy.add_price_event(price_event, 'AAPL', '1h')
strategy.add_price_event(price_event, 'MSFT', '15m')

# Run the backtest
strategy.backtest(to='1y')

Accurate Backtest Holdings

Useful Metrics

Blankly Metrics: 
Compound Annual Growth Rate (%):   54.0%
Cumulative Returns (%):            136.0%
Max Drawdown (%):                  60.0%
Variance (%):                      26.15%
Sortino Ratio:                     0.9
Sharpe Ratio:                      0.73
Calmar Ratio:                      0.99
Volatility:                        0.05
Value-at-Risk:                     358.25
Conditional Value-at-Risk:         34.16

Go Live in One Line

Seamlessly run your model live!

# Just turn this
strategy.backtest(to='1y')
# Into this
strategy.start()

Dates, times, and scheduling adjust on the backend to make the experience instant.

Quickstart

Installation

  1. First install Blankly using pip. Blankly is hosted on PyPi.
$ pip install blankly
  1. Next, just run:
$ blankly init

This will initialize your working directory.

The command will create the files keys.json, settings.json, backtest.json, deploy.json and an example script called bot.py.

If you don't want to use our init command, you can find the same files in the examples folder under settings.json and keys_example.json

  1. From there, insert your API keys from your exchange into the generated keys.json file.

More information can be found on our docs

Directory format

The working directory format should have at least these files:

Project
   |-bot.py
   |-keys.json
   |-settings.json

Additional Info

Make sure you're using a supported version of python. The module is currently tested on these versions:

  • Python 3.7
  • Python 3.8
  • Python 3.9
  • Python 3.10

For more info, and ways to do more advanced things, check out our getting started docs.

Supported Exchanges

Exchange Integrate Websockets Paper Trading Backtesting
Coinbase Pro 🟢 🟢 🟢 🟢
Binance 🟢 🟢 🟢 🟢
Alpaca 🟢 🟢 🟢 🟢
OANDA 🟢 🟡 🟢 🟢
FTX 🔴 🔴 🔴 🔴
TD Ameritrade 🔴 🔴 🔴 🔴
Webull 🔴 🔴 🔴 🔴
Robinhood 🔴 🔴 🔴 🔴

🟢 = working

🟡 = in development, some or most features are working

🔴 = planned but not yet in development

  • Interface calls take ~300 µs extra to homogenize the exchange data.

RSI Example

We have a pre-built cookbook examples that implement strategies such as RSI, MACD, and the Golden Cross found in our examples.

The model below will run an RSI check every 30 minutes - buying below 30 and selling above 70 .

import blankly
from blankly import StrategyState


def price_event(price, symbol, state: StrategyState):
    """ This function will give an updated price every 15 seconds from our definition below """
    state.variables['history'].append(price)
    rsi = blankly.indicators.rsi(state.variables['history'])
    
    if rsi[-1] < 30 and not state.variables['has_bought']:
        # Dollar cost average buy
        state.variables['has_bought'] = True
        state.interface.market_order(symbol, side='buy', size=1)
    elif rsi[-1] > 70 and state.variables['has_bought']:
        # Dollar cost average sell
        state.variables['has_bought'] = False
        state.interface.market_order(symbol, side='sell', size=1)


def init(symbol, state: StrategyState):
    # Download price data to give context to the algo
    state.variables['history'] = state.interface.history(symbol, to='1y', return_as='list')['open']
    state.variables['has_bought'] = False


if __name__ == "__main__":
    # Authenticate on alpaca to create a strategy
    alpaca = blankly.Alpaca()

    # Use our strategy helper on alpaca
    strategy = blankly.Strategy(alpaca)

    # Run the price event function every time we check for a new price - by default that is 15 seconds
    strategy.add_price_event(price_event, symbol='NCLH', resolution='30m', init=init)
    strategy.add_price_event(price_event, symbol='CRBP', resolution='1h', init=init)
    strategy.add_price_event(price_event, symbol='D', resolution='15m', init=init)
    strategy.add_price_event(price_event, symbol='GME', resolution='30m', init=init)

    # Start the strategy. This will begin each of the price event ticks
    # strategy.start()
    # Or backtest using this
    strategy.backtest(to='1y')

Other Info

Subscribe to our news!

https://blankly.substack.com/p/coming-soon

Bugs

Please report any bugs or issues on the GitHub's Issues page.

Disclaimer

Trading is risky. We are not responsible for losses incurred using this software, software fitness for any particular purpose, or responsibility for any issues or bugs. This is free software.

Contributing

If you would like to support the project, pull requests are welcome. You can also contribute just by telling us what you think of Blankly: https://forms.gle/4oAjG9MKRTYKX2hP9

Licensing

Blankly is distributed under the LGPL License. See the LICENSE for more details.

New updates every day 💪 .

Comments
  • Coinbase Pro backtest not running

    Coinbase Pro backtest not running

    Description

    1. INFO: "enable_shorting" not specified in preferences, defaulting to: "True" Where do I specify it to be "false" or "true"?
    2. KeyError: 'maker_fee_rate' API keys look right but not sure. Am seeing the following object for "fees" retrieved from CoinbasePro: image

    My Code:

    coinbase = CoinbasePro()
    s = Strategy(coinbase)
    s.add_price_event(price_event, 'BTC-USD', resolution='30m', init=init)
    result = s.backtest(initial_values={'USD': 10000}, to='2y')
    

    settings.json

        "settings": {
          "account_update_time": 5000,
          "use_sandbox": false,
          "use_sandbox_websockets": false,
          "websocket_buffer_size": 10000,
          "test_connectivity_on_auth": true,
      
          "coinbase_pro": {
            "cash": "USD"
          },
          "binance": {
            "cash": "USDT",
            "binance_tld": "us"
          },
          "alpaca": {
            "websocket_stream": "iex",
            "cash": "USD"
          },
          "oanda": {
            "cash": "USD"
          }
        }
      }
    

    backtest.json (if applicable)

    backtest.json here
    

    Error (if applicable)

    Traceback (most recent call last):
      File "H:\ProgramData\Anaconda3\lib\runpy.py", line 194, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "H:\ProgramData\Anaconda3\lib\runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "c:\Users\xxxxxxxxxx\.vscode\extensions\ms-python.python-2021.12.1559732655\pythonFiles\lib\python\debugpy\__main__.py", line 45, in <module>
        cli.main()
      File "c:\Users\xxxxxxxxxx\.vscode\extensions\ms-python.python-2021.12.1559732655\pythonFiles\lib\python\debugpy/..\debugpy\server\cli.py", line 444, in main
        run()
      File "c:\Users\xxxxxxxxxx\.vscode\extensions\ms-python.python-2021.12.1559732655\pythonFiles\lib\python\debugpy/..\debugpy\server\cli.py", line 285, in run_file
        runpy.run_path(target_as_str, run_name=compat.force_str("__main__"))
      File "H:\ProgramData\Anaconda3\lib\runpy.py", line 265, in run_path
        return _run_module_code(code, init_globals, run_name,
      File "H:\ProgramData\Anaconda3\lib\runpy.py", line 97, in _run_module_code
        _run_code(code, mod_globals, init_globals,
      File "H:\ProgramData\Anaconda3\lib\runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "c:\git\crypto-test\src\macd\macd.py", line 57, in <module>
        s = Strategy(coinbase)
      File "C:\Users\xxxxxxxxxx\AppData\Roaming\Python\Python38\site-packages\blankly\frameworks\strategy\strategy_base.py", line 64, in __init__
        self.__paper_trade_exchange = blankly.PaperTrade(self.__exchange)
      File "C:\Users\xxxxxxxxxx\AppData\Roaming\Python\Python38\site-packages\blankly\exchanges\interfaces\paper_trade\paper_trade.py", line 28, in __init__
        self.interface = PaperTradeInterface(authenticated_exchange.get_interface(),
      File "C:\Users\xxxxxxxxxx\AppData\Roaming\Python\Python38\site-packages\blankly\exchanges\interfaces\paper_trade\paper_trade_interface.py", line 56, in __init__
        ExchangeInterface.__init__(self, derived_interface.get_exchange_type(), derived_interface)
      File "C:\Users\xxxxxxxxxx\AppData\Roaming\Python\Python38\site-packages\blankly\exchanges\interfaces\exchange_interface.py", line 135, in __init__
        self.init_exchange()
      File "C:\Users\xxxxxxxxxx\AppData\Roaming\Python\Python38\site-packages\blankly\exchanges\interfaces\paper_trade\paper_trade_interface.py", line 131, in init_exchange
        "maker_fee_rate": fees['maker_fee_rate'],
    KeyError: 'maker_fee_rate'
    

    Platform Info

    • Python version: Python 3.8.8 64-bit ("base", conda)
    • Platform: Windows 10

    Additional context Add any other context about the problem here.

    opened by sparky2708 11
  • M1 Mac support?

    M1 Mac support?

    Description

    Unable to pip3 install blankly on an M1 MacBook Big Sur.

    Error (if applicable)

    Collecting scikit-learn
      Downloading scikit-learn-1.0.1.tar.gz (6.6 MB)
         |████████████████████████████████| 6.6 MB 3.8 MB/s 
      Installing build dependencies ... error
      ERROR: Command errored out with exit status 1:
       command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 /private/var/folders/t9/2fb8pd6s41b0d41lk81pk_700000gn/T/pip-standalone-pip-ata6s47j/__env_pip__.zip/pip install --ignore-installed --no-user --prefix /private/var/folders/t9/2fb8pd6s41b0d41lk81pk_700000gn/T/pip-build-env-gp_u1yzv/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.28.5' 'oldest-supported-numpy; python_version!='"'"'3.7'"'"' or platform_machine=='"'"'aarch64'"'"' or platform_system=='"'"'AIX'"'"' or platform_python_implementation == '"'"'PyPy'"'"'' 'numpy==1.14.6; python_version=='"'"'3.7'"'"' and platform_machine!='"'"'aarch64'"'"' and platform_system!='"'"'AIX'"'"' and platform_python_implementation != '"'"'PyPy'"'"'' 'scipy>=1.1.0'
           cwd: None
      Complete output (55279 lines):
      Ignoring numpy: markers 'python_version == "3.7" and platform_machine != "aarch64" and platform_system != "AIX" and platform_python_implementation != "PyPy"' don't match your environment
    

    also

    clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
    

    Platform Info

    • Python version: 3.9.9
    • Platform: MacOS M1
    opened by 24dev 11
  • symbol not found

    symbol not found

    Description

    whatever I do, I can't get past the "symbol not found" error.

    Standard RSI strategy

    import blankly
    from blankly import StrategyState
    
    
    def price_event(price, symbol, state: StrategyState):
        """ This function will give an updated price every 15 seconds from our definition below """
        state.variables['history'].append(price)
        rsi = blankly.indicators.rsi(state.variables['history'])
        if rsi[-1] < 30:
            # Dollar cost average buy
            state.interface.market_order(symbol, side='buy', funds=10)
        elif rsi[-1] > 70:
            # Dollar cost average sell
            state.interface.market_order(symbol, side='sell', funds=10)
    
    
    def init(symbol, state: StrategyState):
        # Download price data to give context to the algo
        state.variables['history'] = state.interface.history(symbol, start_date = "2021-08-01", end_date = "2021-08-28", return_as='list')['close']
    
    
    if __name__ == "__main__":
        binance = blankly.Binance(portfolio_name="ATD Binance")
        binance_strategy = blankly.Strategy(binance)
        binance_strategy.add_price_event(price_event, symbol='ETH-USDT', resolution='1h', init=init)
    
        # Start the strategy. This will begin each of the price event ticks
        # binance_strategy.start()
        # Or backtest using this
        binance_strategy.backtest(start_date = "2021-08-01", end_date = "2021-08-28",
                                  initial_values={'USDT': 100})
    

    settings.json

    {
      "settings": {
        "account_update_time": 5000,
        "use_sandbox": false,
        "use_sandbox_websockets": false,
        "websocket_buffer_size": 10000,
    
        "coinbase_pro": {
          "cash": "USD"
        },
        "binance": {
          "cash": "USDT",
          "binance_tld": "com"
        },
        "alpaca": {
          "websocket_stream": "iex",
          "cash": "USD"
        }
      }
    }
    

    backtest.json

    {
      "price_data": {
        "assets": [
          [ "ETH-USDT", 1546290000, 1630270800, 300.0 ],
          [ "ETH-USDT", 1546290000, 1630270800, 900.0 ],
          [ "ETH-USDT", 1546290000, 1630270800, 1800.0 ],
          [ "ETH-USDT", 1546290000, 1630270800, 3600.0 ],
          [ "ETH-USDT", 1546290000, 1630270800, 14400.0 ],
          [ "ETH-USDT", 1546290000, 1630270800, 21600.0 ],
          [ "ETH-USDT", 1546290000, 1630270800, 86400.0 ]
        ]
      },
      "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",
        "resample_account_value_for_metrics": "1d",
        "quote_account_value_in": "USDT",
        "ignore_user_exceptions": false
      }
    }
    

    Error in Pyzo Editor

    Including: ETH-USDT,1546290000,1630270800,300.0.csv in backtest.
    Including: ETH-USDT,1546290000,1630270800,900.0.csv in backtest.
    Including: ETH-USDT,1546290000,1630270800,1800.0.csv in backtest.
    Including: ETH-USDT,1546290000,1630270800,3600.0.csv in backtest.
    Including: ETH-USDT,1546290000,1630270800,14400.0.csv in backtest.
    Including: ETH-USDT,1546290000,1630270800,21600.0.csv in backtest.
    Including: ETH-USDT,1546290000,1630270800,86400.0.csv in backtest.
    Including: ETH-USDT,1627776000.0,1630108800.0,3600.0.csv in backtest.
    Including: ETH-USDT,1598774943.8658986,1630310943.8658986,3600.0.csv in backtest.
    No exact cache exists for ETH-USDT from 1630310996.5534158 to 1630311056.5534158 at 3600.0s resolution. Downloading...
    already identified
    
    Initializing...
    1630098000.0
    Traceback (most recent call last):
      File "C:\Blankly\RSI-strategy.py", line 30, in <module>
        binance_strategy.backtest(start_date = "2021-08-01", end_date = "2021-08-28",
      File "c:\python39\lib\site-packages\blankly\strategy\strategy_base.py", line 473, in backtest
        results = self.backtesting_controller.run()
      File "c:\python39\lib\site-packages\blankly\exchanges\interfaces\paper_trade\backtest_controller.py", line 397, in run
        available_dict, no_trade_dict = self.format_account_data(self.initial_time)
      File "c:\python39\lib\site-packages\blankly\exchanges\interfaces\paper_trade\backtest_controller.py", line 221, in format_account_data
        true_account[i] = self.interface.get_account(i)
      File "c:\python39\lib\site-packages\blankly\exchanges\interfaces\paper_trade\paper_trade_interface.py", line 298, in get_account
        raise KeyError("Symbol not found.")
    KeyError: 'Symbol not found.'
    

    Error in CMD

    C:\Blankly>RSI-strategy.py
    Including: ETH-USDT,1546290000,1630270800,300.0.csv in backtest.
    Including: ETH-USDT,1546290000,1630270800,900.0.csv in backtest.
    Including: ETH-USDT,1546290000,1630270800,1800.0.csv in backtest.
    Including: ETH-USDT,1546290000,1630270800,3600.0.csv in backtest.
    Including: ETH-USDT,1546290000,1630270800,14400.0.csv in backtest.
    Including: ETH-USDT,1546290000,1630270800,21600.0.csv in backtest.
    Including: ETH-USDT,1546290000,1630270800,86400.0.csv in backtest.
    Including: ETH-USDT,1627776000.0,1630108800.0,3600.0.csv in backtest.
    
    Initializing...
    1630098000.0
    Traceback (most recent call last):
      File "C:\Python39\lib\site-packages\blankly\exchanges\interfaces\paper_trade\paper_trade_interface.py", line 296, in get_account
        return trade_local.get_account(symbol)
      File "C:\Python39\lib\site-packages\blankly\exchanges\interfaces\paper_trade\local_account\trade_local.py", line 125, in get_account
        return copy.deepcopy(utils.AttributeDict(local_account.account[asset_id]))
    KeyError: 'USD'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "C:\Blankly\RSI-strategy.py", line 30, in <module>
        binance_strategy.backtest(start_date = "2021-08-01", end_date = "2021-08-28",
      File "C:\Python39\lib\site-packages\blankly\strategy\strategy_base.py", line 473, in backtest
        results = self.backtesting_controller.run()
      File "C:\Python39\lib\site-packages\blankly\exchanges\interfaces\paper_trade\backtest_controller.py", line 397, in run
        available_dict, no_trade_dict = self.format_account_data(self.initial_time)
      File "C:\Python39\lib\site-packages\blankly\exchanges\interfaces\paper_trade\backtest_controller.py", line 221, in format_account_data
        true_account[i] = self.interface.get_account(i)
      File "C:\Python39\lib\site-packages\blankly\exchanges\interfaces\paper_trade\paper_trade_interface.py", line 298, in get_account
        raise KeyError("Symbol not found.")
    KeyError: 'Symbol not found.'
    

    Platform Info

    • Python version: 3.9.6
    • Platform: Win10
    opened by alitekdemir 11
  • KeylessExchange yields wrong backtest results

    KeylessExchange yields wrong backtest results

    Hi! I wanted to test the KeylessExchange with a simple buy and hold on SPY. It seems like the state does not register the account value while holding. I get backtest result of -98% cumulative return.

    Here is a plot of account value as a function of time, where you can see that the value starts at 10000 USD but goes to 0 once i buy. image

    opened by Fschoeller 10
  • Default example bot.py error

    Default example bot.py error

    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

    opened by mr-september 9
  • TypeError: ufunc 'isnan' not supported for the input types

    TypeError: ufunc 'isnan' not supported for the input types

    Description

    When I try the RSI code on the Google Colab Jupyter, I get the following error.

    Error on Colab

    TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
    
    INFO: "use_yfinance" not specified in preferences, defaulting to: "False"
    No cached data found for ETH-USDT from: 1642515960 to 1642524144 at a resolution of 3600 seconds.
    
    Initializing...
    
    Backtesting...
    Progress: [#---------] 14.87% Traceback (most recent call last):
      File "/usr/local/lib/python3.7/dist-packages/blankly/exchanges/interfaces/paper_trade/backtest_controller.py", line 706, in run
        'state_object'])
      File "<ipython-input-3-1733380c8989>", line 10, in price_event
        state.interface.market_order(symbol, side='buy', size=buy)
      File "/usr/local/lib/python3.7/dist-packages/blankly/exchanges/interfaces/paper_trade/paper_trade_interface.py", line 363, in market_order
        raise InvalidOrder(f"Size is too small. Minimum is: {min_size}. You requested {size}.")
    blankly.utils.exceptions.InvalidOrder: Size is too small. Minimum is: 0.0001. You requested 0.
    Traceback (most recent call last):
      File "/usr/local/lib/python3.7/dist-packages/blankly/exchanges/interfaces/paper_trade/backtest_controller.py", line 706, in run
        'state_object'])
      File "<ipython-input-3-1733380c8989>", line 10, in price_event
        state.interface.market_order(symbol, side='buy', size=buy)
      File "/usr/local/lib/python3.7/dist-packages/blankly/exchanges/interfaces/paper_trade/paper_trade_interface.py", line 363, in market_order
        raise InvalidOrder(f"Size is too small. Minimum is: {min_size}. You requested {size}.")
    blankly.utils.exceptions.InvalidOrder: Size is too small. Minimum is: 0.0001. You requested 0.
    Traceback (most recent call last):
    ...
    /usr/local/lib/python3.7/dist-packages/blankly/metrics/portfolio.py:55: RuntimeWarning: invalid value encountered in double_scalars
      return mean / std
    ---------------------------------------------------------------------------
    TypeError                                 Traceback (most recent call last)
    <ipython-input-3-1733380c8989> in <module>()
         30   # strategy.start()
         31   # Or backtest using this
    ---> 32   results = strategy.backtest(to='1y', initial_values={'USDT': 10000})
         33   print(results)
    
    1 frames
    /usr/local/lib/python3.7/dist-packages/blankly/exchanges/interfaces/paper_trade/backtest_controller.py in run(self)
        908         # Lastly remove Nan values in the metrics
        909         for i in metrics_indicators:
    --> 910             if np.isnan(metrics_indicators[i]):
        911                 metrics_indicators[i] = None
        912 
    
    TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
    
    

    chrome_0J9966GLO4

    When I try the RSI code on the Windows desktop, I get the following error.

    Error on Windows Desktop

    c:\python38\lib\site-packages\blankly\metrics\portfolio.py:60: RuntimeWarning: invalid value encountered in double_scalars
      return return_series.mean() * n / abs(max_drawdown(return_series))
    

    pyzo_dTWgsPQ6Cc

    opened by alitekdemir 9
  • Binance Api Connection Error

    Binance Api Connection Error

    When i try my test binance api it is work correctly but my real binance account doesnt work! I use my api in wunderbit and other services. Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) on Windows (64 bits).

    GetInfo.py

    import blankly
    exchange = blankly.Binance(portfolio_name="Blankly Binance")
    interface = exchange.get_interface()  # Use the getter
    print(interface.get_account())
    
    

    keys.json

    {
        "binance": {
            "Blankly Binance": {
                "API_KEY": "y*********************************************************************",
                "API_SECRET": "yx*********************************************************************"
            },
            "ATD Test": {
                "API_KEY": "x*********************************************************************",
                "API_SECRET": "xx*********************************************************************"
            }
        }
    }
    

    settings.json

    {
      "settings": {
        "account_update_time": 5000,
        "use_sandbox": true,
        "use_sandbox_websockets": false,
        "websocket_buffer_size": 10000,
    
        "coinbase_pro": {
          "cash": "USD"
        },
        "binance": {
          "cash": "USDT",
          "binance_tld": "com"
        },
        "alpaca": {
          "websocket_stream": "iex",
          "cash": "USD"
        }
      }
    }
    
    

    Error

    >>> (executing file "GetInfo.py")
    Traceback (most recent call last):
      File "C:\Blankly\GetInfo.py", line 2, in <module>
        exchange = blankly.Binance(portfolio_name="Blankly Binance")
      File "c:\python39\lib\site-packages\blankly\exchanges\interfaces\binance\binance.py", line 27, in __init__
        Exchange.__init__(self, "binance", portfolio_name, keys_path, settings_path)
      File "c:\python39\lib\site-packages\blankly\exchanges\exchange.py", line 41, in __init__
        self.calls, self.interface = self.__direct_calls_factory.create(self.__type, self.__auth, preferences_path)
      File "c:\python39\lib\site-packages\blankly\exchanges\interfaces\direct_calls_factory.py", line 51, in create
        return calls, BinanceInterface(exchange_name, calls)
      File "c:\python39\lib\site-packages\blankly\exchanges\interfaces\binance\binance_interface.py", line 34, in __init__
        super().__init__(exchange_name, authenticated_API)
      File "c:\python39\lib\site-packages\blankly\exchanges\interfaces\exchange_interface.py", line 43, in __init__
        self.init_exchange()
      File "c:\python39\lib\site-packages\blankly\exchanges\interfaces\binance\binance_interface.py", line 40, in init_exchange
        raise exceptions.APIException("Invalid API Key, IP, or permissions for action - are you trying "
    blankly.utils.exceptions.APIException: Invalid API Key, IP, or permissions for action - are you trying to use your normal exchange keys while in sandbox mode?
    
    opened by alitekdemir 9
  • Example scripts error

    Example scripts error

    Description

    As in the title. Provided examples throw errors during execution Tested files: bot.py (generated by 'blankly init' command), examples/rsi.py, examples/mlp_model.py

    settings.json

    {
      "settings": {
        "account_update_time": 5000,
        "use_sandbox": true,
        "use_sandbox_websockets": true,
        "websocket_buffer_size": 10000,
        "test_connectivity_on_auth": true,
        "coinbase_pro": {
          "cash": "USD"
        },
        "binance": {
          "cash": "USDT",
          "binance_tld": "us"
        },
        "alpaca": {
          "websocket_stream": "iex",
          "cash": "USD"
        }
      }
    }
    

    backtest.json

    {
      "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": "USDT",
        "ignore_user_exceptions": false,
        "risk_free_return_rate": 0.0
      }
    }
    

    Error

    rsi.py

    Traceback (most recent call last):
      File "/home/jakub/anaconda3/envs/cbot/lib/python3.9/site-packages/blankly/exchanges/interfaces/paper_trade/backtest_controller.py", line 692, in run
        raise e
      File "/home/jakub/anaconda3/envs/cbot/lib/python3.9/site-packages/blankly/exchanges/interfaces/paper_trade/backtest_controller.py", line 685, in run
        self.price_events[0]['function'](self.interface.get_price(self.price_events[0]['asset_id']),
      File "/home/jakub/PycharmProjects/bot/blankly/rsi.py", line 7, in price_event
        rsi = blankly.indicators.rsi(state.variables['history'])
      File "/home/jakub/anaconda3/envs/cbot/lib/python3.9/site-packages/blankly/indicators/oscillators.py", line 33, in rsi
        rsi_values = ti.rsi(data, period)
      File "/home/jakub/anaconda3/envs/cbot/lib/python3.9/site-packages/tulipy/__init__.py", line 1003, in rsi
        return lib.rsi([real], [period])
      File "tulipy/lib/__init__.pyx", line 105, in tulipy.lib._Indicator.__call__
    tulipy.lib.InvalidOptionError
    

    mlp_model.py

    Traceback (most recent call last):
      File "/home/jakub/anaconda3/envs/cbot/lib/python3.9/site-packages/blankly/exchanges/interfaces/paper_trade/backtest_controller.py", line 692, in run
        raise e
      File "/home/jakub/anaconda3/envs/cbot/lib/python3.9/site-packages/blankly/exchanges/interfaces/paper_trade/backtest_controller.py", line 685, in run
        self.price_events[0]['function'](self.interface.get_price(self.price_events[0]['asset_id']),
      File "/home/jakub/PycharmProjects/bot/blankly/mlp_model.py", line 38, in price_event
        rsi_values = rsi(variables['history'], period=14).reshape(-1, 1)
      File "/home/jakub/anaconda3/envs/cbot/lib/python3.9/site-packages/blankly/indicators/oscillators.py", line 33, in rsi
        rsi_values = ti.rsi(data, period)
      File "/home/jakub/anaconda3/envs/cbot/lib/python3.9/site-packages/tulipy/__init__.py", line 1003, in rsi
        return lib.rsi([real], [period])
      File "tulipy/lib/__init__.pyx", line 105, in tulipy.lib._Indicator.__call__
    tulipy.lib.InvalidOptionError
    

    bot.py

    Traceback (most recent call last):
      File "/home/jakub/PycharmProjects/bot/blankly2/bot.py", line 39, in <module>
        results = strategy.backtest(to='1y', initial_values={'USDT': 10000})
      File "/home/jakub/anaconda3/envs/cbot/lib/python3.9/site-packages/blankly/frameworks/strategy/strategy_base.py", line 495, in backtest
        results = self.backtesting_controller.run()
      File "/home/jakub/anaconda3/envs/cbot/lib/python3.9/site-packages/blankly/exchanges/interfaces/paper_trade/backtest_controller.py", line 543, in run
        self.interface.receive_price(k, v[use_price].iloc[0])
      File "/home/jakub/anaconda3/envs/cbot/lib/python3.9/site-packages/pandas/core/indexing.py", line 879, in __getitem__
        return self._getitem_axis(maybe_callable, axis=axis)
      File "/home/jakub/anaconda3/envs/cbot/lib/python3.9/site-packages/pandas/core/indexing.py", line 1496, in _getitem_axis
        self._validate_integer(key, axis)
      File "/home/jakub/anaconda3/envs/cbot/lib/python3.9/site-packages/pandas/core/indexing.py", line 1437, in _validate_integer
        raise IndexError("single positional indexer is out-of-bounds")
    IndexError: single positional indexer is out-of-bounds
    

    Platform Info

    • Python version: 3.9 Anaconda based
    • Platform: Ubuntu 20.04.3 LTS

    Additional context Library installed as proposed in https://github.com/Blankly-Finance/Blankly#quickstart

    All example scripts and json files were modified to use sandbox account and API for Binance, also USD was changed to USDT in symbols and portfolio.

    opened by jgrabek 8
  • blankly core code integrate too many real exchange code

    blankly core code integrate too many real exchange code

    checking the source code, I found the blankly core code like TickManager and OrderbookManager integrate too many real exchange code like binance. I think the core code should implement a abstract exchange. any real exchange extend the abstract exchange inpedently. so we can add more exchagne easily.

    invalid 
    opened by jandykwan 7
  • Code often freezes when paper trading

    Code often freezes when paper trading

    Hi! Around 50% of the time when starting a bot it will freeze up when using the broker interface and wait for thread lock. When killing the script i get

    Traceback (most recent call last):
      File "/usr/lib/python3.7/threading.py", line 1281, in _shutdown
        t.join()
      File "/usr/lib/python3.7/threading.py", line 1032, in join
        self._wait_for_tstate_lock()
      File "/usr/lib/python3.7/threading.py", line 1048, in _wait_for_tstate_lock
        elif lock.acquire(block, timeout):
    KeyboardInterrupt
    

    restarting the script often solves the problem.

    opened by Fschoeller 7
  • Shorting stock not developed?

    Shorting stock not developed?

    Hi,

    Thank you for the very useful package! I'm trying to backtest a strategy that involves shorting a stock/crypto. This means I make a call like: interface.market_order('MSFT', 'sell', 1) in a price_event function.

    This results in an error message such as: *** blankly.utils.exceptions.InvalidOrder: Not enough base currency. Available: 0.0. hold: 0. requested: 1.

    I'd expect to be able to short on Alpaca, as doing a 'sell' market order (e.g. through their web console) with 0 position is successful.

    Note: I've gotten the same results with

    alpaca = Alpaca()
    s = Strategy(alpaca)
    

    and coinbase = CoinbasePro() crypto = Strategy(coinbase)

    Is this intentional? Thanks so much!

    opened by bkunsberg 7
  • Make StrategyState available after Backtesting

    Make StrategyState available after Backtesting

    Description of Feature Request

    This feature is closely related to the open feature request of in-house plotting (#207). Currently I use the teardown function to create custom plots with plotly. However, this makes it difficult to show detailed information as trades and metrics as the backtest result is not yet available. The default figures of blankly are limited in showing what's going on with the data, such as visualizing indicators.

    The real problem is that I have never the state and the backtest result together at one location, making it difficult to plot everything I want in a complete overview.

    How would you implement this?

    # Example of how my teardown function looks like:
    # using the teardown function for ploting feels like misusing the purpose of this function
    def teardown(symbol, state: blankly.StrategyState):
        # in the teardown I do something like this to show the candles and indicators. 
        plotly.show(state)
    
    strategy.add_bar_event(bar_event, symbol='MSFT', resolution='4h', teardown=teardown)
    res = strategy.backtest(to='1y', initial_values={'USD': 10000})
     
    # Option 1: 
    
    res.state[symbol][resolution]  # -> blankly.StrategyState
    res.get_state(*args) # -> blankly.StrategyState
    
    
    # Option 2: 
    def teardown(symbol, state: blankly.StrategyState, res: BacktestResult ):
        # in the teardown I do something like this to show the candles and indicators. 
        plotly.show(state, res)
    
    

    Would you like to Contribute?

    • [ ] Yes, I would love to contribute to this feature request 🎉 (I do not understand the internals of blankly that well)
    • [X] No, but please keep me posted 🎉
    enhancement 
    opened by josvanos 1
  • Forex trading a bit confusing

    Forex trading a bit confusing

    Description

    First off I just want to say I really like the package and enjoy using it.

    I do not have a bug so to say more a question to help clarify forex trading through blankly. Typically in FOREX one speaks of a buy and sell position which is in line with the blankly language for trades. However, in the realisation of these trades I am a little lost as to how it is implemented.

    If I make a buy position into EUR-AUD for example I am purchasing AUD. If I want to now open a sell position, it will use the money allocated in AUD. So if I do not have a large enough open buy position, I cannot open a sell position in EUR-AUD. Not only that, but this gives me the impression that I am actually closing a buy position when I open a sell which is very counter to some strategies which may actually want to open both trade positions for example. In reality, when trading on the FOREX markets, I can open a 100 euro buy position followed by a 600 euro sell position and that is completely fine. In Blankly, I don't know how to achieve this in a backtest. I also don't know how to open these positions so that they do not interfere with each other as in principle, they should not.

    This is just what I have come across from trying to backtest FOREX algorithms through OANDA so if I am doing something wrong I would like to know. If it is also just some differences for the FOREX side of things I would also be happy to contribute.

    enhancement 
    opened by SamTov 1
  • Could be cool to do in-house plots.

    Could be cool to do in-house plots.

    Hej!

    I think it is very useful to debug algos using something more than equity curves and metrics. Other frameworks like Vectorbt use Plotly for this, you guys chose tradingview (questionably quality right now). As I usually use Jupyter notebooks for everything, here is my suggestion right now before you can make a smooth integration with Tradingview:

    from plotly.subplots import make_subplots
    import plotly.graph_objects as go
    
    def plot_results(result,symbol=None):
        if symbol is None:
            symbol = list(result.history.keys())[0]
        
        history = result.history[symbol]
        returns = result.get_returns()
        trades = result.trades['created'].copy()
        trades = {k:np.array([_[k] for _ in trades]) for k in ['time','side','price']}
        
        fig = make_subplots(rows=1, cols=1,shared_xaxes=True,vertical_spacing=None)
        
        fig.add_trace(
            go.Candlestick(
                x=pd.to_datetime(history.time,unit='s'),
                open=history.open,
                high=history.high,
                low=history.low,
                close=history.close),
             col=1,row=1
        )
        fig.update_layout(xaxis_rangeslider_visible=False)
    
        fig.add_trace(
            go.Scatter(
                x=pd.to_datetime(trades['time'],unit='s'),
                y=trades['price'],
                mode='markers',
                marker=dict(size=10,color=np.where(trades['side']=='buy','green','red'),symbol=np.where(trades['side']=='buy','triangle-up','triangle-down') ,line=dict(color='black',width=1)),
                ),
            col=1,row=1,
        )
        return fig
    
    enhancement 
    opened by SamsTheGreatest 4
  • Alpaca websocket losses connection on creation

    Alpaca websocket losses connection on creation

    def update(tick: blankly.WebsocketTick):
        print(tick)
    
    
    if __name__ == "__main__":
        alpaca = blankly.Alpaca()
        manager = blankly.TickerManager('alpaca', 'AAPL')
    
    bug 
    opened by EmersonDove 0
Releases(v1.18.0-beta)
  • v1.18.0-beta(Jun 15, 2022)

    Updates

    • hotfix blankly logout by @qmatias in https://github.com/blankly-finance/blankly/pull/153
    • hotfix blankly deploy by @qmatias in https://github.com/blankly-finance/blankly/pull/154
    • v1.17.4-beta by @EmersonDove in https://github.com/blankly-finance/blankly/pull/157
    • v1.17.5-beta release by @EmersonDove in https://github.com/blankly-finance/blankly/pull/160
    • add auto truncate option to settings.json by @qmatias in https://github.com/blankly-finance/blankly/pull/155
    • futures backtesting by @qmatias in https://github.com/blankly-finance/blankly/pull/148
    • add starter models by @qmatias in https://github.com/blankly-finance/blankly/pull/163
    • add take profit and stop loss orders to SPOT exchanges by @qmatias in https://github.com/blankly-finance/blankly/pull/156
    • make newtulipy even newer by @qmatias in https://github.com/blankly-finance/blankly/pull/165
    • make cli easier to run for users without pip scripts on PATH by @qmatias in https://github.com/blankly-finance/blankly/pull/167
    • fix keyless template in the CLI and add it as an example by @qmatias in https://github.com/blankly-finance/blankly/pull/168
    • spring cleaning by @qmatias in https://github.com/blankly-finance/blankly/pull/169
    • add parametrized testing for spot exchanges by @qmatias in https://github.com/blankly-finance/blankly/pull/170
    • add take-profit example by @qmatias in https://github.com/blankly-finance/blankly/pull/172
    • fix more bugs & continue deduplication efforts by @qmatias in https://github.com/blankly-finance/blankly/pull/173
    • v1.18.0 release by @EmersonDove in https://github.com/blankly-finance/blankly/pull/164

    Full Changelog: https://github.com/blankly-finance/blankly/compare/v1.17.0-beta...v1.18.0-beta

    Source code(tar.gz)
    Source code(zip)
  • v1.17.0-beta(Apr 17, 2022)

    Updates

    • Added full spot kucoin websockets
    • Added full spot FTX websockets
    • Added futures live trading
    • Added full spot OKX integration
    • Added FTX international support
    • Added FTX sub account support
    • Added new and improved CLI
    • Added backtesting and exporting to the platform
    • Added alpaca API v2 support
    • Added arbitrage event
    • Added scheduled event
    • Added event driven backtesting
    • Added tick event driven backtesting
    • Added custom data backtesting
    • Added new generic model class for incredibly flexible backtesting
    • Fixes for Oanda & Binance
    • Tons of other small fixes and stability improvements

    Contributors:

    @mehta-avi @qmatias @jordibeen @jmoz @bfan1256 @hawkinsjb1 @EmersonDove

    Source code(tar.gz)
    Source code(zip)
  • v1.16.0-beta(Feb 25, 2022)

    Updates

    • Add valid FTX resolutions
    • Format to using new db format in model creation workflow
    • Add better Kucoin & ftx examples
    • Add keyless exchanges for custom datasets during backtesting
    • Rename signal to screener
    • Add cron screener
    • Add cron to deployment settings
    • Quantstats integration from @Aryan34
    • Metrics fixes from @qmatias
    • Kraken & Kucoin development from @mehta-avi
    • Add order annotation for platform orders
    • Remove use_sandbox from settings and make it entirely in keys.json
    Source code(tar.gz)
    Source code(zip)
  • v1.15.0-beta(Jan 18, 2022)

    Updates

    • Dramatically improve platform CLI
    • Reporter headers update
    • Add shorting to alpaca, #73 - experimental feature including simulated margin
    • Upgrade tests to run as a matrix
    • Slightly weakened tests to allow for a pandas windows bug
    • Add feature request template
    • Remove unnecessary dependencies
    • Add order protection for backtest configurations
    • Add strategy .start() protection for backtest configurations
    • Fix binance websocket feeds
    • Arguments can be passed to backtest metrics
    • Add an option to enable/disable alpaca shorting
    • Upgrade logging capabilities
    Source code(tar.gz)
    Source code(zip)
  • v1.14.0-beta(Dec 20, 2021)

    Updates

    • Dramatically improve platform CLI
    • Reporter headers update
    • Add shorting to alpaca, #73 - experimental feature including simulated margin
    • Upgrade tests to run as a matrix
    • Slightly weakened tests to allow for a pandas windows bug
    • Add feature request template
    • Remove unnecessary dependencies
    • Add order protection for backtest configurations
    • Add strategy .start() protection for backtest configurations
    • Fix binance websocket feeds
    • Arguments can be passed to backtest metrics
    • Add an option to enable/disable alpaca shorting
    • Upgrade logging capabilities
    Source code(tar.gz)
    Source code(zip)
  • v1.13.0-beta(Nov 20, 2021)

    Updates

    • Add state initialization option for the price events
    • Update run to use blankly.json
    • Address #72 & add docs for #61
    • Fix error mentioned in #68
    • Address issue #62
    • OANDA beta release
    • Local account is now dynamic rather than static allowing multiple paper exchanges
    • Unit tests are upgraded to be more robust, perform better testing and are more reliable
    • Fix fix multi-symbol bar events
    • Migrated testing helpers to testing utils file
    • Create a strategy test
    • Upgrade homogeneity tests
    • Remove hashing in strategy
    • Fix API casing in interfaces
    • Removed sklearn as dependency
    Source code(tar.gz)
    Source code(zip)
  • v1.12.0-beta(Oct 30, 2021)

    Updates

    • Add aggregate candles function
    • Fix for #64
    • Add subreddit badge
    • Add risk_free_return_rate from #63
    • Fix for double init call on sub minute strategies
    Source code(tar.gz)
    Source code(zip)
  • v1.11.0-beta(Oct 25, 2021)

    Updates

    • Interface allows interface option
    • Fix signature difference bug
    • Fix issue with binance fees
    • Market order now uses size instead of funds
    • Better tests for orders
    • Correct & improve the formatting for blankly metrics
    Source code(tar.gz)
    Source code(zip)
  • v1.9.0-beta(Oct 4, 2021)

  • v1.8.0-beta(Sep 23, 2021)

    Updates

    • Forced into removal of coinbase tests by novel sandbox exchange error
    • Deployment get request parsing
    • Zip files now use /model/ as root
    • Can now specify specific files to ignore on deployment
    • Dramatically accelerated backtest
    • Fixed a significant account valuation bug
    Source code(tar.gz)
    Source code(zip)
  • v1.7.0-beta(Sep 6, 2021)

    Updates

    • Barset calls now go for more than 1000 candles in alpaca
    • More robust binance & data keys test
    • Overhauled settings to use objects to load
    • Can now send notifications via text
    • Frameworks are now refactored into their own folder
    • Coin_id/currency are no longer arguments in the exchange class
    • Signal will now replicate starting/stopping process behavior
    • get_product_history now uses the data interfaces
    • Docs now reflect recent (last two months) changes
    • Fixed alpaca types
    • backtest.json now defaults to ignoring user exceptions
    • blankly_bot.py now follows python standards
    • The sandbox error is now more descriptive
    • RSI example now prints the action
    • settings.json now defaults to not using sandbox
    • SignalRunner now has a stop function
    • Fix strategy naming conventions
    Source code(tar.gz)
    Source code(zip)
  • v1.6.0-beta(Aug 29, 2021)

  • v1.5.0-beta(Aug 23, 2021)

    Updates

    • Add recursive dictionary test
    • Fixed critical history error introduced in v1.4.0-beta
    • Excepts now register keyboard & stop signals
    • User teardowns created under teardown=callable
    • Created signal class
    • Add docs to keyword & added interrupt ability to scheduler
    • Patched cast function
    • Add format_with_new_line function to utils
    • Add str method for strategy state
    • Fix scope override in modify_variable
    • Add signal init
    • Add *args for add_new_line in orders
    • Added signal state
    • Fixed RSI interval
    • Add interface to signal
    • Add casting in the formatting for utils
    • Add print method for signal state
    • Add docs & typing for & symbol reassignments in signal.py
    • Export signal is now a header
    • Inactive symbols are now excluded in the alpaca init
    • Can now log the strategy on deployment
    • Resolution is now inside the signal state
    • Fixed reporter headers signatures
    • Fixed history signatures in .history() overrides
    • get_products now is typed to return a list
    • Add local email abilities
    • Add local email class for simplified sending
    • Added notify.json importing ability
    • Refactor alpaca history have better inheritance and duplicated work overhead.
    Source code(tar.gz)
    Source code(zip)
  • v1.4.0-beta(Aug 18, 2021)

    Updates

    • Created CLI
    • Added logging exports & reporting
    • Fix issues with strategy websocket feeds
    • Added websocket OHLCV
    • Added simple OHLCV from price list function
    • Changed get_ticker_feed to show the interface outputs
    • Added CLI sub commands (deploy & init)
    • Big update: Added full OANDA integration!
    • Can execute blankly deployment packages through the command line & CPU monitoring
    • Updated README
    • Upload a blankly package to blankly servers
    • Fixed type bug in interfaces
    Source code(tar.gz)
    Source code(zip)
  • v1.3.0-beta(Aug 6, 2021)

    Updates

    • Added StrategyState.time which correctly matches times in live trading & backtesting
    • Much faster list -> numpy conversion
    • Warnings for using orderbook callbacks in backtest
    • Added ability to cast history directly to a deque
    • Slowed down update progress bar
    • Added to MACD example to show multiple price events
    • Revamped __has_nonzero_delta function to use the traded_assets list
    • Added an exception to the market order filter which allows high quantity resolution
    • Added higher quality time frames to paper trade during backtesting
    • Small bug fix with querying open orders for a specific symbol in Alpaca
    • Paper trade watchdog is a daemon thread
    • Can now start & stop order limit daemon in the exchange class (added to docs)
    • Added macro export ability for deployment
    • Add is_deployed feature
    • Add strategy logger & updated MACD
    • Bug fix for alpaca get_open_orders
    • Update issue with metrics
    • Remove default price cash in backtest.json
    • Fixed tests for a new month
    • Replicated node behaviors in the header files
    Source code(tar.gz)
    Source code(zip)
  • v1.2.0-beta(Jul 29, 2021)

    Updates

    • Added external process connection code
    • Connection includes timeouts & non thread blocking
    • Ping/pong abilities
    • Connection hides exception printing from keyboard interrupts.
    • Choose to fail or handle user generated exceptions
    • Fixed multiple inheritance issue in the paper trade exchange
    • Fixed a backtesting colors glitch
    • Accelerated alpaca backtesting
    • Added ML model to the examples
    • Organized other examples to be more specific
    • Account valuation improvements
    • Better testing for get_account()
    • Added dictionary type output or pandas data frame for historical data
    • Fixed testing utils function
    • Removed the ability to create references to the account value dict
    • Code cleanup & docs matching
    • Coin id is now symbol in utils
    • Added docs to scheduler
    • Formatting fixes
    • Moved @ property functions
    • Fixed typing in examples
    • Added edge cases to trading assets
    • Added account assets re-evaluation function
    • Fixed stock account valuation failures for alpaca
    Source code(tar.gz)
    Source code(zip)
  • v1.1.0-beta(Jul 24, 2021)

    Updates:

    • Fixed an issue where time arrays could be offset by price appending
    • Added an exception for low volume exchanges on Coinbase Pro
    • Added a function for better delta backtesting checking on a symbol
    • Backtesting functions now run in the correct order
    • Correct step function for backtest plots
    • Fixed an issue where backtesting could inaccurately render portfolio changes in the past
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-beta(Jul 21, 2021)

    Updates

    • Testing for limit orders
    • Code cleanup
    • Updated price events
    • User callback integration
    • Auth system update
    • Significantly improved homogeneity
    • Variables property in strategy
    • Orderbook event handler
    • Added global auth cache
    • Added tulipy package
    • Added tulipy wrappers
    • Account valuation in backtest
    • Added pre-baked returns for backtest
    • Added a cash property with setting
    • Updated backtest to match new price event format
    • Added a backtest result object
    • Added initial CLI integration
    • Alpaca limit orders are now GTC
    • Vastly improved README
    • Merged auth into exchanges folder
    • Developed standard for ABC naming
    • Renamed all files & restructured to fit pep
    • Added an initial account values feature to paper trading
    • Switch from product_id, currency_id, currency, asset_id to just simply symbol
    • Blankly is now blankly
    • Created a history function that allows flexible historical data downloads
    • Created a utils get_ohlcv function
    • Scheduler can run on an exchange-synced ceil time
    • Recreated the get_market_limits function to match all functions
    • Lots of OHLCV integrations across the module - history, backtesting, and events are now OHLCV
    • Auth path caching
    • Added size to websocket trade homogenization
    • Added alpaca to the manager classes
    • Added better logging for trade updates
    • Added alpaca websockets
    • Alpaca bid/ask spread
    • Unit tests are working!
    • Added forced resolution in paper trade
    • Added forced order filters in paper trade
    • Added forced decimal math in paper trade
    • Added trunc() function as blankly.trunc() because its used so much
    • Getting quote will now default to 'USD' for stocks
    • Added base asset & quote asset in strategy state
    • Added lowercased .interface & typed it for exchanges
    • & more. Most updates are in better interface homogeneity, which got a huge amount of work.
    Source code(tar.gz)
    Source code(zip)
  • v0.1.12-alpha(Jun 15, 2021)

    Updates

    • New badges!
    • Prepared for GUI
    • Binance trade streams!
    • Snapshot for Binance
    • Improved historical data download
    • New tests!
    • Added strategy
    • Added indicators
    • Fixed issues with BlanklyBot
    • Working paper trading system
    • Working backtest system
    • Documentation integration
    • Local account improvements
    • Paper trade watchdog
    • Optional base argument to parse blankly coin id
    • Can now clone strategy into backtesting
    • Better type checking for pd.series
    • Cleaned code for indicators
    • More organized backtesting backend
    • Backtesting price caches now work
    • Alpaca exchanges can be created
    • Added a variables dictionary that can be reused arguments on the same function for different asset ids
    • Added loading bar
    • Backtesting now enforces types
    • Improved backtesting GUI
    • Fixed binance backtesting
    • Accurate hold account amounts
    • Can save & update backtest settings
    • Fixed days issues with portfolio metrics
    • Large websocket fix, addition of GeneralManager
    • Added sandbox support for websockets
    • Passing a path override to get settings now overrides it permanently unless another is passed in. Better type hints
    Source code(tar.gz)
    Source code(zip)
  • v0.1.11-alpha(May 1, 2021)

    Updates

    • Confirmed interface calls for Coinbase Pro
    • Orderbook traceback
    • Level2 orderbook support for Binance
    • Cached settings
    • Required to specify currency pair
    • Binance tickers stop & starting
    • Multithreaded scheduler callback
    • Better types for the blankly bot class
    • Can now close all feeds
    • Better example commenting
    Source code(tar.gz)
    Source code(zip)
  • v0.1.10-alpha(Apr 27, 2021)

    Updates

    • Better auth construction
    • Orderbook traceback
    • Level2 orderbook support on coinbase
    • Snapshot books
    • Market order in interface
    • Limit order in interface
    • Get order in interface
    • Get open orders in interface
    • Cancel order in interface
    • Dynamic Binance websocket feed creation
    • Custom callback handlers for particular feeds
    • Stop and start Binance tickers
    • Scheduler class to run functions at set intervals
    • Time interval construction
    • Improved exchange inheritance structure
    • Fixed logging functions
    • Homogenized abstract class
    • Improved purchase class
    • Type hints to avoid isinsstance in main
    • Type hints on return functions for easy use
    • Updated README.md
    • Changed Settings.json to not distinguish between feed types
    • Better logic in managers to not check types after evaluate overrides
    • Better naming conventions in the main
    Source code(tar.gz)
    Source code(zip)
  • v0.1.9-alpha(Apr 18, 2021)

    Updates

    • Changed multiprocessing type
    • Added fee checks
    • Historical price download from binance
    • Open orders support
    • Market limits
    • Orderbook now appends
    • Changed valid python versions
    • Renamed setup file
    • Switched threading class
    Source code(tar.gz)
    Source code(zip)
  • v0.1.8-alpha(Apr 10, 2021)

    Updates

    • Added feedback form
    • Default settings
    • Class abstraction
    • Documentation
    • Exchange keys sorting
    • Binance exchange support for interface calls
    • Key isolation in interface
    • Server fixes
    Source code(tar.gz)
    Source code(zip)
  • v0.1.7-alpha(Apr 2, 2021)

    Updates:

    • Orderbook feed
    • Increased epoch resolution
    • Circular buffer feeds
    • Abstract classes
    • Ticker dynamic start/stop
    • Binance start
    • Python specs improvement
    • Code quality boost
    • Cleaner user interface
    • Dataframe history
    • Long-term history downloads
    Source code(tar.gz)
    Source code(zip)
  • v0.1.6-alpha(Mar 23, 2021)

  • v0.1.5-alpha(Mar 22, 2021)

  • v0.1.1-alpha(Mar 14, 2021)

  • v0.1.0-alpha(Mar 14, 2021)

Owner
Blankly Finance
Blankly is building a platform to enable anyone to build hedge fund level trading algorithms & connect to the cloud with just a few lines of code.
Blankly Finance
One version package to rule them all, One version package to find them, One version package to bring them all, and in the darkness bind them.

AwesomeVersion One version package to rule them all, One version package to find them, One version package to bring them all, and in the darkness bind

Joakim Sørensen 39 Dec 31, 2022
Track live sentiment for stocks from Reddit and Twitter and identify growing stocks

Market Sentiment About This repository can mainly be used for two things. a. Tracking the live sentiment of stocks from Reddit and Twitter b. Tracking

Market Sentiment 345 Dec 17, 2022
Authenticate your League of legends account on riot client in a few lines of code.

lol-authenticator v1.0.0 Content index Project Setup Dependencies Project Setup Dependencies Python v3.9.6 If you don't have Python installed on your

Cássio Fontoura 5 Aug 28, 2022
Free python/telegram bot for easy execution and surveillance of crypto trading plans on multiple exchanges.

EazeBot Introduction Have you ever traded cryptocurrencies and lost overview of your planned buys/sells? Have you encountered the experience that your

Marcel Beining 100 Dec 6, 2022
A library for demo trading | backtest and forward test simulation

Trade Engine a library for demo trading | backtest and forward test simulation Features Limit/Market orders: you can place a Limit or Market order in

Ali Moradi 7 Jul 2, 2022
Ubuntu env build; Nginx build; DB build;

Deploy 介绍 Deploy related scripts bitnami Dependencies Ubuntu openssl envsubst docker v18.06.3 docker-compose init base env upload https://gitlab-runn

Colin(liuji) 10 Dec 1, 2021
fair-test is a library to build and deploy FAIR metrics tests APIs supporting the specifications used by the FAIRMetrics working group.

☑️ FAIR test fair-test is a library to build and deploy FAIR metrics tests APIs supporting the specifications used by the FAIRMetrics working group. I

Maastricht University IDS 6 Oct 30, 2022
Easily update resume to naukri with one click

NAUKRI RESUME AUTO UPDATER I am using poetry for dependencies. you can check or change in data.txt file for username and password Resume file must be

Rahul.p 1 May 2, 2022
DeKrypt 24 Sep 21, 2022
A Python Module That Uses ANN To Predict A Stocks Price And Also Provides Accurate Technical Analysis With Many High Potential Implementations!

Stox ⚡ A Python Module For The Stock Market ⚡ A Module to predict the "close price" for the next day and give "technical analysis". It uses a Neural N

Dopevog 31 Dec 16, 2022
A web app via which users can buy and sell stocks using virtual money

finance Virtual Stock Trader. A web app via which users can buy and sell stocks using virtual money. All stock prices are real and provided by IEX. Fe

Kiron Deb 0 Jan 15, 2022
TuShare is a utility for crawling historical data of China stocks

TuShare Tushare Pro版已发布,请访问新的官网了解和查询数据接口! https://tushare.pro TuShare是实现对股票/期货等金融数据从数据采集、清洗加工 到 数据存储过程的工具,满足金融量化分析师和学习数据分析的人在数据获取方面的需求,它的特点是数据覆盖范围广,接口

挖地兔 11.9k Dec 30, 2022
Repository to access information of stocks in Bombay Stock Exchange.

BSE Repository to access information of stocks in Bombay Stock Exchange. The code in this repository uses BSE API and conclusions made using the code

null 1 Nov 13, 2021
A Python script that exports users from one Telegram group to another using one or more concurrent user bots.

ExportTelegramUsers A Python script that exports users from one Telegram group to another using one or more concurrent user bots. Make sure to set all

Fasil Minale 17 Jun 26, 2022
A Telegram bot for remotely managing Binance Trade Bot

Binance Trade Bot Manager Telegram A Telegram bot for remotely managing Binance Trade Bot. If you have feature requests please open an issue on this r

Lorenzo Callegari 乐子睿 350 Jan 1, 2023
Terminal-Trade(Panel API) For Binance

Binance-Trade-Project Binance Futures Terminal-Trade(API) & Binance This Project Worth Around 500 Bucks. **I Did This Project For SomeOne And He

Cyber 9 Dec 30, 2021
alpaca-trade-api-python is a python library for the Alpaca Commission Free Trading API.

alpaca-trade-api-python is a python library for the Alpaca Commission Free Trading API. It allows rapid trading algo development easily, with support for both REST and streaming data interfaces

Alpaca 1.5k Jan 9, 2023
This tool helps users selecting items from the Gwennen gambling trade (based on prices of the uniques).

Gwennen Gambler This small program will check each item in the Gwennen shop (item gamble) according and show small stats according to poe.ninja. Shoul

null 9 Apr 10, 2022
Most Simple & Powefull web3 Trade Bot (WINDOWS LINUX) Suport BSC ETH

Most Simple & Powefull Trade Bot (WINDOWS LINUX) What Are Some Pros And Cons Of Owning A Sniper Bot? While having a sniper bot is typically an advanta

GUI BOT 4 Jan 25, 2022