A simple program for calculating cryptocurrency prices on decentralized exchanges
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
I initially built DEXcalculator
as part of a programming challenge to find arbitrage opportunities between decentralized exchanges. Its main purpose is to calculate the prices of trading particular amounts of cryptocurrencies on particular exchanges. The particulars are chosen by user input, allowing one to find better prices for certain amounts of cryptocurrencies on different exchanges at different times.
Python 3.6
web3
Getting DEXcalculator
up and running is easy (and free!).
Before using DEXcalculator
, one must create a free account on Alchemy.com to obtain an API key. The Web3
library is also required for DEXcalculator
to make necessary API calls.
-
To use
DEXcalculator
, one must obtain their own Alchemy API key. This is quick, simple, and free to do. 1a. First, create a free account on Alchemy.com. 1b. Next, create a blank app using the "+CREATE APP" button (the app's particular parameters are not relevant toDEXcalculator
). 1c. That's it! The new API key will be displayed on the Alchemy dashboard. -
Install the
web3
library, which is listed inrequirements.txt
. The easiest way to do this to downloadrequirements.txt
and usepip
:pip install -r requirements.txt
-
Download
DEXcalculator.py
-
Congratulations!
DEXcalculator
can now be used to calculate prices on decentralized exchanges. Simply run the.py
file, input an Alchemy API key (or link), and choose the spending parameters to have the current price calculated!DEXcalculator
can also be incorporated into other programs as a means of obtaining in-the-moment prices of specific amounts of cryptocurrency traded on specific exchanges.
Running DEXcalculator.py
allows one to choose a cryptocurrency to spend, a cryptocurrency to receive, an amount to spend, and a decentralized exchange to do it all on. Doing so will display the price of per spent cryptocurrency of the cryptocurrency they will receive.
Importing DEXcalculator
enables a program to quickly access prices of different cryptocurrencies on different decentralized exchanges. For example, the ArbitrageAggregator program uses it to find profitable arbitrage opportunities, in which a cryptocurrency is bought on one exchange and then sold on another at a higher price.
See the open issues for a list of proposed features (and known issues).
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.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the GNU GPL-3 License. See LICENSE
for more information.
Evan Gottschalk - @Fort1Evan - [email protected]
Project Link: https://github.com/EvanGottschalk/DEXcalculator
Thinking about contributing to this project? Please do! Your Github username will then appear here.