Build crypto trading bot, simple and free!

Photo by: RODNAE Productions

When it comes to building a crypto trading bot, there’re a couple of bots platform choices available, such as Coinrule, Wunderbit, Quadency etc. Among all those options I went with Trality and here’s why

Completely free to get started

Trality’s pricing makes it totally FREE to kick off your first bot, with up to €5,000 trading volumn permonth and smallest tick interval of 60 min. It’s the perfect plan for anyone wants to dip their toe into the crypto trading water. They also have paid plans with more trading volumn and less tick interval if someone wanted to start surfing.

Multiple exchange support

Trality supports trading on most major crypto markets, the list right now contains Binnace, Bitpanda, Kraden and Coinbase.

Simple for beginner

To biuld your first trading bot, Trality provides two types of bots to start with: Code or Rule. Rule bot is for someone who’s not comfortable with writing code (Python), you can simplly set your bot’s strategy to listen to certain market signal and execute actions. For the code lovers, Trality also provides a few code template to get started on their code type bot.

Unlimited backtesting

Once you’ve done with the very first version of your bot, testing is the next step to go. Trality provides unlimited backtesting ability, even with the FREE plan. Backtesting is really necessary to check your bot is doing what you want and see how your strategy performs over different time perid and market conditions.

The first bot

Let’s create our first crypto trading bot! To make things easier I’ll start with using one of the bot template.

After selecting the exchange platform and asset type, picking one of the given bot templates. I picked BOLLINGER BANDS template. The initial could be hard to process if you’re not familiar with Python, but it’s really not that hard since Trality’s template has all the comments you need to help you understand.

To make changes on top of the template, make sure you understand how bollinger bands stragety works. Here I’d like to use 30 days and 3 times in my own bollinger bands strategy and all-in if conditions are met, so I made the follwing change to the code:

    '''
    1) Compute indicators from data
    '''

    bbands = data.bbands(30, 3)

    # on erronous data return early (indicators are of NoneType)
    if bbands is None:
        return

    bbands_lower = bbands["bbands_lower"].last
    bbands_upper = bbands["bbands_upper"].last


    current_price = data.close_last

    '''
    1) Fetch portfolio
        > check liquidity (in quoted currency)
        > resolve buy value
    '''

    portfolio = query_portfolio()
    balance_quoted = portfolio.excess_liquidity_quoted
    # we invest 100% of available liquidity
    buy_value = float(balance_quoted)


    '''
    1) Fetch position for symbol
        > has open position
        > check exposure (in base currency)
    '''
    ...
    ...
    ...

Next is backtesting and if the outcomes are good, it’s ready to be launched.

If you’d like to explore more strategy or build your own, don’t forget to checkout Trality’s full Docs!

Happy trading and make a huge load of money!


  TOC