Coder Social home page Coder Social logo

bordercollielover / ctmp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from leolorenzato/ctmp

0.0 0.0 0.0 81 KB

A Python project for downloading OHLCV data for ticker pairs in various exchanges, providing source data for backtesting software and trading bots.

License: MIT License

Python 100.00%

ctmp's Introduction

CTMP - Crypto Tickers Market Price

The Repository

This repository is where CTMP it's developed together with the help of the community. This source code is available to everyone under the standard MIT license.

CTMP

CTMP is an application developed in Python3 that helps people to download OHLCV market data for various ticker pairs. Dowloaded OHLCV data is saved in SQLite databases, ready to be used by backtesting software, or, generally speaking, by providing source data for trading algorithms. Users can also use downloaded data to perform various type of statistics on tickers' market price/volume. This project implements CCXT library, or other trading libraries to retreive data from exchanges.

It runs on Windows, macOS, and Linux. To get the latest release check out the Releases section.

Features

Supported exchanges in this early release are:

Thanks to CCXT, many other exchanges are really easy to implement.

Supported markets are:

Supported ticker pairs are:

  • Binance:
    • BTC/USDT: spot and future perpetuals
    • ETH/USDT: spot and future perpetuals
  • ByBit:
    • BTC/USDT: spot and future perpetuals
    • ETH/USDT, spot and future perpetuals
  • Bitfinex:
    • BTC/USDT: spot
    • ETH/USDT: spot

Many other ticker pairs will be supported soon. Your contribution in implementing other exchanges or ticker pairs would be really appreciated. Try and check out how easy it will be!

Supported timeframes for all tickers are:

  • 1 minute (1m)
  • 1 hour (1h)
  • 1 day (1d)

Running the code

In the project folder run on your terminal:

pip install -r requirements.txt

to install dependecies.
Edit the main.json file located inside the folder

/params

An example of the main.json file could be the following:

{
    "tickers": 
    [
        "Binance_spot_BTC_USDT_1h",
        "ByBit_futureperp_ETH_USDT_1h",
        "Bitfinex_spot_BTC_USDT_1m",
        "ByBit_spot_ETH_USDT_1d"
    ]
}

Then just run the main file:

python3 main.py

Results will be saved inside directories located at:

 /db

Tickers' .json files which contain ticker pairs' parameters used to download OHLCV data are located at:

/params/exchanges

Logs

All logs are showed in the terminal.

Market types in logs follow this notation:

  • spot: AAA/BBB (ex. BTC/USDT)
  • future perpetuals: AAA/BBB:BBB (ex. BTC/USDT:USDT)

Contributing

This project is not complete at all, it could have bugs and lots of new features to add (exchanges, tickers, ...).
It can be a powerful tool for anyone who wants to backtest a trading algorithm with millions of market price data or to run their own trading bot providing new data each minute, hour or day.
If you find this tool useful you can participate in many ways, for example:

License

Copyright (c) Leonardo Lorenzato. All rights reserved.

Licensed under the MIT license.

ctmp's People

Contributors

leolorenzato avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.