Bitcoin Forum
April 24, 2024, 01:57:11 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3  All
  Print  
Author Topic: |_-_- | ELEVARA POLONIEX LENDING BOT |-_-_|[BitcoinTalk Member Vouched] {Python}  (Read 25226 times)
R00TC0IN (OP)
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
January 08, 2017, 07:11:19 PM
Last edit: February 01, 2017, 03:45:23 PM by R00TC0IN
 #1

ELEVARA POLONIEX TRADING BOT

https://i.imgur.com/fuZZjMz.png

Poloniex Python Lending Script!

The bot has automatic lending on the exchange at Poloniex.

It can automatically lend all suitable crypto currencies found in your lending account, Or you can specify your own configuration!

It uses an advanced lending strategy which will spread offers across the lend book to take advantage of possible spikes in lending rates.

I also have a trading guide full of trading information and how to guides for new and advanced traders.


Features

    Automatically lend your coins on Poloniex at the highest possible rates, 24 hours a day.

    Configure your own lending strategy via the simple config file the bot generates.

    Be aggressive, hold out for a great rate or be conservative and lend often but at a lower rate, your choice!

    Ability to spread your offers across the lending board to take advantage of spikes in the lending rate.

    Withhold lending a percentage of your coins until the going rate reaches a certain threshold!

    Lock in a high daily rate for a longer period of time period of up to sixty days, Fully configurable client side.

    Run multiple instances of the bot for multiple accounts to maximize profits

  


Simple configuration file

Code:

[API]
apikey = API Key Here
secret =  Secret Here

[BOT]
#Sleeps between active iterations, time in seconds (1-3600)
sleeptimeactive = 5

#Sleeps between inactive iterations, time in seconds (1-3600)
#Set to the same value as sleeptimeactive to disable
sleeptimeinactive = 20

#Minimum daily lend rate in percent (0.0031-5)
#Setting to 0.0031 is about 1% a year, not worth it.
mindailyrate = 0.003

#Maximum lending rate. 2% is good choice because it's default at margin trader interface.
#5% is the maximum rate accepted by the exchange (0.003-5)
maxdailyrate = 5

#The number of offers to split the available balance across the [gaptop, gapbottom] range. (1-20)
spreadlend = 3

#The depth of lendbook (in percent of lendable balance) to move through
#before placing the first (gapbottom) and last (gaptop) offer.
#If gapbottom is set to 0, the first offer will be at the lowest possible rate.
#However some low value is recommended (say 10%) to skip dust offers.
gapbottom = 10
gaptop = 200

#Daily lend rate threshold after which we offer lends for x days as opposed to 2.
#If set to 0 all offers will be placed for a 2 day period (0.003-5)
xdaythreshold = 0.2
xdays = 60

#Auto-transfer of funds from exchange to lending balance.
#Enter ALL to transfer all coins, enter ACTIVE to transfer any coins you have in your lending account when the bot starts, these can be mixed.
#The currencies you enter below (comment it out to disable entirely, just leaving empty will result in an error) will be automatically transferred from your exchange balance to your lending balance whenever you deposit them.
#transferableCurrencies = STR,BTC,BTS,CLAM,DOGE,DASH,LTC,MAID,XMR,XRP,ETH,FCT

#Minimum loan size, the minimum size of offers to make, bigger values prevent the bot from loaning small available amounts but reduce loan fragmentation.
minloansize = 0.001

#Keep Stuck Orders - Sometimes an order gets partially filled. When this happens it may leave the remainder of your coin under the set minloansize.
#If this happens, KeepStuckOrders will keep your order where it is so maybe it can be filled. Otherwise it will be canceled and held until orders expire.
keepstuckorders = True

#Hide coins - Instead of keeping your coins lent out at minlendrate when it is not met, the bot will hold them and wait for the rate to surpass it.
hideCoins = True

#End date for lending, bot will try to make sure all your loans are done by this date so you can withdraw or do whatever you need.
#Uncomment to enable.
#Format: YEAR,MONTH,DAY
#endDate = 2016,12,25

#Raw maximum amount to lend if under maxtolendrate.
#If set to 0 or commented: the bot will check for maxpercenttolend.(0+)
#maxtolend = 0

#Maximum percent to lend if under maxtolendrate.
#If set to 0 or commented: the bot will lend 100% of your balance regardless of rate. (0-100)
#maxpercenttolend = 0

#Max to lend conditional rate.
#If set to more than 0: the maxtolend or maxpercenttolend will be used when the rate is less than or equal to the maxtolendrate.
#If set to 0 or commented: the bot will use the maxtolend or maxpercenttolend all the time. (0.0031-5)
#maxtolendrate = 0

# Local Market Analysis: Choose which coins to record the market of in order to analyse them and compute a recommended lending rate.
# Enter ALL to analyse all coins, enter ACTIVE to analyse the markets of any coins you have in your lending account when the bot starts, these can be mixed.
#analyseCurrencies = STR,BTC,BTS,CLAM,DOGE,DASH,LTC,MAID,XMR,XRP,ETH,FCT
# Choose how long to keep market data. (In days) (1-365)
#analyseMaxAge = 20
# Choose how often to record a market's rate. (In seconds.) (10-3600)
#analyseUpdateInterval = 20
# Choose how aggressive to lend at based on a market's performance. (As a percentile of the market's rate.) (1-99)
# Recommendations: Conservative = 50, Moderate = 75, Aggressive = 90, Very Aggressive = 99
#lendingStyle = 75

#Syntax: ["COIN:mindailyrate:maxactiveamount:maxtolend:maxpercenttolend:maxtolendrate",...]
#If maxactive amount is 0: stop lending this coin. in the future you'll be able to limit amount to be lent.
#If maxtolend is 0: check for maxpercenttolend.
#If maxpercenttolend is 0: 100% is going to be lent.
#If maxtolendrate is set to more than 0: the maxtolend or maxpercenttolend will be used when then rate is less or equal to the maxtolendrate. if set to 0 the bot will use the maxtolend or maxpercenttolend all the time.
#coinconfig = ["BTC:0.18:1:0:0:0","CLAM:0.6:1:0:0:0"]

#This option creates a json log file instead of console output which includes the most recent status.
#Uncomment both jsonfile and jsonlogsize to enable.
#Keep this in the default location if you want to use the webserver.
#jsonfile = www/botlog.json

#Limits the amount of log lines to save.
#jsonlogsize = 200

#Enables a webserver for the www folder, in order to easily use the lendingbot.html with the .json log.
#startWebServer = true

#Customize the IP and port that the webserver is hosted on. Defaults to 0.0.0.0:8000
#0.0.0.0 will point to your default IP (Local IP on LAN as well as localhost), set to 127.0.0.1 if you want it to be only accessible by host computer.
#Do not set to a reserved port
#Advanced users only.
#customWebServerAddress = 127.0.0.1

#The currency that the HTML Overview will present the earnings summary in.
#Options are BTC, USDT, ETH or anything as long as it has a direct BTC market. The default is BTC.
#outputCurrency = BTC


AUTOMATED MARKET DATA ANALYSYS & PERCENTILE LENDING


Code:
currencies_to_analyse = []
open_files = {}
max_age = 0
update_interval = 0
api = None
Data = None
lending_style = 0


def init(config, api1, data1):
    global currencies_to_analyse, open_files, max_age, update_interval, api, Data, lending_style
    currencies_to_analyse = config.get_currencies_list('analyseCurrencies')
    max_age = int(config.get('BOT', 'analyseMaxAge', 30, 1, 365))
    update_interval = int(config.get('BOT', 'analyseUpdateInterval', 60, 10, 3600))
    lending_style = int(config.get('BOT', 'lendingStyle', 50, 1, 99))
    api = api1
    Data = data1
    if len(currencies_to_analyse) != 0:
        for currency in currencies_to_analyse:


def get_rate_suggestion(cur, percentile=lending_style):
    if cur not in open_files:
        return 0
    rates = get_rate_list(cur)
    if use_numpy:
        result = numpy.percentile(rates, int(percentile), interpolation='linear')
    else:
        rates.sort()
        index = int(percentile * len(rates))
        result = rates[index]
    result = float(int(result * 1000000) / 1000000.0)
    return result

Bot running from command line.
Checking rate, Setting loans making percentile loans

https://i.imgur.com/cl6Jc8S.png

Some micro trades and exchanges,


https://imgur.com/a/32iOD

Balance pages

http://imgur.com/LdP2GL1

Trades

https://imgur.com/a/32iOD

Clam Lending


https://imgur.com/a/03yjh

Code:
2017-01-09 20:19:43 Placing 0.10308947 BTC at 0.0268% for 60 days... Loan order placed. 
2017-01-09 20:20:16 Placing 0.00132566 BTC at 0.0264% for 60 days... Loan order placed.
2017-01-09 20:20:17 Placing 0.00132565 BTC at 0.026499% for 60 days... Loan order placed.
2017-01-09 02:21:40 Placing 0.10769074 BTC at 0.0254% for 2 days... Loan order placed.
2017-01-09 02:23:22 Placing 0.00769075 BTC at 0.025499% for 2 days... Loan order placed.
2017-01-09 02:26:44 Placing 0.00512717 BTC at 0.023799% for 2 days... Loan order placed.
2017-01-09 02:26:44 Placing 0.00256359 BTC at 0.0239% for 2 days... Loan order placed.
2017-01-09 02:27:49 Placing 0.00256360 BTC at 0.0239% for 2 days... Loan order placed.
2017-01-09 20:30:14 Placing 1.11051219 LTC at 0.0068% for 60 days... Loan order placed.
2017-01-09 20:31:50 Placing 1.11051219 LTC at 0.00654% for 60 days... Loan order placed.
2017-01-09 20:32:23 Placing 0.00102984 BTC at 0.027399% for 60 days... Loan order placed.
2017-01-09 20:32:23 Placing 0.00205968 BTC at 0.0276% for 60 days... Loan order placed.
2017-01-09 20:33:09 Placing 0.00308954 BTC at 0.0278% for 60 days... Loan order placed.
2017-01-09 20:31:50 Placing 1.11051219 LTC at 0.00654% for 60 days... Loan order placed.
2017-01-09 20:32:23 Placing 0.10102984 BTC at 0.027399% for 60 days... Loan order placed.
2017-01-09 20:32:23 Placing 0.00205968 BTC at 0.0276% for 60 days... Loan order placed.
2017-01-09 20:33:09 Placing 0.00308954 BTC at 0.0278% for 60 days... Loan order placed.
2017-01-09 20:48:34 Placing 1.11051289 LTC at 0.00653% for 60 days... Loan order placed.
2017-01-09 20:59:17 Placing 0.10308956 BTC at 0.0294% for 60 days... Loan order placed.




I accept almost any crypto currency as payment for this trading bot
Price is $5 for the Python Lending Bot

Sales and Support online!

TRADING BOT NOW AVAILABLE

Starting Parameters

    Minimum spread %: How far off the mean price you would like to place your buy and sell marks. This is the minimum amount the adaptive algorithm will allow. For extremely volatile markets you will need to increase this to remain positive. In less volatile you would need to lower this value.

    Maximum spread %: How far off the mean price you would like to place your buy and sell marks. This is the maximum amount the adaptive algorithm will allow. For extremely volatile markets you will need to increase this to remain positive. In less volatile you would need to lower this value.

    Exposure % - This is the percentage of currency or assets you are willing to trade in any given trade. If you would always like to full assets or full currency, then this would need to be 100%.

    Order Timeout (in ticks) - This is the number of ticks the order will remain active on the order book. If the trade is not filled before time is up, those trades are automatically cancelled. Lowering this value will increase order cancellations.

    Adaptive Period (in ticks) - This is the number of ticks evaluated when calculating the adaptive spread.

    Maximum Trade Currency - This is the total maximum value for any trade you make (after Exposure % is applied). For instance, if you have $10,000 and you only ever want to transact less than $1,000 in a single trade, then you would set this to 1000 (if trading in USD). If you are trading in BTC and you only ever want to trade up to 1 BTC, then you would set this value to 1. If you would like to use your full funds every time, then set this to an extremely high value (ex: 10000000).

Notes as a trader:

Trading whether algorithmic or discrete is challenging, there will be ups and downs. String of winners and losers is part of trading, not outliers. Therefore, performance should be evaluated with enough sample size with a variety of market conditions to determine its quality. I recommend giving this bot a sample size that you are comfortable with before joining or leaving.

WORKING ON
Bitfinex|Bitstamp|Coinbase|Houbi|Kraken|OKCoin|Poloniex

Price 0.03850 BTC

https://satoshibox.com/bkaa784i8xenmg2a3ifdt6ev

Or PM me direct to buy on the forum

Accepted Payment Methods.

AMP    Synereo AMP    
ARDR Ardor    
BBR    Boolberry    
BCN    Bytecoin    
BCY    BitCrystals
BELA    BellaCoin
BITS    Bitstar    
BLK    BlackCoin    
BTC    Bitcoin    
BTCD BitcoinDark    
BTM    Bitmark    
BTS    BitShares    
BURST Burst    
CLAM CLAMS    
CURE Curecoin    
DASH Dash    
DCR    Decred    
DGB    DigiByte    
DOGE Dogecoin    
EMC2 Einsteinium    
ETC    Ethereum Classic    
ETH    Ethereum
EXP    Expanse    
FLDC    FoldingCoin    
FLO    Florincoin    
GAME GameCredits    
GRC    Gridcoin Research    
HUC    Huntercoin
HZ    Horizon    
IOC    IO Digital Currency    
LBC    LBRY Credits    
LSK    Lisk    
LTC    Litecoin    
MAID MaidSafeCoin    
MYR    Myriadcoin
NAUT Nautiluscoin    
NAV    NAVCoin    
NEOS Neoscoin    
NMC    Namecoin    
NOBL NobleCoin    
NOTE DNotes    
NSR    NuShares    
NXC    Nexium    
NXT    NXT
OMNI Omni    
PINK    Pinkcoin    
POT    PotCoin    
PPC    Peercoin    
QBK    Qibuck    
QORA Qora    
QTL    Quatloo    
RADS Radium    
RBY    Rubycoin    
REP    Augur    
RIC    Riecoin    
SBD    Steem Dollars    
SC    Siacoin    
SDC    Shadow    
SJCX    Storjcoin X    
STEEM STEEM    
STR    Stellar    
STRAT Stratis    
SYS    Syscoin    
UNITY SuperNET    
USDT Tether USD    
VIA    Viacoin    
VOX    Voxels    
VRC    VeriCoin    
VTC    Vertcoin    
XCP    Counterparty    
XEM    NEM    
XMG    Magi    
XMR    Monero    
XPM    Primecoin
XRP    Ripple    
XVC    Vcash    
ZEC    Zcash


1713923831
Hero Member
*
Offline Offline

Posts: 1713923831

View Profile Personal Message (Offline)

Ignore
1713923831
Reply with quote  #2

1713923831
Report to moderator
"With e-currency based on cryptographic proof, without the need to trust a third party middleman, money can be secure and transactions effortless." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713923831
Hero Member
*
Offline Offline

Posts: 1713923831

View Profile Personal Message (Offline)

Ignore
1713923831
Reply with quote  #2

1713923831
Report to moderator
klendor
Member
**
Offline Offline

Activity: 115
Merit: 100


View Profile
January 08, 2017, 07:14:40 PM
 #2

Vouch copy?
R00TC0IN (OP)
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
January 08, 2017, 07:25:31 PM
Last edit: January 23, 2017, 02:26:14 AM by R00TC0IN
 #3

Vouch copy?

Vouch Copy Sent.

Any Issues please just ask!

RootCoin
hacktek
Newbie
*
Offline Offline

Activity: 60
Merit: 0


View Profile
January 08, 2017, 08:29:52 PM
 #4

What sorts of profits have you achieved with this? Any proof?
eddie13
Legendary
*
Offline Offline

Activity: 2296
Merit: 2262


BTC or BUST


View Profile
January 08, 2017, 08:38:52 PM
 #5

Sounds great, I could really use one and would love a vouch or maybe even buy one but..

It sounds like an excellent way to install something onto my computer to steal all of my BTC..


Chancellor on Brink of Second Bailout for Banks
R00TC0IN (OP)
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
January 08, 2017, 08:40:46 PM
 #6

What sorts of profits have you achieved with this? Any proof?

Today's trades

https://imgur.com/a/uVGL1

Last 7 days $300 Profit - Was a lot to do with the movement of bitcoin.
On micro trades $33.80 Profit - Based on a lot of what you see in the screen shot above.

All depends how you want to use it.

With regards to installing anything there is nothing to install on your machine from the code. it runs live with python.
The also a lot of the code is build from other popular open source trading bots only with some additional features added inspired by MarginBot and Bitfinex LendingBot.

eddie13
Legendary
*
Offline Offline

Activity: 2296
Merit: 2262


BTC or BUST


View Profile
January 08, 2017, 08:45:08 PM
 #7

What sorts of profits have you achieved with this? Any proof?

Today's trades

https://imgur.com/a/uVGL1

Last 7 days $300 Profit - Was a lot to do with the movement of bitcoin.
On micro trades $33.80 Profit - Based on a lot of what you see in the screen shot above.

All depends how you want to use it.

With regards to installing anything there is nothing to install on your machine from the code. it runs live with python.
The also a lot of the code is build from other popular open source trading bots only with some additional features added.



Those are not loan earnings..
Is this proof of your trading strategy or lending bot?

Chancellor on Brink of Second Bailout for Banks
R00TC0IN (OP)
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
January 08, 2017, 08:54:13 PM
 #8

Please bear with my slow reply's there seems to be some crazy time limit for me to reply to your comments.

The image above is the trades for today. We don't lend everyday with the bot. Right now the money to be made is in exchange in the guide we will show you ways to spot trend's in the market to make successful trades.

The lending bot is another way to maximize on lending on poloniex, The trading bot works on the premises of the following config.

Code:

[API]
apikey = API Key Here
secret =  Secret Here

[BOT]
#Sleeps between active iterations, time in seconds (1-3600)
sleeptimeactive = 5

#Sleeps between inactive iterations, time in seconds (1-3600)
#Set to the same value as sleeptimeactive to disable
sleeptimeinactive = 20

#Minimum daily lend rate in percent (0.0031-5)
#Setting to 0.0031 is about 1% a year, not worth it.
mindailyrate = 0.003

#Maximum lending rate. 2% is good choice because it's default at margin trader interface.
#5% is the maximum rate accepted by the exchange (0.003-5)
maxdailyrate = 5

#The number of offers to split the available balance across the [gaptop, gapbottom] range. (1-20)
spreadlend = 3

#The depth of lendbook (in percent of lendable balance) to move through
#before placing the first (gapbottom) and last (gaptop) offer.
#If gapbottom is set to 0, the first offer will be at the lowest possible rate.
#However some low value is recommended (say 10%) to skip dust offers.
gapbottom = 10
gaptop = 200

#Daily lend rate threshold after which we offer lends for x days as opposed to 2.
#If set to 0 all offers will be placed for a 2 day period (0.003-5)
xdaythreshold = 0.2
xdays = 60

#Auto-transfer of funds from exchange to lending balance.
#Enter ALL to transfer all coins, enter ACTIVE to transfer any coins you have in your lending account when the bot starts, these can be mixed.
#The currencies you enter below (comment it out to disable entirely, just leaving empty will result in an error) will be automatically transferred from your exchange balance to your lending balance whenever you deposit them.
#transferableCurrencies = STR,BTC,BTS,CLAM,DOGE,DASH,LTC,MAID,XMR,XRP,ETH,FCT

#Minimum loan size, the minimum size of offers to make, bigger values prevent the bot from loaning small available amounts but reduce loan fragmentation.
minloansize = 0.001

#Keep Stuck Orders - Sometimes an order gets partially filled. When this happens it may leave the remainder of your coin under the set minloansize.
#If this happens, KeepStuckOrders will keep your order where it is so maybe it can be filled. Otherwise it will be canceled and held until orders expire.
keepstuckorders = True

#Hide coins - Instead of keeping your coins lent out at minlendrate when it is not met, the bot will hold them and wait for the rate to surpass it.
hideCoins = True

#End date for lending, bot will try to make sure all your loans are done by this date so you can withdraw or do whatever you need.
#Uncomment to enable.
#Format: YEAR,MONTH,DAY
#endDate = 2016,12,25

#Raw maximum amount to lend if under maxtolendrate.
#If set to 0 or commented: the bot will check for maxpercenttolend.(0+)
#maxtolend = 0

#Maximum percent to lend if under maxtolendrate.
#If set to 0 or commented: the bot will lend 100% of your balance regardless of rate. (0-100)
#maxpercenttolend = 0

#Max to lend conditional rate.
#If set to more than 0: the maxtolend or maxpercenttolend will be used when the rate is less than or equal to the maxtolendrate.
#If set to 0 or commented: the bot will use the maxtolend or maxpercenttolend all the time. (0.0031-5)
#maxtolendrate = 0

# Local Market Analysis: Choose which coins to record the market of in order to analyse them and compute a recommended lending rate.
# Enter ALL to analyse all coins, enter ACTIVE to analyse the markets of any coins you have in your lending account when the bot starts, these can be mixed.
#analyseCurrencies = STR,BTC,BTS,CLAM,DOGE,DASH,LTC,MAID,XMR,XRP,ETH,FCT
# Choose how long to keep market data. (In days) (1-365)
#analyseMaxAge = 20
# Choose how often to record a market's rate. (In seconds.) (10-3600)
#analyseUpdateInterval = 20
# Choose how aggressive to lend at based on a market's performance. (As a percentile of the market's rate.) (1-99)
# Recommendations: Conservative = 50, Moderate = 75, Aggressive = 90, Very Aggressive = 99
#lendingStyle = 75

#Syntax: ["COIN:mindailyrate:maxactiveamount:maxtolend:maxpercenttolend:maxtolendrate",...]
#If maxactive amount is 0: stop lending this coin. in the future you'll be able to limit amount to be lent.
#If maxtolend is 0: check for maxpercenttolend.
#If maxpercenttolend is 0: 100% is going to be lent.
#If maxtolendrate is set to more than 0: the maxtolend or maxpercenttolend will be used when then rate is less or equal to the maxtolendrate. if set to 0 the bot will use the maxtolend or maxpercenttolend all the time.
#coinconfig = ["BTC:0.18:1:0:0:0","CLAM:0.6:1:0:0:0"]

#This option creates a json log file instead of console output which includes the most recent status.
#Uncomment both jsonfile and jsonlogsize to enable.
#Keep this in the default location if you want to use the webserver.
#jsonfile = www/botlog.json

#Limits the amount of log lines to save.
#jsonlogsize = 200

#Enables a webserver for the www folder, in order to easily use the lendingbot.html with the .json log.
#startWebServer = true

#Customize the IP and port that the webserver is hosted on. Defaults to 0.0.0.0:8000
#0.0.0.0 will point to your default IP (Local IP on LAN as well as localhost), set to 127.0.0.1 if you want it to be only accessible by host computer.
#Do not set to a reserved port
#Advanced users only.
#customWebServerAddress = 127.0.0.1

#The currency that the HTML Overview will present the earnings summary in.
#Options are BTC, USDT, ETH or anything as long as it has a direct BTC market. The default is BTC.
#outputCurrency = BTC


It has modules that analize market data and make percentile lending based on the market data at that time.
Via the following module.

Code:
currencies_to_analyse = []
open_files = {}
max_age = 0
update_interval = 0
api = None
Data = None
lending_style = 0


def init(config, api1, data1):
    global currencies_to_analyse, open_files, max_age, update_interval, api, Data, lending_style
    currencies_to_analyse = config.get_currencies_list('analyseCurrencies')
    max_age = int(config.get('BOT', 'analyseMaxAge', 30, 1, 365))
    update_interval = int(config.get('BOT', 'analyseUpdateInterval', 60, 10, 3600))
    lending_style = int(config.get('BOT', 'lendingStyle', 50, 1, 99))
    api = api1
    Data = data1
    if len(currencies_to_analyse) != 0:
        for currency in currencies_to_analyse:

            try:
                api.api_query("returnLoanOrders", {'currency': currency, 'limit': '5'})
            except Exception as cur_ex:
                print "Error: You entered an incorrect currency: '" + currency + \
                      "' to analyse the market of, please check your settings. Error message: " + str(cur_ex)
                exit(1)

            else:
                path = "market_data/" + currency + "_market_data.csv"
                open_files[currency] = path

        thread = threading.Thread(target=update_market_loop)
        thread.deamon = True
        thread.start()


def update_market_loop():
    while True:
        update_markets()
        delete_old_data()
        time.sleep(update_interval)


def update_markets():
    for cur in open_files:
        with open(open_files[cur], 'a') as f:
            writer = csv.writer(f, lineterminator='\n')
            raw_data = api.return_loan_orders(cur, 5)['offers'][0]
            market_data = [Data.timestamp(), raw_data['rate']]
            writer.writerow(market_data)


def delete_old_data():
    for cur in open_files:
        with open(open_files[cur], 'rb') as file_a:
            new_a_buf = StringIO()
            writer = csv.writer(new_a_buf)
            reader2 = csv.reader(file_a)
            for row in reader2:
                if get_day_difference(row[0]) < max_age:
                    writer.writerow(row)

        # At this point, the contents (new_a_buf) exist in memory
        with open(open_files[cur], 'wb') as file_b:
            file_b.write(new_a_buf.getvalue())


def get_day_difference(date_time):  # Will be in format '%Y-%m-%d %H:%M:%S'
    date1 = datetime.datetime.strptime(date_time, '%Y-%m-%d %H:%M:%S')
    now = datetime.datetime.now()
    diff_days = (now - date1).days
    return diff_days


def get_rate_list(cur='all'):
    if cur == 'all':
        all_rates = {}
        for cur in open_files:
            with open(open_files[cur], 'r') as f:
                reader = csv.reader(f)
                rates = []
                for row in reader:
                    rates.append(row[1])
                rates = map(float, rates)
                all_rates[cur] = rates
        return all_rates

    else:
        if cur not in open_files:
            return []
        with open(open_files[cur], 'r') as f:
            reader = csv.reader(f)
            rates = []
            for row in reader:
                rates.append(row[1])
            rates = map(float, rates)
        return rates


def get_rate_suggestion(cur, percentile=lending_style):
    if cur not in open_files:
        return 0
    rates = get_rate_list(cur)
    if use_numpy:
        result = numpy.percentile(rates, int(percentile), interpolation='linear')
    else:
        rates.sort()
        index = int(percentile * len(rates))
        result = rates[index]
    result = float(int(result * 1000000) / 1000000.0)
    return result
hacktek
Newbie
*
Offline Offline

Activity: 60
Merit: 0


View Profile
January 08, 2017, 09:23:44 PM
 #9

I'm a bit confused.

So the bot will only automatically lend and not trade but the guide covers trading? Is that it?
R00TC0IN (OP)
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
January 08, 2017, 09:27:16 PM
 #10

I'm a bit confused.

So the bot will only automatically lend and not trade but the guide covers trading? Is that it?

Correct. Its a trading guide and a lending bot.

Two separate types of investing and trading.

Used together can be quite a powerful tool.
icet208
Hero Member
*****
Offline Offline

Activity: 762
Merit: 500


View Profile
January 08, 2017, 11:25:30 PM
 #11

Willing to offer a review after testing if you offer a vouch copy.
cheers
R00TC0IN (OP)
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
January 08, 2017, 11:31:11 PM
 #12

Willing to offer a review after testing if you offer a vouch copy.
cheers

Send me your email I will send you the download link via wetransfer

Thanks
blg42598
Hero Member
*****
Offline Offline

Activity: 867
Merit: 1000


View Profile
January 08, 2017, 11:38:30 PM
 #13

Can you post screenshots of the bot in action? I'm interested but I'd like to see more.
R00TC0IN (OP)
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
January 09, 2017, 12:15:57 AM
 #14

Vouch Copy's Sent.

R00TC0IN (OP)
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
January 09, 2017, 12:26:10 AM
Last edit: February 12, 2017, 12:28:33 AM by R00TC0IN
 #15

Can you post screenshots of the bot in action? I'm interested but I'd like to see more.

Bot in action from the command line submitting loans. checking rate's ect.

https://imgur.com/a/uuKai

I would post better images but seems like this place has rules on posting images too. And posting quicker that 320 seconds!


Thanks

R00TC0IN (OP)
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
January 09, 2017, 01:45:58 AM
 #16

First Customer [ https://blockchain.info/address/18gSbv6tu8oYniEJaKANUQ6uYoB7xo13R8 ]

https://imgur.com/a/r5nng

Placing loans :

Code:
2017-01-09 00:07:16 Placing 0.00408267 BTC at 0.020699% for 2 days... Loan order placed.
2017-01-09 00:08:20 Placing 0.00136089 BTC at 0.020498% for 2 days... Loan order placed.
2017-01-09 00:08:21 Placing 0.00272177 BTC at 0.020598% for 2 days... Loan order placed.
2017-01-09 01:32:31 Placing 0.00769066 BTC at 0.0213% for 2 days... Loan order placed.
2017-01-09 01:40:14 Placing 0.00512711 BTC at 0.0211% for 2 days... Loan order placed.
2017-01-09 01:40:14 Placing 0.00256356 BTC at 0.021199% for 2 days... Loan order placed.



mindtrip
Legendary
*
Offline Offline

Activity: 1167
Merit: 1009



View Profile WWW
January 09, 2017, 01:57:26 AM
 #17

I am interested in testing your bot. If your willing to send me a vouch copy I will test it and leave my feedback as well as some trust feedback for you. My contact info is listed in my profile
R00TC0IN (OP)
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
January 09, 2017, 02:02:05 AM
 #18

I am interested in testing your bot. If your willing to send me a vouch copy I will test it and leave my feedback as well as some trust feedback for you. My contact info is listed in my profile

Hi

I have sent out a number of vouch copy's to the first few people who have asked.

Let me know if you would like to buy it. Its a low investment for a fantastic way to trade via the API system,

Thanks RootCoin



blg42598
Hero Member
*****
Offline Offline

Activity: 867
Merit: 1000


View Profile
January 09, 2017, 02:12:38 AM
 #19

How much does I try to make per trade? What % profit should be expect every one or two days?
R00TC0IN (OP)
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
January 09, 2017, 02:18:40 AM
 #20

How much does I try to make per trade? What % profit should be expect every one or two days?


Have a read at the configuration file.

This is where you set up your parameters for bot. Every setting tell's you exactly its function.

It all depends on what you trade and loan.

I trade in almost everything on poloniex each day I make around $13-18 on micro trades and depending on the loan values you set in the program and what your trading balance will allow some weeks I have seen profits of $400+ past week or two has been good dew to bitcoin surge in price so was a good time to trade and loan.

Code:
[API]
apikey = API Key Here
secret =  Secret Here

[BOT]
#Sleeps between active iterations, time in seconds (1-3600)
sleeptimeactive = 5

#Sleeps between inactive iterations, time in seconds (1-3600)
#Set to the same value as sleeptimeactive to disable
sleeptimeinactive = 20

#Minimum daily lend rate in percent (0.0031-5)
#Setting to 0.0031 is about 1% a year, not worth it.
mindailyrate = 0.003

#Maximum lending rate. 2% is good choice because it's default at margin trader interface.
#5% is the maximum rate accepted by the exchange (0.003-5)
maxdailyrate = 5

#The number of offers to split the available balance across the [gaptop, gapbottom] range. (1-20)
spreadlend = 3

#The depth of lendbook (in percent of lendable balance) to move through
#before placing the first (gapbottom) and last (gaptop) offer.
#If gapbottom is set to 0, the first offer will be at the lowest possible rate.
#However some low value is recommended (say 10%) to skip dust offers.
gapbottom = 10
gaptop = 200

#Daily lend rate threshold after which we offer lends for x days as opposed to 2.
#If set to 0 all offers will be placed for a 2 day period (0.003-5)
xdaythreshold = 0.2
xdays = 60

#Auto-transfer of funds from exchange to lending balance.
#Enter ALL to transfer all coins, enter ACTIVE to transfer any coins you have in your lending account when the bot starts, these can be mixed.
#The currencies you enter below (comment it out to disable entirely, just leaving empty will result in an error) will be automatically transferred from your exchange balance to your lending balance whenever you deposit them.
#transferableCurrencies = STR,BTC,BTS,CLAM,DOGE,DASH,LTC,MAID,XMR,XRP,ETH,FCT

#Minimum loan size, the minimum size of offers to make, bigger values prevent the bot from loaning small available amounts but reduce loan fragmentation.
minloansize = 0.001

#Keep Stuck Orders - Sometimes an order gets partially filled. When this happens it may leave the remainder of your coin under the set minloansize.
#If this happens, KeepStuckOrders will keep your order where it is so maybe it can be filled. Otherwise it will be canceled and held until orders expire.
keepstuckorders = True

#Hide coins - Instead of keeping your coins lent out at minlendrate when it is not met, the bot will hold them and wait for the rate to surpass it.
hideCoins = True

#End date for lending, bot will try to make sure all your loans are done by this date so you can withdraw or do whatever you need.
#Uncomment to enable.
#Format: YEAR,MONTH,DAY
#endDate = 2017,12,25

#Raw maximum amount to lend if under maxtolendrate.
#If set to 0 or commented: the bot will check for maxpercenttolend.(0+)
#maxtolend = 0

#Maximum percent to lend if under maxtolendrate.
#If set to 0 or commented: the bot will lend 100% of your balance regardless of rate. (0-100)
#maxpercenttolend = 0

#Max to lend conditional rate.
#If set to more than 0: the maxtolend or maxpercenttolend will be used when the rate is less than or equal to the maxtolendrate.
#If set to 0 or commented: the bot will use the maxtolend or maxpercenttolend all the time. (0.0031-5)
#maxtolendrate = 0

# Local Market Analysis: Choose which coins to record the market of in order to analyse them and compute a recommended lending rate.
# Enter ALL to analyse all coins, enter ACTIVE to analyse the markets of any coins you have in your lending account when the bot starts, these can be mixed.
#analyseCurrencies = STR,BTC,BTS,CLAM,DOGE,DASH,LTC,MAID,XMR,XRP,ETH,FCT
# Choose how long to keep market data. (In days) (1-365)
#analyseMaxAge = 20
# Choose how often to record a market's rate. (In seconds.) (10-3600)
#analyseUpdateInterval = 20
# Choose how aggressive to lend at based on a market's performance. (As a percentile of the market's rate.) (1-99)
# Recommendations: Conservative = 50, Moderate = 75, Aggressive = 90, Very Aggressive = 99
#lendingStyle = 75

#Syntax: ["COIN:mindailyrate:maxactiveamount:maxtolend:maxpercenttolend:maxtolendrate",...]
#If maxactive amount is 0: stop lending this coin. in the future you'll be able to limit amount to be lent.
#If maxtolend is 0: check for maxpercenttolend.
#If maxpercenttolend is 0: 100% is going to be lent.
#If maxtolendrate is set to more than 0: the maxtolend or maxpercenttolend will be used when then rate is less or equal to the maxtolendrate. if set to 0 the bot will use the maxtolend or maxpercenttolend all the time.
#coinconfig = ["BTC:0.18:1:0:0:0","CLAM:0.6:1:0:0:0"]

#This option creates a json log file instead of console output which includes the most recent status.
#Uncomment both jsonfile and jsonlogsize to enable.
#Keep this in the default location if you want to use the webserver.
#jsonfile = www/botlog.json

#Limits the amount of log lines to save.
#jsonlogsize = 200

#Enables a webserver for the www folder, in order to easily use the lendingbot.html with the .json log.
#startWebServer = true

#Customize the IP and port that the webserver is hosted on. Defaults to 0.0.0.0:8000
#0.0.0.0 will point to your default IP (Local IP on LAN as well as localhost), set to 127.0.0.1 if you want it to be only accessible by host computer.
#Do not set to a reserved port
#Advanced users only.
#customWebServerAddress = 127.0.0.1

#The currency that the HTML Overview will present the earnings summary in.
#Options are BTC, USDT, ETH or anything as long as it has a direct BTC market. The default is BTC.
#outputCurrency = BTC

Pages: [1] 2 3  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!