Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - litepresence

Pages: 1 2 3 4 5 6 7 8 [9] 10
121
General Discussion / (Python) latency sorted Bitshares nodes
« on: March 11, 2018, 05:53:11 pm »
Update:  Developing here:
https://github.com/litepresence/extinction-event/blob/master/bitshares-node-latency.py







An "official" list of public nodes is here:

https://github.com/bitshares/bitshares-ui/blob/master/app/api/apiConfig.js

you can fetch it like this:
Code: [Select]
def nodes():  # Public Nodes List

    uri = 'https://raw.githubusercontent.com'
    url = uri+'/bitshares/bitshares-ui/master/app/api/apiConfig.js'
    raw = requests.get(url).text
    clean = ((raw.replace('"',"")).replace("'","")).replace(',','')
    parsed = [ t for t in clean.split() if t.startswith('wss') ]
    validated = [i for i in parsed if (('test' not in i) and ('fake' not in i))]

    return validated


result:
Code: [Select]
print (nodes())

>>>
['wss://bitshares.openledger.info/ws', 'wss://eu.openledger.info/ws', 'wss://bit.btsabc.org/ws', 'wss://bts.ai.la/ws', 'wss://bitshares.apasia.tech/ws', 'wss://japan.bitshares.apasia.tech/ws', 'wss://bitshares.dacplay.org/ws', 'wss://bitshares-api.wancloud.io/ws', 'wss://openledger.hk/ws', 'wss://bitshares.crypto.fans/ws', 'wss://ws.gdex.top', 'wss://dex.rnglab.org', 'wss://dexnode.net/ws', 'wss://kc-us-dex.xeldal.com/ws', 'wss://btsza.co.za:8091/ws', 'wss://api.bts.blckchnd.com', 'wss://eu.nodes.bitshares.ws', 'wss://us.nodes.bitshares.ws', 'wss://sg.nodes.bitshares.ws', 'wss://ws.winex.pro']



usage:
Code: [Select]
from bitshares.market import Market
from bitshares import BitShares

BitCURRENCY = 'OPEN.BTC'
BitASSET = 'BTS'
BitPAIR = BitASSET + ":" + BitCURRENCY
MARKET = Market(BitPAIR, bitshares_instance=BitShares(nodes()))

MARKET.buy()

122
Stakeholder Proposals / [Worker] - Ledger Nano S
« on: March 11, 2018, 02:06:37 pm »
I was wondering if adding BTS support to Ledger Nano would be within the realm of what a worker could be used for.

Thoughts?   I don't have any experience opening a worker... so if this is possible please help.




ledgerwallet >>> cryptocurrencies >>> what's next >>> altcoin support info

https://www.ledgerwallet.com/cryptocurrencies
https://trello.com/b/5nQ1mdzt/ledger-roadmap
https://trello.com/c/4Aa7Ug5a/20-altcoin-support-information

Quote
There are a lot of cryptocurrenies and as Ledger has limited ressources it cannot integrate them all. The conditions to integrate another crypto are one of the following:

massive general support and high market cap (ex: Ethereum)
development sponsored by the coin's community (ex: Litecoin)
direct developer integration using Ledger's SDK
For information, the "altcoin package" costs 149,000 EUR and includes:

  • development of altcoin's Nano S / Blue app
  • altcoin support added to the Ledger Wallet Chrome app
  • altcoin explorer API development for the backend
  • 1,000 Ledger Nano S unit with altcoin's logo laser marking
  • maintenance and support
This pricing is available only for project inheriting from Bitcoin. If the blockchain technology is original (ex: Ripple, IOTA...) then the pricing could be much higher.

If you are part of the project's team and have a deep technical understanding of the coin, we also invite you to fill-in our integration form.

Please also refer to our list of already supported coins and tokens if you are unsure if your favorite coin is supported or not.

Integration only (without custom Nano S units) for Bitcoin clones is available at the separate price of 50,000 EUR.

123
Stakeholder Proposals / Re: Legal Council about BTS and No-action
« on: March 10, 2018, 09:33:55 pm »
New Worker Proposal

(1)
With this worker, we (the bitshares blockchain foundation) would like to fund this project to seek legal clarity and presentation for BTS holders and regulators.

[]
Additionally to an opinion letter of a prestigious legal council,
Quote
(2)
we also seek a non-action letter by the United States Securities and Exchange Commission (SEC), the prototype for many regulators in the world.



This should be two separate workers.

#1 seems many agree on urgent and important, wise

#2 we all have varying outlooks, SEC letter is a https://en.wikipedia.org/wiki/Rider_(legislation) to voting for legal council

maybe we should #1 and ask the experts if we should #2

124
What is this?

This is a bot framework for algo trading the Bitshares DEX with an awareness of outside markets.

You get numpy arrays of cryptocompare data to process yourself, I've also included a finite state machine that breaks the market into 4 states:

bull (selloff, support)
bear (resistance, despair)

out of the box it trades the BTS/BTC pair for 30X over the past year of data per backtest

I also offer a 500X pay per view version.

I have multiple machines mining input thresholds for various altcoin/bitcoin pairs.   The AI runs about 500k backtests for each altcoin and I sell these thresholds for you to trade on the DEX via pastecoin.com.  There is nothing to stop you from running a few backtests and creating your own thresholds or even stand alone algos on with this framework.

My goals are:

Make services which provide bot trading via website (like cryptotrader, tradewave, etc. ) obsolete.
Encourage CEX algo traders to move to Bitshares DEX by simplifying API connectivity.
Require absolute minimum module dependencies.
Create a performance aligned altcoin trading strategy back testing environment that is open source and runs locally.


features and dependencies from the script banner:

Code: [Select]
    #===================================================================
    ''' FEATURES '''
    #===================================================================
    '''
 
   ALT/BTC data from cryptocompare.com as signal
 
   Bitshares DEX open.ALT/open.BTC for trading
 
   - Play simple effective 4 state 50 day cross
 
       - uses live 2h arrays to generate moving averages
       - ma1xma2 is about 17x50 day simple moving average cross
       - cross plus +/- threshold changes state logic from bull to bear
       - Bull Logic
           buy 17 day support
           sell 17 day x ~1.5 selloff
       - Bear logic
           sell 17 day resistance
           buy 17 day x ~0.75 despair
       - dynamic stoploss upon market shift
       - approximately 7-20 day trade frequency depending upon pair
       - announces machine state on plot
 
   - Make Markets, Close Margins, Support Trends
 
   - Iceberg entry and exit
 
   - Bot runs local
 
   - Backtest Engine Included
 
   - Maintains storage from backtest to live session
   '''
Code: [Select]
    #===================================================================
    ''' DEPENDENCIES'''
    #===================================================================
    '''
   python 3.4
   python-tk
   matplotlib 1.4
   pybitshares

125
these links are dead sorry, burning out freshy's

Code: [Select]
[size=18pt][b] ETH/BTC 76X[/b] EXTINCTION EVENT 1 YEAR BACKTEST[/size]
[size=14pt]https://www.pastecoin.com/O4VQ6mWEo9J7[/size]

[size=18pt][b]EOS/BTC 30X [/b]EXTINCTION EVENT 155 DAY BACKTEST[/size]
[size=14pt]https://www.pastecoin.com/9JVoDlxxoEPy[/size]

[size=18pt][b]ARDR/BTC 44X [/b]EXTINCTION EVENT 1 YEAR BACKTEST[/size]
[size=14pt]https://www.pastecoin.com/9b7RvPWDQLxz[/size]

126
google search is picking up my ads; seems to take 48 hours.

You can also search pastecoin.com "litepresence" or "extinction event" for full listing





127

https://www.youtube.com/watch?v=83e7BhDdHXU

these links are dead, sorry... burning out freshys
Code: [Select]
[size=18pt]EXTINCTION EVENT [b]OMNI/BTC 836X[/b] 1 YEAR BACKTEST[/size]
[size=14pt]https://www.pastecoin.com/MmvRqYgxRyX4[/size]

[size=18pt]EXTINCTION EVENT [b]EMC/BTC 11976X[/b] 1 YEAR BACKTEST[/size]
[size=14pt]https://www.pastecoin.com/4aqRr5G21A03[/size]

[size=18pt]EXTINCTION EVENT [b]AMP/BTC 559X[/b] 1 YEAR BACKTEST[/size]
[size=14pt]https://www.pastecoin.com/r0wodqx2Q3Aa[/size]

128
reserved sales


pick any altcoin with a year of data,
I'll post a pastecoin backtest
using the Extinction Event framework
that destroys it.



BACKTESTS FOR SALE BUY NOW: 

Fresh Tunes April 1, 2018:




Bitshares DEX ETH/BTC 37.61X
BACKTEST - EXTINCTION EVENT

BUY NOW:  https://www.pastecoin.com/79j1XgJmQJv6



Bitshares DEX BTS/BTC 454.23X
BACKTEST - EXTINCTION EVENT

BUY NOW:  https://www.pastecoin.com/6O3QlzwERNg7



Bitshares DEX OMNI/BTC 322.39X
BACKTEST - EXTINCTION EVENT

BUY NOW:  https://www.pastecoin.com/e9NoyLJbR7k2


129
reserved for version / bugs

The Latest Version is

EV0.00000002

https://github.com/litepresence/extinction-event/blob/master/EV/EV0.00000002.py

Known Bugs

there was an error in chart data effecting moving averages w/ period over 150 when live,  patched March 7th 2018, version number not changed

130
Need a low latency UI for DEX?

[ANN] microDEX
https://bitsharestalk.org/index.php?topic=26201.0


Need a bot?
Runs on local machine?
No subscription fees to pay?
No black box to blindly trust?
 100% open source code?
Backtest and Live session all in one python script?
Trades on Bitshares DEX?
Is aware of outside CEX market prices?
So easy grandma could run it?


[ANN] EXTINCTION EVENT















The Original Code:

https://www.pastebin.com/hzUTtapz

latest version at github here:

https://github.com/litepresence/extinction-event/tree/master/EV

Installation here:

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

Python3 - WTFPLv2*


*Includes Free 30X BTC 5X BTS 1 YEAR BACKTEST


Code: [Select]
EXTINCTION EVENT v0.00000001 alpha release
~=== BEGIN BACKTEST ==================~
API call for chartdata BTC_BTS 1390000000s 1520469392e CANDLE 86400 DAYS 1510
Dataset.....: 420 DAYS
Backtesting.: 365 DAYS
PAIR......: BTC_BTS
BitPAIR...: BTS:OPEN.BTC

CANDLE....: 86400
BEGIN.....: 1488933403 Tue Mar  7 19:36:43 2017

Bitshares
[Tue Mar  7 19:36:43 2017] 1 BUY BEAR DESPAIR 334448.16 BTS at 299 sat value 1.00 BTC
[Tue Mar  7 19:36:43 2017] 2 SELL BEAR RESISTANCE 334448.16 BTS at 307 sat value 1.03 BTC
[Fri Apr  7 20:36:43 2017] 3 BUY BULL SUPPORT 153620.86 BTS at 668 sat value 1.03 BTC
[Sat May  6 20:36:43 2017] 4 SELL BULL OVERBOUGHT 153620.86 BTS at 3013 sat value 4.63 BTC
[Tue May 23 20:36:43 2017] 5 BUY BULL SUPPORT 154826.76 BTS at 2989 sat value 4.63 BTC
[Wed Jun  7 20:36:43 2017] 6 SELL BULL OVERBOUGHT 154826.76 BTS at 8499 sat value 13.16 BTC
[Mon Jun 19 20:36:43 2017] 7 BUY BULL SUPPORT 128380.37 BTS at 10250 sat value 13.16 BTC
[Thu Jul 20 20:36:43 2017] 8 SELL BEAR RESISTANCE 128380.37 BTS at 5825 sat value 7.48 BTC
[Sat Oct  7 20:36:43 2017] 9 BUY BEAR DESPAIR 839235.27 BTS at 891 sat value 7.48 BTC
[Sat Oct 14 20:36:43 2017] 10 SELL BEAR RESISTANCE 839235.27 BTS at 1246 sat value 10.46 BTC
[Sun Nov 19 19:36:43 2017] 11 BUY BULL SUPPORT 919439.38 BTS at 1137 sat value 10.46 BTC
[Mon Dec 18 19:36:43 2017] 12 SELL BULL OVERBOUGHT 919439.38 BTS at 3873 sat value 35.62 BTC
[Wed Jan  3 19:36:43 2018] 13 BUY BULL SUPPORT 825211.57 BTS at 4315 sat value 35.62 BTC
[Sat Jan 27 19:36:43 2018] 14 SELL BEAR RESISTANCE 825211.57 BTS at 4050 sat value 33.42 BTC
===============================================================
START DATE........: Tue Mar  7 19:36:43 2017
END DATE..........: Wed Mar  7 19:36:43 2018
DAYS..............: 365.0
TRADES............: 14
DAYS PER TRADE....: 26.1
START PRICE.......: 0.00000299
END PRICE.........: 0.00001768
START PORTFOLIO...: 1.0 BTC 0.0 BTS
START MAX ASSETS..: 334448.160535 BTS
END MAX ASSETS....: 1890331.92993 BTS
ROI ASSETS........: 5.65X
START MAX CURRENCY: 1.0 BTC
END MAX CURRENCY..: 33.4210685212 BTC
ROI CURRENCY......: 33.42
APY CURRENCY......: 32.42
===============================================================
EXTINCTION EVENT v0.00000001 alpha release
~===END BACKTEST=========================~
#######################################
CURRENCY        = "BTC"
ASSET           = "BTS"
MA1             = 17.00
MA2             = 50.00
SELLOFF         = 2.250
SUPPORT         = 1.000
RESISTANCE      = 1.000
DESPAIR         = 0.525
MIN_CROSS       = 1.000
MAX_CROSS       = 1.000
BULL_STOP       = 1.000
BEAR_STOP       = 1.000
#######################################
# RESOLUTION    : 20
# DAYS          : 365
DPT             = 26.1 # Days Per Trade
# MARKET CAP....: 464.5M
# DOMINANCE.....: 0.1137 - RANK 38
ROI             = 33.42
#######################################


The Tunes:


BTS/BTC 500X https://www.pastecoin.com/6O3QlzeKRNg7
DASH/BTC 25X https://www.pastecoin.com/79j1XgOdQJv6






more alt/btc tunes coming soon








special thanks to:

https://www.youtube.com/watch?v=jJxKXOTNXjc
https://www.youtube.com/watch?v=xV1yUVeA_Fw
https://twitter.com/SEC_News/status/971494501343748097
https://twitter.com/lopp/status/971520121704538112
https://twitter.com/oraclepresence/status/971178302089187328
https://www.reddit.com/r/BinanceExchange/comments/82ou1d/binance_sold_all_my_alt_coins_at_market_rate/
docs.pybitshares.com
coinmarketcap.com/api
cryptocompare.com/api
stackoverflow.com
pastebin.com
pastecoin.com
codeshare.io
chatcrypt.com

131
'''CANCEL ALL VERSION 2'''        h/t @juhni

this version cancels all with a single API call using a list of string ID's

the method is not documented here:

http://docs.pybitshares.com/en/latest/market.html

says:

Quote
cancel(orderNumber, account=None)
Cancels an order you have placed in a given market. Requires only the “orderNumber”. An order number takes the form 1.7.xxx.

Parameters:   orderNumber (str) – The Order Object ide of the form 1.7.xxxx

apparently we can also use a list of str

Code: [Select]
    if command == 'cancel':

        # cancel all orders in this MARKET relentlessly until satisfied
        print(('Bitshares API', command)) 
        orders = MARKET.accountopenorders()
        print((len(orders), 'open orders to cancel'))
        if len(orders):
            attempt = 1   
            order_list = []     
            for order in orders:
                order_list.append(order['id'])
            while attempt:
                try:
                    details = MARKET.cancel(order_list)
                    print (details)
                    attempt = 0
                except:
                    print((attempt, 'cancel failed', order_list))
                    attempt += 1
                    if attempt > 10:
                        print ('cancel aborted')
                        return
                    pass

132
would be super nice if you could sort by volume standardized to BTS in "Starred Markets" and "Featured Markets";
perhaps even as a replacement of the current "VOLUME" column as it really is pretty meaningless as an effective comparison between markets as they're all in different terms.

also, along w/ "Starred Markets" and "Featured Markets":
would be nice if there was a tab for "Active Markets" which included ANY market with > 0 volume in the past 24 hours

 ;D

133
Quote
3 issue still working on
[/quote

I seem to have resolved this as well.

I was calling on 'BTC' markets I needed to be calling 'OPEN.BTC'


134
Quote
the block number updates but is 10 blocks slow
relative to my open gui wallet that is counting blocks upward and connected

the blocktimestamp updates but is 5 hours too fast
relative to time.time()

the price data / book is not updating and is stale/not correct at the onset
relative to the price data I see in my gui bitshares exchange

so issue one was resolved using

Code: [Select]
    CHAIN =  Blockchain(bitshares_instance=BitShares(
        nodes()),mode='head')

mode='head' means latest block even if not irreversible

second issue I created another thread for... it seems to be a bug related to timezone

3 issue still working on

135
Code: [Select]
from bitshares.blockchain import Blockchain
import time


def dex(command):

    if command == 'blocktime':

        now = int(time.time())
        chain = Blockchain(mode='head')
        current_block = chain.get_current_block_num()
        blocktime = chain.block_time(current_block)
        blocktimestamp = chain.block_timestamp(current_block)
        drift = now - blocktimestamp
        drifthours = drift/3600
        print ('block           :', current_block)
        print ('blocktime       :', blocktime)
        print ('stamp           :', blocktimestamp)
        print ('ctime(stamp)    :', time.ctime(blocktimestamp))
        print ('now             :', now)
        print ('ctime(now)      :', time.ctime(now))
        print ('drift seconds   :', ('%s' % drift))
        print ('drift hours     :', ('%.2f' % drifthours))
        return current_block, blocktimestamp, drift   

dex('blocktime')


returns

Code: [Select]
block           : 24764676
blocktime       : 2018-02-26 15:03:48
stamp           : 1519675428
ctime(stamp)    : Mon Feb 26 15:03:48 2018
now             : 1519657430
ctime(now)      : Mon Feb 26 10:03:50 2018
drift seconds   : -17998
drift hours     : -5.00



はるか, [26.02.18 09:58]
It's a core bug?

Abit More, [26.02.18 09:58]
Timestamp Without tz

Abit More, [26.02.18 09:58]
But too late to fix

はるか, [26.02.18 09:58]
Timestamp should always be epoch I think

BTS litepresence1, [26.02.18 09:59]
from user perspective I agree

Abit More, [26.02.18 09:59]
When converted to or from String,lack of a z at the end

はるか, [26.02.18 10:00]
ah yes it's missing a Z

はるか, [26.02.18 10:00]
so it needs all clients to manually handle that...

Abit More, [26.02.18 10:00]
Py lib can add it

Abit More, [26.02.18 10:00]
Yes

Pages: 1 2 3 4 5 6 7 8 [9] 10