readysetliqd / KrakenTrades-timescaledb-golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KrakenTrades-timescaledb-golang

DISCLAIMER

This project is untested and is meant for educational purposes only. This project is not meant for production or live trading. Data generated by this project may be innaccurate and could result in the loss of some or all of trading funds if used in live trading. Use this project at your own risk. The authors and affiliates of this project assume no responsibility for any losses, financial or otherwise, that may occur from direct or indirect use of this project or any of its parts.

Overview

This project creates a TimescaleDB database. It then pulls all Kraken (spot) historical trade data for the given coin starting from the first trade on the exchange. It then writes the data into the database. The program closes on completion, where data is caught up to present time.

Requirements

  1. Go 1.21.3
  2. PostgreSQL 14
  3. TimescaleDB

Setup

Note: Program only designed for running locally.

  1. Install all required programs on system
  2. Rename psqllogin_sample.env to psqllogin.env
  3. Create postgreSQL role for this program and set password
  4. Enter role (USER) and password (PASS) into psqllogin.env file
  5. Create database via psql shell with name of the market you wish to pull data from
    • ex. query 'CREATE DATABASE xbtusd OWNER myRole;'
  6. Enter desired market (DBNAME) into psqllogin.env file
  7. Default values for running locally (HOST) (PORT) in psqllogin.env file are already entered, update if yours are different
  8. Save changes to .env and run program

About

License:GNU General Public License v3.0


Languages

Language:Go 100.0%