Skip to content

๐Ÿ›’ A program created in order to allow the user to engage with the "Immutable X" API in an simple and automated way.

License

Notifications You must be signed in to change notification settings

johanneshagspiel/immutablex-gateway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

IMX Gateway Logo


MIT-License Top Language Latest Release

Immutable X Gateway

"Immutable X Gateway" is program created in order to engage more easily with the "Immutable X" API.

"Immutable X" is a layer 2 protocol on the Ethereum blockchain that enables the user to trade NFTs instantaneously, with zero gas fees and in a carbon-neutral way. It also has an open REST API that empowers the user to programmatically interact with the blockchain to, for example look up all available sell orders for a particular NFT or create a trade. The "Immutable X Gateway" allows the user to engage with this open API in an easy, automated way.

Features

With the "Immutable X Gateway", the user can:

  • download all orders associated with an NFT that is listed on "Immutable X"
    • for the NFT "Gods Unchained", the "Immutable X Gateway" also download past games as well as the rank associated with the players of those games
  • process this data to generate various kinds of information such as:
    • an up-to-date overview the cheapest price in the various crypto currencies that a NFT is available
    • a historical overview over past sales of a particular NFT in terms of a variety of factors such as price, sales volume or price changes
    • for the NFT "Gods Unchained", the win rate of a particular card is calculated, for all ranks as well as the mythic rank
    • determine which users are employing bots through outlier detection
  • this information is then combined into one csv file that outlines whether arbitrage opportunities exist when one NFT is listed in different crypto currencies
  • make automatic trades based on custom paramters to take advantage of these arbitrage opportunities

All of these tasks are parallelized and thus once all orders up to the current moment have been downloaded, then from that moment onwards the "Immutable X Gateway" batch processes all new orders as soon as they come in.

Example Information Overview

Tools

Purpose Name
Programming language Python 3.10
Dependency manager Pipenv
Version control system Git
Testing framework unittest
IMX SDK imxpy
Data analysis library pandas
Relational database management system MySQL

Requirements

As of this writing, requests to the API are sent whenever they arise. For this reason the request limit per seconds as set by "Immutable X" frequently is hit. To overcome this limitation, the "Immutable X Gateway" assumes that the user has installed NordVPN so that the program can switch to a new server. Thus, the "Immutable X Gateway" currently requires the user to have an active subscription with NordVPN to be used.

Installation Process

If you want to import this project and resolve all the dependencies associated with it, it is assumed that you have installed Python 3.10 as well as the Pipenv dependency manager and that your operating system is Windows. To download all the dependencies, simply open this repository in a terminal and type

pipenv install

The python wrapper for the IMX SDK, imxpy, is as of this writing, not on official package on pypi. Therefore, one has to clone the Github repository for that. First, move into the associated directory:

cd src/util

In case there already is a folder called imxpy in this directory, delete it. Now clone imxpy via:

git clone https://github.com/Dimfred/imxpy.git

Because the original IMX SDK was written in typescript, you also have to install npm and Node.js as well as typescript. Now you first move into the new imxpy folder:

cd imxpy

Then install all typescript dependencies with:

npm install

Now, build the typescript file through this command:

tsc

The resources directory and all subfolders have to be created via the File_Handler.create_resources_folders() command that is in main method at src/main. So simply run main.

Lastly, user information need to be added at three different locations:

  • resources/client_info/pk_info.json: here, the users private key of the wallet and address of users account on the "Immutable X" blockchain need to be added so that the user can create trades through the IMX SDK
  • resources/client_info/coinapi_info_file.json: here, the user needs to add an api key obtained from CoinAPI so that the latest price changes can be obtained
  • resources/client_info/coinmarketcap_info.json: here, the user needs to add an api key obtained from CoinMarketCap so that historical price changes can be obtained

Licence

The "Immutable X Gateway" is published under the MIT licence, which can be found in the LICENSE file.

References

The base image for the logo was taken from the official Immutable X website.

Disclaimer

This is not an official "Immutable X" programme nor is it endorsed by "Immutable X". Use it at your own risk. Particularly when it comes to the auto-trader functionality, no responsibility is assumed for any damage incurred.

About

๐Ÿ›’ A program created in order to allow the user to engage with the "Immutable X" API in an simple and automated way.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages