Skip to content

Framework Overview

Alessandro Sanino edited this page Jan 20, 2021 · 4 revisions

Golang Crypto Trading Bot

Framework Overview

The framework is divided in multiple packages, each one represents an important set of the framework.

environment package

This package contains all the structs used by the bot to abstract the data structures from all exchanges, here you can find concepts like Order, Orderbook and so on.

Please refer to implementation folder for details about implementation.

exchanges package

This package contains all the exchange wrappers: they allow to interact with the exchanges with a common interface, represented by the ExchangeWrapper implementation.

strategies package

This package contains the implementation of the strategies, the core of the Bot Framework. You can find more details in the Creating Strategies section.

cmd package

This package contains all commands available to the bot. There are 3 commands:

  • help -> Shows the help message
  • init -> Initializes the configuration file
  • start -> Starts the bot using the configuration file parameters

botHelpers package

This package contains various helper methods used by the bot to achieve its objectives.

We strongly suggest to directly refer to the implementation.

examples package

This package contains various strategy implementations which is possible to use directly in your project. Currently there are the following ready-to-use examples:

  • watchStrategy -> Prints info about the markets every 5 seconds.
  • slackIntegration -> Sends notifications on slack based on events (market watch can be implemented).
  • telegramIntegration -> Similar to the Slack one, but for Telegram Bots.