Skip to content

Python script for subscribing to EVE Market Data Relay feed and shoveling data into a Redis server

Notifications You must be signed in to change notification settings

blitzmann/emdr-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DEPRECATED

The EMDR network is dead. This script doesn't do anything useful anymore. It remains here for archival purposes.

emdr-py

emdr-py is an EMDR consumer script written in Python. It is a set-and-forget script, only needing to be restarted should the process quit unexpectidely. It gathers pricing information from the EMDR network 24/7 and stores a calculated value in a Redis key-value datbase.

NOTE: emdr-memcache.py is for archival purposes, as this is the script I originally used before switching to Redis. It will not be updated with tweaks/fixes. There may be a time when I can merge both and the option of switching to either one depending on the client's needs.

Requirements

  • Python >= 2.6
  • pyzmq
  • Redis
  • High bandwidth (tested at a constant 245kbps, although this rate can increase/decrease based on contributiones to the EMDR network)
  • dateutils < 2.0
  • python-gevent

Features

  • Uses Redis in-memory storage of values for fast read/write that can be used in any app with a Redis library
  • Automatically reconnects to EMDR network if connection is lost
  • Calculates a price for each item (based on EVE Centrals 5% percentile)

Run

Download the source.

git clone https://github.com/blitzmann/emdr-py.git
cd emder-py

Edit config values in emdr.py and regions.json

Start the app in the background

screen python emdr.py

How is pricing calculated

emdr-py simulates a 5% purchase of the total volume, and averages out the cost it took to do so. This is identical to how EVE Central calculates it's percentile value, and helps to avoid outliers.

Redis values

Redis keys are of the following format: emdr-VERSION-REGIONID-TYPEID. If for whatever reason the format of the values changes, the version number is incremented. This is to avoid breaking applications when the format changes.

Redis values are in this format:

{
'orders': {
    'generatedAt': timestamp,
    'sell': [fivePercentSellPrice, toalSellItems],
    'buy': [fivePercentBuyPrice, totalBuyItems]
	}
'history': [NOT IMPLEMENTED]
}

About

Python script for subscribing to EVE Market Data Relay feed and shoveling data into a Redis server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages