package
0.0.0-20250311023717-5c21e974eed8
Repository: https://github.com/thrasher-corp/gocryptotrader.git
Documentation: pkg.go.dev

# README

GoCryptoTrader Backtester: Data package

Build Status Software License GoDoc Coverage Status Go Report Card

This data package is part of the GoCryptoTrader codebase.

This is still in active development

You can track ideas, planned features and what's in progress on our GoCryptoTrader Kanban board.

Join our slack to discuss all things related to GoCryptoTrader! GoCryptoTrader Slack

Data package overview

The data package defines and implements a base version of the Streamer interface which is part of the Handler interface. These interfaces allow for the translation of data into individual intervals to be accessed and assessed as part of the backtest package. This is a base implementation, the more proper implementation that is used throughout the backtester is under ./kline

This can also be used to implement other means to load data for the backtester to process, however kline is currently the only supported method.

Please click GoDocs chevron above to view current GoDoc information for this package

Contribution

Please feel free to submit any pull requests or suggest any desired features to be added.

When submitting a PR, please abide by our coding guidelines:

  • Code must adhere to the official Go formatting guidelines (i.e. uses gofmt).
  • Code must be documented adhering to the official Go commentary guidelines.
  • Code must adhere to our coding style.
  • Pull requests need to be based on and opened against the master branch.

Donations

If this framework helped you in any way, or you would like to support the developers working on it, please donate Bitcoin to:

bc1qk0jareu4jytc0cfrhr5wgshsq8282awpavfahc

# Packages

# Functions

NewHandlerHolder returns a new HandlerHolder.

# Variables

ErrEmptySlice is returned when the supplied slice is nil or empty.
ErrEndOfData is returned when attempting to load the next offset when there is no more.
ErrHandlerNotFound returned when a handler is not found for specified exchange, asset, pair.
ErrInvalidEventSupplied returned when a bad event is supplied.

# Structs

Base is the base implementation of some interface functions where further specific functions are implemented in DataFromKline.
HandlerHolder stores an event handler per exchange asset pair.

# Interfaces

Event interface used for loading and interacting with Data.
Handler interface for Loading and Streaming Data.
Holder interface dictates what a Data holder is expected to do.
Loader interface for Loading Data into backtest supported format.
Streamer interface handles loading, parsing, distributing BackTest Data.

# Type aliases

Events allows for some common functions on a slice of events.