Skip to content

A simple program for connecting to cryptocurrency exchanges and retrieving information from them

License

Notifications You must be signed in to change notification settings

EvanGottschalk/ConnectToExchange

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

ConnectToExchange

A simple program for remotely connecting to cryptocurrency exchanges and retrieving information from them.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

I started working on ConnectToExchange in 2017 during the last big bitcoin hype. Its purpose is to create the initial connection with an exchange, and to fetch basic information from the exchange, such as public price data or one's own personal trading history.

ConnectToExchange can be used on its own to gather information. It can also be imported into other modules to grant them the ability to communicate with exchanges, such as a module for executing trades. ConnectToExchange has no function for actually executing a trade itself.

Built With

  • Python 3.6

  • Pandas

  • CCXT - The fantastic CCXT library is critical to ConnectToExchange. Huge thanks to @kroitor and the many other CCXT contributors that made this program possible.

  • GetCurrentTime - This program is imported to help collect time data in a legible fashion. It also allows for the translation of time stamps. You can read more about it here: github.com/EvanGottschalk/GetCurrentTime

  • AudioPlayer - This is a simple program for playing custom audio alerts. It can be used with ConnectToExchange to warn you if an error occurs. You can read more about it here: github.com/EvanGottschalk/AudioPlayer

Getting Started

OperateExchange is easy to get up and running. Let me know if you have any trouble! I'm always trying to make installation as smooth as possible.

Prerequisites

Before using ConnectToExchange, you must first obtain an API key and secret from the cryptocurrency exchange of their choosing. You also need to install the CCXT library.

Installation

  1. Install the pandas and CCXT libraries, which are listed in requirements.txt. The easiest way to do this to download requirements.txt and use pip:

    pip install -r requirements.txt
    
  2. Download the .py files in from this repository (ConnectToExchange.py, GetCurrentTime.py, and optionally AudioPlayer.py).

  3. In the same folder as ConnectToExchange.py, create a .txt file to store your API information. Its name should start with the exchange you are using, followed by an underscore, followed by the name of the account you're using, and ending with _API.txt.

    For example, if you are using your Main account on Coinbase, you would name the .txt file Coinbase_Main_API.txt

    If your API key is view-only, you can save your cryptocurrency exchange API key on the 1st line, and your API secret on the 2nd. However, if your API key has trade priveleges, you should save an encrypted version of both your key and secret on those lines instead.

    To encrypt your API information, I recommend using CustomEncryptor.py

  4. Run ConnectToExchange.py

  5. Congratulations! You can now use ConnectToExchange to connect to your favorite exchanges and retrieve information from them!

Usage

Checking Prices - A quick, simple, and handy feature of ConnectToExchange is its ease of acquiring the current price of an asset of your desire. This can be incorporated into all sorts of other programs.

Checking Orders - You can use ConnectToExchange to check the status of your orders to see if they are open or have been filled. If they have been filled, you can then use the closing information to calculate profits/losses.

Accumulating OHCLVs - If you run ConnectToExchange on a regular basis, it will accumulate OHLCV information in a Master OHLCV. This is handy if you want to really analyze granular price action over the long term. Normally, exchanges limit how many data points you can retrieve all at once. On Binance, for example, you are limited to only 500 data points. So, if you want to know the price every minute for the past 600 minutes, you're out of luck - unless you ran ConnectToExchange the previous day. Based on how granular you need the information to be, so long as you run ConnectToExchange regularly, you can completely overcome the limits set by the exchanges.

A Whole Lot More - The breadth of ways ConnectToExchange can be used in other programs is limitless. Any module that could benefit from accessing cryptocurrency prices and their relationships to each other can use ConnectToExchange to quickly attain that feature.

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the GNU GPL-3 License. See LICENSE for more information.

Contact

Evan Gottschalk - @Fort1Evan - [email protected]

Project Link: https://github.com/EvanGottschalk/ConnectToExchange

Acknowledgements

  • Huge thanks to @kroitor and the many other CCXT contributors that made this program possible.
  • Thanks to @bartmassi for working with me to improve the program's security, and for answering numerous other questions, and also for always being a helpful, available, and informative teacher (and friend).

Thinking about contributing to this project? Please do! Your Github username will then appear here.

About

A simple program for connecting to cryptocurrency exchanges and retrieving information from them

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages