All Projects → maximumstock → poe-currency-flip-planner

maximumstock / poe-currency-flip-planner

Licence: MIT license
This tool is an attempt at planning short-term arbitrage deals of currency in Path of Exile.

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to poe-currency-flip-planner

SlimTrade
A trade macro overlay for the game Path of Exile
Stars: ✭ 78 (-17.89%)
Mutual labels:  trade, poe, pathofexile
Poe Trades Companion
Enhance your trading experience in Path of Exile. Highly customizable.
Stars: ✭ 395 (+315.79%)
Mutual labels:  trade, pathofexile
PoE-HarvestVendor
Tool for getting the list of crafts out of Horticrafting station in Path of exile
Stars: ✭ 68 (-28.42%)
Mutual labels:  poe, pathofexile
Ccxt.net
CCXT.NET – CryptoCurrency eXchange Trading Library for .NET
Stars: ✭ 89 (-6.32%)
Mutual labels:  trade, arbitrage
PoEFlaskScript
An autohotkey Script for using flasks in Path of Exile
Stars: ✭ 38 (-60%)
Mutual labels:  poe, pathofexile
LibBundle
Library and programs for bundle.bin in Content.ggpk of PathOfExile
Stars: ✭ 26 (-72.63%)
Mutual labels:  poe, pathofexile
POE-TradeMacro
Price checking script for Path of Exile.
Stars: ✭ 963 (+913.68%)
Mutual labels:  poe, pathofexile
Uniswap Python
🦄 The unofficial Python client for the Uniswap exchange.
Stars: ✭ 191 (+101.05%)
Mutual labels:  currency, trade
uniswap-python
🦄 The unofficial Python client for the Uniswap exchange.
Stars: ✭ 533 (+461.05%)
Mutual labels:  currency, trade
Binance Trader
💰 Cryptocurrency Trading Bot for Binance (Experimental)
Stars: ✭ 2,128 (+2140%)
Mutual labels:  trade, arbitrage
Ccxt
A JavaScript / Python / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges
Stars: ✭ 22,501 (+23585.26%)
Mutual labels:  trade, arbitrage
PathOfBuildingAPI
API for Path of Building's build sharing format for builds in Path of Exile.
Stars: ✭ 25 (-73.68%)
Mutual labels:  poe, pathofexile
Xenontrade
Path of Exile trading app for price checking and trade whisper management
Stars: ✭ 122 (+28.42%)
Mutual labels:  trade, pathofexile
Currency Cop
👮💸 Currency Cop is the net worth calculator for Path of Exile
Stars: ✭ 207 (+117.89%)
Mutual labels:  currency, pathofexile
PoeSmootherModCN
中文版本PoeSmoother,带MOD特效替换功能
Stars: ✭ 18 (-81.05%)
Mutual labels:  poe, pathofexile
coincube
A Python/Vue.js crypto portfolio management and trade automation program with support for 10 exchanges.
Stars: ✭ 85 (-10.53%)
Mutual labels:  trade
Credits
Credits(CRDS) - An Evolving Currency For An Evolving Society
Stars: ✭ 14 (-85.26%)
Mutual labels:  currency
Nager.Country
Worldwide Country Informations (ISO-3166-1 Alpha2, ISO-3166-1 Alpha3, ISO 639-1)
Stars: ✭ 68 (-28.42%)
Mutual labels:  currency
salaryconverter
Equivalent salary converter using PPP
Stars: ✭ 42 (-55.79%)
Mutual labels:  currency
rcites
📦 R package to access the CITES Speciesplus database
Stars: ✭ 12 (-87.37%)
Mutual labels:  trade

poe-currency-flip-planner

Continuous Integration License: MIT License: MIT

A proof-of-concept finder for short-term arbitrage opportunities in Path of Exile.

Overview

What exactly is this?

A command-line application that finds arbitrage opportunities by grabbing and analysing data from pathofexile.com/trade.

For example, running python cli.py --league Metamorph used to result in something like:

Note: This tool does not support regular item gear but only currencies and other bulk items, such as Maps, Shards, Essences, etc. For simplicty I'll only use the term items from now on.

How does it work?

We start with a set of item pairs that we want to check trade offers for, eg. sell Chaos Orbs for Jagged Fossils.

By default, these item pairs are pre-defined and sort of data mined from previous leagues (see Data Analysis). You can also customize these pairs and various other details via a custom configuration file, see Section Configuration. The collected data is turned into a graph which gets traversed to find transaction chains that yield profit.

Installation

This tool requires Python >=3.7. For installing dependencies, either use poetry or regular Python 3 virtual environments, as described below.

  1. Clone the respository: git clone https://github.com/maximumstock/poe-currency-flip-planner.git
  2. Navigate into the project folder: cd poe-currency-flip-planner

Via Poetry

Assuming poetry is installed:

  1. Enter a new pipenv shell session: poetry shell
  2. Install all dependencies: poetry install

Via Python Virtual Environment

  1. Enter a new shell session environment settings: python3 -m venv env
  2. Activate your virtual environment: source ./env/bin/activate
  3. Install all dependencies: pip install -r requirements.txt

Usage

Run via python cli.py <OPTIONS>, while in your virtual environment or with pipenv active.

The CLI offers a few configuration flags. You can always check them out via python cli.py --help.

❯ python cli.py --help
usage: cli.py [-h] [--league LEAGUE] [--currency CURRENCY] [--limit LIMIT] [--fullbulk] [--nofilter] [--debug] [--config CONFIG] [{pathfinding,sync}]

CLI interface for PathFinder

positional arguments:
  {pathfinding,sync}   Specifies what subcommand to run: 1. pathfinding: Find profitable conversion paths (default). 2. sync: Sync your public stashes into your
                       config file.

optional arguments:
  -h, --help           show this help message and exit
  --league LEAGUE      League specifier, ie. 'Synthesis', 'Hardcore Synthesis' or 'Flashback Event (BRE001)'. Defaults to 'Scourge'.
  --currency CURRENCY  Full name of currency to flip, ie. 'Cartographer's Chisel, or 'Chaos Orb'. Defaults to all currencies.
  --limit LIMIT        Limit the number of displayed conversions. Defaults to 5.
  --fullbulk           Use all supported bulk items
  --nofilter           Disable item pair filters
  --debug              Enables debug logging
  --config CONFIG      Specify your config file path

At the moment we solely support poe.trade to fetch trade offers.

Options --fullbulk and --nofilter bypass the configuration files and extend the set of item pairs that is used to collect data for. These options are not meant for end users but are relevant for collecting extensive amount of data for the work in Data Analysis.

Configuration

The configuration file lets you define the following:

  • Item trading paths
  • Stock requirements when buying & selling
  • Sync your trading capital via the sync command into your local configuration file
  • Blacklisting traders

If you did not configure a custom configuration file, the default settings in config.default.json are used. Blacklisting traders is done separately, see blacklisting traders.

The default configuration takes care for you of the first two points, but you are free to customize.

Sync Trading Capital

You can use python cli.py --league <LEAGUE> sync to seemlessly sync your trading capital from your public stash tabs into your specified configuration file.

For this you need to specify your account name and your POESESSID (a cookie value that PoE uses to identify your account, see here for a guide on how to retrieve it) in your respective configuration file.

If you have no configuration file yet, feel free to copy config/config.default.json to config/config.json so you can get started. The file config.default.json is not usable with this feature, so you have to bring your own for this.

Running the above command should then work fine.

Example Configuration

By default, we check prices for all item pairs specified in the respective config file. You can also alter this to your liking to either remove or add trading paths.

Note: In case you alter the configuration, please do so on a copy of the default configuration file. You can use the option --config to specify your custom config file upon invocation.

Below is a shortened configuratione example with some explanatory notes. In case of any problems or ambiguity, please open an issue.

{
  "version": 1, // Internal versioning - irrelevant for now
  "assets": {
    // These values act as a an optional upper limit on trading volume.
    // This lets you specify what *YOU* trade with as in what you can sell.
    "Chaos Orb": 100,
    "Exalted Orb": 5,
    "Chromatic Orb": 1000,
    "Orb of Fusing": 340
  },
  "trading": {
    "Chaos Orb": {
      // Default stock requirements when buying Chaos Orbs
      // In this case a seller of Chaos Orbs needs between 40 and 500
      // Chaos Orbs to be eligible to trade with you.
      "minimum_stock": 40,
      "maximum_stock": 500,

      // This section specifies what we sell our own Chaos Orbs for.
      // In this case we only trade Chaos Orbs for Chisels, Chromatic Orbs and Divine Orbs.
      "sell_for": {
        // One entry per item you want to trade for your Chaos Orbs.
        // `null` means there are no requirements when trading your own
        // Chaos Orbs for eg. Divine Orbs.
        "Cartographer's Chisel": null,
        "Chromatic Orb": null,
        "Divine Orb": null
      }
    },
    "Exalted Orb": {
      // If we want to buy Exalted Orbs, we only consider
      // sellers with a stock between [1, 100].
      "minimum_stock": 1, // Defaults to 1
      "maximum_stock": 100, // Defaults to 0 (no limit)

      "sell_for": {
        "Cartographer's Chisel": null,
        // As there is no special config for Chaos Orbs,
        // we only consider sellers with a Chaos Orb stock
        // of 40-500
        "Chaos Orb": null,
        "Orb of Alteration": null,
        "Orb of Annulment": {
          // If we want to buy Annulment Orbs with Exalted Orbs, we only
          // consider sellers with a stock between 10-30.
          // This block overrides the default minimum_stock setting for
          // Orbs of Annulment when buying them with Exalted Orbs.
          "minimum_stock": 10,
          "maximum_stock": 30
        }
      }
    },
    "Orb of Annulment": {
      "minimum_stock": 5,

      "sell_for": {
        "Exalted Orb": 5
      }
    }
  }
}

Blacklisting Traders

If you want to exclude certain traders you can do so by adding their account name to your local config/excluded_traders.txt (one name per line).

Tests

I wrote a few simple unit tests to make the data fetching & parsing, graph construction and traversal and path evaluation a bit more robust. You can run those tests using predefined data structures via PYTHONPATH=. pytest.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].