Skip to content

Conversation

@rogerioaguas
Copy link

Add total earned by currency, and creating function in poloniex class.

@lalbuquerque
Copy link

Very useful!

Copy link
Member

@Evanito Evanito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Reviewed code, have not tested] Your commit overwrites two recently merged commits, #108 and #107

Please update code with these commits included. You can do what ever works.

Otherwise, I feel like this feature is a good enhancement. I will be glad to merge this once the issues are fixed and it has been user tested.

@rnevet
Copy link
Collaborator

rnevet commented Oct 2, 2016

Need to rebase on master.

@rogerioaguas
Copy link
Author

Ok, i found a problem with poloniex API. This api return only 188 last loan but i when found solution i will make another pull to your review. Thanks

Bruno Colombini''
(21)9967-0004

Developer para iphone e sistemas Web.

bruno.colombini@me.com

On 2 Oct 2016, at 06:56, Raanan notifications@github.com wrote:

Need to revise on master.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #114 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/ADDed4412KODoDZcgAKKhhGgV8OatuIEks5qv3_NgaJpZM4KLkdg.

@prfiredragon
Copy link
Contributor

prfiredragon commented Oct 3, 2016

@bcolombini , I make some tests. I think that I found something that may help you. but you most test it.
You need to create an entry in the configuration for the initial date of trade or from when you want to display the data. for the start variable.

on lendingbot.py
ts = time.time()
end = datetime.datetime.fromtimestamp(ts).strftime('%d/%m/%Y')
start = '01/07/2015'
timestampStart = time.mktime(datetime.datetime.strptime(start, "%d/%m/%Y").timetuple())
timestampEnd = time.mktime(datetime.datetime.strptime(end, "%d/%m/%Y").timetuple())
earned = earnedTotal(bot.returnLendingHistory(timestampStart,timestampEnd))

on poloniex.py
def returnLendingHistory(self,start,stop):
return self.api_query('returnLendingHistory',{'start':start,'end':stop})

@praeluceo
Copy link

This functionality would be extremely useful to the bot, especially if it could list lifetime earnings by the bot, as well as broken down by monthly revenue. I have a spreadsheet where I manually run the report by comparing the Unix timestamps between two dates ala:
https://poloniex.com/tradeHistory#analysis/BTC/-/lending/1465516800/1465603199

But to have this automatically maintained in realtime by the bot would be awesome. I'd be willing to tip for this feature!

@ckcollab
Copy link
Contributor

ckcollab commented Apr 8, 2017

@praeluceo I could do this, please contact me :)

For my reference: https://poloniex.com/tradeHistory#analysis/BTC/-/lending

parser.add_argument("-spread", "--spreadlend", help="How many orders to split your lending into")
parser.add_argument("-gapbot", "--gapbottom", help="Percentage of your order's volume into the ledger you start lending")
parser.add_argument("-gaptop", "--gaptop", help="Percentage of your order's volume into the ledger you stop lending")
parser.add_argument("-60day", "--sixtydaythreshold", help="Rate at where bot will request to lend for 60 days") # only used for backward compatibility
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing these arguments is what needs to be changed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a complete refresh at this point.

@rnevet
Copy link
Collaborator

rnevet commented May 13, 2017

I think this needs a rewrite.
I would like to see this as a plugin "account_stats" not cluttering the main code.
It also doesn't make sense to calculate the total earned on every bot cycle, my lending history is now ~15MB.
So requests to Poloniex should be incremental.

@rnevet
Copy link
Collaborator

rnevet commented May 14, 2017

FYI, I'm working on an implementation for this with another approach.

@tamaskan tamaskan mentioned this pull request Jun 3, 2017
6 tasks
@rnevet rnevet closed this Jun 19, 2017
@ghost ghost removed the Reviewed label Jun 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants