Author Topic: [ANN] microDEX - low latency minimalist UI  (Read 2276 times)

0 Members and 1 Guest are viewing this topic.

Offline litepresence

  • Full Member
  • ***
  • Posts: 76
    • View Profile
[ANN] microDEX - low latency minimalist UI
« 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




more coming soon!


'till then, need botscript?  check me out at


litepresence.com



ETA:



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





The Fastest DEX Orderbooks in the Business!



All that and just 1300 fluffy lines of script :D


« Last Edit: April 09, 2018, 04:29:39 pm by litepresence »

Online ebit

  • Committee member
  • Hero Member
  • *
  • Posts: 1727
    • View Profile
    • 推荐链接
  • BitShares: ebit
Re: [ANN] microDEX - low latency minimalist DEX UI
« Reply #1 on: March 27, 2018, 01:42:17 am »
 :D

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12717
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: [ANN] microDEX - low latency minimalist DEX UI
« Reply #2 on: March 27, 2018, 06:43:19 am »
+5%
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline litepresence

  • Full Member
  • ***
  • Posts: 76
    • View Profile
Re: [ANN] microDEX - low latency minimalist DEX UI
« Reply #3 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
« Last Edit: March 29, 2018, 03:50:48 am by litepresence »

Offline litepresence

  • Full Member
  • ***
  • Posts: 76
    • View Profile
Re: [ANN] microDEX - low latency minimalist DEX UI
« Reply #4 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

« Last Edit: March 29, 2018, 07:59:52 pm by litepresence »

Offline litepresence

  • Full Member
  • ***
  • Posts: 76
    • View Profile
Re: [ANN] microDEX - low latency minimalist UI
« Reply #5 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

« Last Edit: March 30, 2018, 03:22:02 pm by litepresence »

Offline litepresence

  • Full Member
  • ***
  • Posts: 76
    • View Profile
Re: [ANN] microDEX - low latency minimalist UI
« Reply #6 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
« Last Edit: March 31, 2018, 09:24:19 pm by litepresence »

Offline litepresence

  • Full Member
  • ***
  • Posts: 76
    • View Profile
Re: [ANN] microDEX - low latency minimalist UI
« Reply #7 on: March 31, 2018, 12:48:49 am »


v0.00000009DEV - plots coming soon

Offline bitsharesbagholder

Re: [ANN] microDEX - low latency minimalist UI
« Reply #8 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

Offline litepresence

  • Full Member
  • ***
  • Posts: 76
    • View Profile
Re: [ANN] microDEX - low latency minimalist UI
« Reply #9 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


« Last Edit: March 31, 2018, 09:14:26 pm by litepresence »

Offline litepresence

  • Full Member
  • ***
  • Posts: 76
    • View Profile
Re: [ANN] microDEX - low latency minimalist UI
« Reply #10 on: April 01, 2018, 11:46:32 am »
Happy Easter


Offline litepresence

  • Full Member
  • ***
  • Posts: 76
    • View Profile
Re: [ANN] microDEX - low latency minimalist UI
« Reply #11 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


« Last Edit: April 01, 2018, 05:13:45 pm by litepresence »

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 3482
    • View Profile
    • Steemit Blog
  • BitShares: abit
  • GitHub: abitmore
Re: [ANN] microDEX - low latency minimalist UI
« Reply #12 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.
« Last Edit: April 03, 2018, 01:16:42 pm by abit »
BTS account: abit
BTS committee member: abit
BTS witness: in.abit

Offline litepresence

  • Full Member
  • ***
  • Posts: 76
    • View Profile
Re: [ANN] microDEX - low latency minimalist UI
« Reply #13 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  :-\
« Last Edit: April 03, 2018, 05:56:22 pm by litepresence »

Offline sschiessl

Re: [ANN] microDEX - low latency minimalist UI
« Reply #14 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!

Offline litepresence

  • Full Member
  • ***
  • Posts: 76
    • View Profile
Re: [ANN] microDEX - low latency minimalist UI
« Reply #15 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


« Last Edit: April 09, 2018, 04:41:32 pm by litepresence »

Offline litepresence

  • Full Member
  • ***
  • Posts: 76
    • View Profile
Re: [ANN] microDEX - low latency minimalist UI
« Reply #16 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





« Last Edit: April 03, 2018, 07:41:04 pm by litepresence »

Offline sschiessl

Re: [ANN] microDEX - low latency minimalist UI
« Reply #17 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 :)

Offline litepresence

  • Full Member
  • ***
  • Posts: 76
    • View Profile
Re: [ANN] microDEX - low latency minimalist UI
« Reply #18 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
« Last Edit: April 04, 2018, 01:49:48 am by litepresence »

Offline litepresence

  • Full Member
  • ***
  • Posts: 76
    • View Profile
Re: [ANN] microDEX - low latency minimalist UI
« Reply #19 on: April 04, 2018, 03:28:10 am »
v0.00000011 uploaded to repo


install docs will be uploaded tomorrow

time for zzzzzz's
« Last Edit: April 04, 2018, 03:30:11 am by litepresence »

Offline litepresence

  • Full Member
  • ***
  • Posts: 76
    • View Profile
Re: [ANN] microDEX - low latency minimalist UI
« Reply #20 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


Offline litepresence

  • Full Member
  • ***
  • Posts: 76
    • View Profile
Re: [ANN] microDEX - low latency minimalist UI
« Reply #21 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:

Offline litepresence

  • Full Member
  • ***
  • Posts: 76
    • View Profile
« Last Edit: April 09, 2018, 07:33:55 pm by litepresence »

Offline ripplexiaoshan

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 2219
    • View Profile
  • BitShares: jademont
Re: [ANN] microDEX - low latency minimalist UI
« Reply #23 on: April 08, 2018, 02:06:40 pm »
Seems very promising, looking forward to the v0.1 :D
BTS committee member:jademont

Offline litepresence

  • Full Member
  • ***
  • Posts: 76
    • View Profile
Re: [ANN] microDEX - low latency minimalist UI
« Reply #24 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