BitShares Forum

Main => General Discussion => Topic started by: litepresence on March 27, 2018, 12:14:18 am

Title: [ANN] microDEX - low latency minimalist UI
Post by: litepresence on March 27, 2018, 12:14:18 am

What if the UI maintained DEX connection for months at a time?
What if the orderbook was updated several times per second?
What if the data feed was not dependent on a single whitelisted node?
What if historical CEX data and latest DEX data were on the same chart?

What if you could read and trust all the code that makes it happen
over a single cup of coffee?



[ANN] microDEX

Code: [Select]
                                     ______   ________  ____  ____ 
                                    (_   _ `.(_   __  |(_  _)(_  _)
     __  __  ____  ___  ____   ___    | | `. \ | |_ \_|  \ \__/ /   
    (  \/  )(_  _)/ __)(  _ \ / _ \   | |  | | |  _) _    ) __ (   
     )    (  _||_( (__  )   /( (_) ) _| |_.' /_| |__/ | _/ /  \ \_ 
    (_/\/\_)(____)\___)(_)\_) \___/ (______.'(________|(____)(____)
   =================================================================
           microDEX v0.00000009 - low latency minimalist UI
   =================================================================


BUY/SELL/CANCEL
LIVE LOW LATENCY MULTI NODE BOOKS
NEVER OUT OF SYNC
ALWAYS BLOCKCHAIN CONNECTED


minimal dependencies:

python3
pybitshares
tkinter
matplotlib


Code:

https://github.com/litepresence/extinction-event/blob/master/microDEX/microDEX.py

Installation:

https://github.com/litepresence/extinction-event/blob/master/Installation


(https://imgur.com/2Stv2p4.png)

more coming soon!


'till then, need botscript?  check me out at


litepresence.com (http://litepresence.com)



ETA:



how's this for soon?  v0.00000009 is live:



(https://imgur.com/t3QeTbI.png)

The Fastest DEX Orderbooks in the Business!

(https://imgur.com/AseDZX4.png)

All that and just 1300 fluffy lines of script :D

(https://imgur.com/MNWp5aD.png)

Title: Re: [ANN] microDEX - low latency minimalist DEX UI
Post by: ebit on March 27, 2018, 01:42:17 am
 :D
Title: Re: [ANN] microDEX - low latency minimalist DEX UI
Post by: xeroc on March 27, 2018, 06:43:19 am
+5%
Title: Re: [ANN] microDEX - low latency minimalist DEX UI
Post by: litepresence on March 29, 2018, 03:43:09 am
updated repo

https://github.com/litepresence/extinction-event/blob/master/microDEX/microDEX.py

buy/sell/cancel confirmation popup window
login/logout capability
background process now maintains list of top ten nodes sorted by latency
better control of child processes to prevent too many processes error
added market history and seconds since last trade
added dictionary of complete holdings
improved login screen

low latency scheme works like this

55 known nodes are tested for ping; top ten are returned by background process
then another background process spawns 6 child processes
each of the children have a 60 second lifespan and continually update the orderbook whenever they have data
as they expire each is replaced by a new child so 6 "fresh" processes remain always
this means the book you see is actually flashing between the data from 6 nodes; so if one goes rogue you'll see it immediately



also... live tested w/ funds by my 8 year old

:D
Title: Re: [ANN] microDEX - low latency minimalist DEX UI
Post by: litepresence on March 29, 2018, 04:25:32 pm
updated repo again v0.00000004

improved handling of invalid orders
improved handling of orders in excess of funding
confirmation window now displays details of order being confirmed

eta, something went wrong when I uploaded earlier, patched @ 15:30 EST

(https://imgur.com/Osk6Gak.png)
Title: Re: [ANN] microDEX - low latency minimalist UI
Post by: litepresence on March 30, 2018, 02:34:07 pm
v0.00000007 - improved user experience, faster connection
https://github.com/litepresence/extinction-event/blob/master/microDEX/microDEX.py

(https://imgur.com/B9vW4fY.png)
Title: Re: [ANN] microDEX - low latency minimalist UI
Post by: litepresence on March 30, 2018, 04:30:18 pm
enjoy the fastest DEX orderbooks in the business :D



v0.00000008 is uploaded

ETA:

microDEXv0.00000008.py will remain in repo as pre plotting reference

any version before 0.00000008 should be considered superseded and is known to be buggy/laggy
Title: Re: [ANN] microDEX - low latency minimalist UI
Post by: litepresence on March 31, 2018, 12:48:49 am
(https://imgur.com/KEzyWD5.png)

v0.00000009DEV - plots coming soon
Title: Re: [ANN] microDEX - low latency minimalist UI
Post by: bitsharesbagholder on March 31, 2018, 07:34:51 pm
awesome
I've more than enough of those infamy laggish as fuck stupidly useless Javascript platform

big thanks
Title: Re: [ANN] microDEX - low latency minimalist UI
Post by: litepresence on March 31, 2018, 08:17:58 pm
v0.000000009 uploaded to repo

who else gives you moving average periods on slider bars?

uncle lp to the rescue :D

microDEX plots

daily moving averages with decimal period from 0.20 to 100.00 on slider bars
works on most altcoin pairs using CEX historic data with last 100 trades from DEX
plots 1000 days of daily, 250 days of 2h and 5m candles for past 24 hours; all on same axis
zoomable X and Y via matplotlib
numpy arrays available for custom TA post processing
cursor position show human readable date and price

total dependencies

python3, tkinter, matplotlib, pybitshares


(https://imgur.com/AseDZX4.png)
Title: Re: [ANN] microDEX - low latency minimalist UI
Post by: litepresence on April 01, 2018, 11:46:32 am
Happy Easter

(https://imgur.com/RrRCjvE.gif)
Title: Re: [ANN] microDEX - low latency minimalist UI
Post by: litepresence on April 01, 2018, 04:51:35 pm
v0.00000010

- patched failed to update chart bug
- added log scale toggle
- created a wrapper around reconnect() to simplify work flow
- validated HLOC data such that H can't be more than 2X close and L can't be less than 0.5X close


If anyone has any ideas on how I can hide the plot update widget I'm open to suggestions, until then this will suffice:


Code: [Select]
    interface.geometry("0x0+0+0")


:D


(https://imgur.com/95pmMy4.png)
Title: Re: [ANN] microDEX - low latency minimalist UI
Post by: abit on April 03, 2018, 01:10:38 pm
Can you pick a better name for your repository so we can advertise it?
Okay, seems you like the name, it's fine.

I personally still think it's better to have an explanation for the name on github, perhaps put into README. Also put more info about the repository in README.

By the way, better give microDEX a readme file as well.
Title: Re: [ANN] microDEX - low latency minimalist UI
Post by: litepresence on April 03, 2018, 05:00:19 pm
The repo name "Extinction Event" was born of the notion that DEX tech combined with AI controlled algo trading tech reaching the common user, in unison, would be an extinction level event for centralized web based exchanges, intrusive state AML/KYC policies, and orchestrated pump and dump schemes; all of which I consider anathema to individual financial liberty and decentralized free market economy.  I'm in this arena first and foremost as a counter-economic agorist and I see development in the Bitshares space as a means to this end.

Quote
By the way, better give microDEX a readme file as well.

so much to do and just me  ;)

Yes both the EV bot platform and microDEX need readme files and install docs.

My focus atm is to hammer out bugs, make both platforms more reliable.

I'm dev'ing furiously in the shadows... docs are sideburner todo; perhaps I can put wifey on it  :-\
Title: Re: [ANN] microDEX - low latency minimalist UI
Post by: sschiessl on April 03, 2018, 06:52:40 pm
"Wifey :)"

Do you have a thorough logging already implemented? That would be awesome to find the root of appearing connection problems? If not I would be happy to assist!
Title: Re: [ANN] microDEX - low latency minimalist UI
Post by: litepresence on April 03, 2018, 07:23:35 pm
ok so talked wifey into doing a fresh install of both EV and microDEX and all dependencies (pybitshares, python3, tkinter, matplotlib) on a fresh install ubuntu OS (Mint 17.3) thumbdrive; documenting all trials and tribulations along the way; huge thx because my patience is limited on install shits


practically grandma friendly installation docs coming soon,
she even promises not to use 'as root' when meaning 'type sudo' :D


Title: Re: [ANN] microDEX - low latency minimalist UI
Post by: litepresence on April 03, 2018, 07:26:35 pm
Do you have a thorough logging already implemented? That would be awesome to find the root of appearing connection problems? If not I would be happy to assist!

that's the magic of public software; there are many eyes on it

v0.00000011 will release with much improved logging to 'microDEX_log.txt'

I'm certainly open to suggestion / assistance; but probably best to fork from 11 than 10 as I've shifted quite a bit around and have good protocol established; new version should be out soon; I'll post back here.

improvements soon to come on 11

better buy/sell/cancel exception handling
logging exceptions and trades to file
removal of the zprint() for "BOOK" and "CHART UPDATE"
elimination of unused nodes_update()
elimination of many unused print lines in nodes_process()
improved line comments
nodes process was running constantly will be every 10 minutes
concurrent orderbook children will live 10 minutes instead of 2
orderbook children will reconnect() w/ new node list upon first failed connect
added race_append() for logging errors and buys





Title: Re: [ANN] microDEX - low latency minimalist UI
Post by: sschiessl on April 03, 2018, 07:48:33 pm
wifey says,
"tell @xeroc his pybitshares docs totally suck"  "not only lacking but completely flawed"
"people come here try to do this and run away when it doesn't work I bet you"

Pull request even for documentation improvements are much appreciated, after all its also open source :)
Title: Re: [ANN] microDEX - low latency minimalist UI
Post by: litepresence on April 04, 2018, 01:04:02 am
Pull request even for documentation improvements are much appreciated, after all its also open source :)

incoming ;D

https://github.com/bitshares/python-bitshares/issues/70
Title: Re: [ANN] microDEX - low latency minimalist UI
Post by: litepresence on April 04, 2018, 03:28:10 am
v0.00000011 uploaded to repo


install docs will be uploaded tomorrow

time for zzzzzz's
Title: Re: [ANN] microDEX - low latency minimalist UI
Post by: litepresence on April 07, 2018, 07:33:08 pm
v0.00000012

- plots state machine
- checks all known servers for any suffix ( /, /ws, /wss) returns only fastest from each location
- improved exception logging for development

Title: Re: [ANN] microDEX - low latency minimalist UI
Post by: litepresence on April 07, 2018, 08:42:24 pm
v0.00000013 uploaded

was small bug in buy/sell/cancel where
Code: [Select]
attempt=0 on wrong line below
Code: [Select]
except:
Title: Re: [ANN] microDEX - low latency minimalist UI
Post by: litepresence on April 08, 2018, 12:35:12 am
"Wifey :)"

INSTALLATION

https://github.com/litepresence/extinction-event/blob/master/Installation

Title: Re: [ANN] microDEX - low latency minimalist UI
Post by: ripplexiaoshan on April 08, 2018, 02:06:40 pm
Seems very promising, looking forward to the v0.1 :D
Title: Re: [ANN] microDEX - low latency minimalist UI
Post by: litepresence on April 09, 2018, 07:33:17 pm
Seems very promising, looking forward to the v0.1 :D

moving up one satoshi version every few days, could be about 100,000 years before v0.1

u might want to give install a try now instead

:D