Pages:
Author

Topic: [ANN] MarginBot - A Bitfinex Margin Lending Management Bot - page 8. (Read 45953 times)

newbie
Activity: 14
Merit: 0
Thanks for this, HowardF. Seems to be working well so far!

I got this working on 000webhost.com - which is a free web host if anyone was looking for a working free option. If anyone needs help setting it up, let me know. To get it to work, I changed the short tags to full and had to make cron "loaders," which just called get_file_contents() on the real cron files, as 000webhost limits you to running "php -f" in the cronjobs.
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
I did not get it work. I decided to write my own bot. When i finished the Server gave me a "nonce to small error" which can be interpreted as "your privat key and secret key are already in use". Which was not done by my own program and the key was only used for the php bot. I deleted the old keys, created a new one and everything worked as it should.
Any idea how or why that happened ?

nonce to small means you aren't passing a good nonce id to your API key.  It needs to be a unique always incrementing number passed with every query.  I use the microtime in Marginbot.
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
Sorry for my long absence in this thread.  I was working on some other projects over the last couple months, and haven't had much time to spend on bitcoin projects.  I'm going to be checking in a bit more though, and answering any questions about MarginBot anybody has, so feel free to ask away again.
legendary
Activity: 2674
Merit: 1083
Legendary Escrow Service - Tip Jar in Profile
I did not get it work. I decided to write my own bot. When i finished the Server gave me a "nonce to small error" which can be interpreted as "your privat key and secret key are already in use". Which was not done by my own program and the key was only used for the php bot. I deleted the old keys, created a new one and everything worked as it should.
Any idea how or why that happened ?

Maybe bitfinex is binding keys to one single application, storing all the details about the sending computer, browser and so on? Though you might better ask that in bitfinex services thread. https://bitcointalksearch.org/topic/officialbitfinexcom-first-bitcoin-p2p-lending-platform-for-leverage-trading-229438
sr. member
Activity: 339
Merit: 250
Vice versa is not a meal.
I did not get it work. I decided to write my own bot. When i finished the Server gave me a "nonce to small error" which can be interpreted as "your privat key and secret key are already in use". Which was not done by my own program and the key was only used for the php bot. I deleted the old keys, created a new one and everything worked as it should.
Any idea how or why that happened ?
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
Hey there,

i want to test the script right now. I am using XAMPP for testing with Windows. Everytime i went past the database configuration and the website config the install.php script tells me that everything should work fine now and i should make my config readable only. After i did that and klick on "Log On" it just redirects me to install.php again and starts a new installation process.

What could be wrong ?

Sounds like you may be changing your config to be unreadable.  Make sure to set it to something your webserver can read, but not write too.  Using chmod 0644 *should* work, unless your server has some strange custom settings.
legendary
Activity: 2674
Merit: 1083
Legendary Escrow Service - Tip Jar in Profile
Hey there,

i want to test the script right now. I am using XAMPP for testing with Windows. Everytime i went past the database configuration and the website config the install.php script tells me that everything should work fine now and i should make my config readable only. After i did that and klick on "Log On" it just redirects me to install.php again and starts a new installation process.

What could be wrong ?

Maybe your config isnt readable anymore now? Only a guess.
sr. member
Activity: 339
Merit: 250
Vice versa is not a meal.
Hey there,

i want to test the script right now. I am using XAMPP for testing with Windows. Everytime i went past the database configuration and the website config the install.php script tells me that everything should work fine now and i should make my config readable only. After i did that and klick on "Log On" it just redirects me to install.php again and starts a new installation process.

What could be wrong ?
legendary
Activity: 2674
Merit: 1083
Legendary Escrow Service - Tip Jar in Profile
HowardF... can you take out the functioninality that when you change the USD-Values that with every key entered the number is redrawn and the cursor set at the last place? It makes it hard to change anything especially substantially changes.




I use an open source money formatter script that causes this.  I'll look into making it optional.

And it might make sense, if different swap offers created have the same percentage, to merge those offers into one offer. This way the fragmentation of offers could be lowered. They are in the same place anyway with the same percent.

This wouldn't effect the fragmentation significantly to be honest, since most small amounts will all get taken as one loan, and returned at the same time to go back into the loan queue.  Besides, fragmentation is a good thing.  it keeps loans always coming due, which keeps money always going back out on loan, which is how this bot manages to always take advantage of suddent rate spikes. I've generally got anywhere between 200 - 400 loans out on my account, which means I'm always able to catch even 5 or 10 minute long spikes with at least a little loan.

Youre right with the fragmentation but often i see open swap offers that are offered at the exact same rate. Since they are added at the same moment they will most probably will taken in the same moment. But they will still show up as two even though they are the same rate and time. And they will end at the same time too.

Only thought it might be a bit easier to read though its not as important.

Regarding not swapped out USD. You might count them like Dollar-Minutes. Each amount of USD not lend out for some minutes will add to that account. Then one might be able to adjust the settings and lower that amount by checking the performance at the same time.

I think it would be a great tool to maximize profits.
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
HowardF... can you take out the functioninality that when you change the USD-Values that with every key entered the number is redrawn and the cursor set at the last place? It makes it hard to change anything especially substantially changes.




I use an open source money formatter script that causes this.  I'll look into making it optional.

And it might make sense, if different swap offers created have the same percentage, to merge those offers into one offer. This way the fragmentation of offers could be lowered. They are in the same place anyway with the same percent.

This wouldn't effect the fragmentation significantly to be honest, since most small amounts will all get taken as one loan, and returned at the same time to go back into the loan queue.  Besides, fragmentation is a good thing.  it keeps loans always coming due, which keeps money always going back out on loan, which is how this bot manages to always take advantage of suddent rate spikes. I've generally got anywhere between 200 - 400 loans out on my account, which means I'm always able to catch even 5 or 10 minute long spikes with at least a little loan.
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
You can put out smaller offers using Autolend, I am not sure if it is possible using the API though (or worth the hassle of implementing this...).

At the moment the bot has a $50 limit. He wont create new offers below that value.

But he cancels all orders on starting of the cron it seems. At least as far as i read the code. All orders get cancelled and then he meets the $50 limit and cant recreate them. I had $42 sitting around over night because no swap ended in that time.

Last time I tried it wasn't possible using the API, though I haven't tried in a while.  I'll check into this next update.  If its still not possible, I do like the idea of not canceling small orders when below $50.  I'm not sure its really worth the effort, but it would be easy to implement, so I'll look into it.
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
Its some time since i made something with a server so i wonder do you guys protect your marginbot directory? I guess first step would be to exclude it from the robots.txt so that no hacker can find it in google. Next would be to make a password protection for the directory?

How do you protect it? Im not even sure if the API can be misused really but i guess better safe than sorry.

I use a password protected directory on a firewalled server to protect mine.  The actual risk from the API is low, but it is a good idea to put some reasonable security in place, and do you best to prevent anything from finding it in general.  The next version will have a robots.txt by the way, I just haven't pushed it live yet.  Making your own for now is highly suggested.  Nothing worse than having your Marginbot show up on google.



Edit: And a statspage would be good. For example showing how long funds stayed not lent out. That could lead to find better settings. Sorry when i have so many requests. I test the software and some things come to mind while doing it. Wink


I would love to do better stats when I have the time.  I'll be happy to add this to the feature request list.


Edit2: Looks like i cant enable short_open_tag = On on my hosting because of security reasons. I will have to change all files because of that. Maybe its possible to use
Edit3: It looks most files already have the normal tag. Only a couple of files has to be changed. Those are:

index.php
install.php
crons/HourlyCron.php
crons/TenMinuteCron.php
inc/header.php
inc/version_info.php
json/stats.php

I hope i didnt miss one.

Edit4: header.php contains a couple of short tags in the code. Its the only file though. Im sure i found all now.

yeah, i'm terrible at using short tags. Sorry about that, I'll make sure to clean this up in the next release.

legendary
Activity: 2674
Merit: 1083
Legendary Escrow Service - Tip Jar in Profile
You can put out smaller offers using Autolend, I am not sure if it is possible using the API though (or worth the hassle of implementing this...).

At the moment the bot has a $50 limit. He wont create new offers below that value.

But he cancels all orders on starting of the cron it seems. At least as far as i read the code. All orders get cancelled and then he meets the $50 limit and cant recreate them. I had $42 sitting around over night because no swap ended in that time.
legendary
Activity: 2618
Merit: 1007
You can put out smaller offers using Autolend, I am not sure if it is possible using the API though (or worth the hassle of implementing this...).
legendary
Activity: 2674
Merit: 1083
Legendary Escrow Service - Tip Jar in Profile
It might  be good to only cancel swap offers when the total amount of deposit available and loans pending is over 50USD. Otherwise it will cancel a swap with, for example 40$ and no way to put it out there again until more comes in, which might take a day. In that time the swap most probably would have been taken then.
legendary
Activity: 2674
Merit: 1083
Legendary Escrow Service - Tip Jar in Profile
Its some time since i made something with a server so i wonder do you guys protect your marginbot directory? I guess first step would be to exclude it from the robots.txt so that no hacker can find it in google. Next would be to make a password protection for the directory?

How do you protect it? Im not even sure if the API can be misused really but i guess better safe than sorry.

Edit: And a statspage would be good. For example showing how long funds stayed not lent out. That could lead to find better settings. Sorry when i have so many requests. I test the software and some things come to mind while doing it. Wink

Edit2: Looks like i cant enable short_open_tag = On on my hosting because of security reasons. I will have to change all files because of that. Maybe its possible to use
Edit3: It looks most files already have the normal tag. Only a couple of files has to be changed. Those are:

index.php
install.php
crons/HourlyCron.php
crons/TenMinuteCron.php
inc/header.php
inc/version_info.php
json/stats.php

I hope i didnt miss one.

Edit4: header.php contains a couple of short tags in the code. Its the only file though. Im sure i found all now.
legendary
Activity: 2674
Merit: 1083
Legendary Escrow Service - Tip Jar in Profile
HowardF... can you take out the functioninality that when you change the USD-Values that with every key entered the number is redrawn and the cursor set at the last place? It makes it hard to change anything especially substantially changes.

And it might make sense, if different swap offers created have the same percentage, to merge those offers into one offer. This way the fragmentation of offers could be lowered. They are in the same place anyway with the same percent.
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
Some borrowers seem to only take 30-day loans. I think it would be useful to calculate the "Gap Bottom" taking into account only the 30-day offers when the "Minimum for 30 Day" rate is achievable this way (when there are less than "Gap bottom" 30 day offers below the "Minimum for 30 Day" rate).

This is a feature I'm working on adding into the next version.  I've got a lot of other projects taking priority right now, but hope to get the next version up in a few weeks.
full member
Activity: 125
Merit: 101
Some borrowers seem to only take 30-day loans. I think it would be useful to calculate the "Gap Bottom" taking into account only the 30-day offers when the "Minimum for 30 Day" rate is achievable this way (when there are less than "Gap bottom" 30 day offers below the "Minimum for 30 Day" rate).

full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
I like the bot but i wonder about the settings i should use. When i use standard settings then loans are given out pretty fast but often for low rates. Today there were many hours of low rates because for some reason (does someone know why) there were many many usd on offer. I ended up getting swaps for 20% less than normal. So when the minimum is 48 hours to lend then 20% of this is 9,6 hours. So if i would have sat up my values that it would wait around that long then i would still get the same like i get now. Plus a higher chance of getting more on other times.

So taking these considerations into account, what USD-Values should i chose? Any advise?

And can someone say why there were so many usd on offer today? It doesnt look like it had an effect on price though.

The markets over the last couple of days are back to normal actually.  We had been on a pretty crazy rise for about 3 weeks, which is why things probably seemed a bit weird if you just started doing margin lending.

MarginBot was designed in particular to undercut the FRR so that money would actually lend out (in normal conditions, the FRR is an unbreakable wall that almost never gets crossed, so people who set their money to autorenew lend at the FRR would have very long wait times until their money was actually lent).  The philosophy behind MarginBot is to lend out any money in the account as quickly as possible, while still getting as good as possible of a return.  Money not lent lowers your returns much worse than money lent at a slightly lower % rate.

As for settings, I generally do not give setting advice because everyone has their own needs and return expectations, and the amount you have in your account can have a significant impact on appropriate settings.

As a rough guide though, in the current market, on an account with between say $25,000 - $50,000 setting:

Spread Available Lends:   6
Minimum Lend Rate:        0.025% (or whatever you are comfortable with, we've recently been lower than this, but probably won't get this low again for at least a month or 2)
Minimum for 30 Day:       0.1%
Gap Bottom:                  $20,000
Gap Top:                       $125,000

This should provide a good mix of quickly lending out most of the money (the $20,000 gap bottom goes quickly, then a few of your loans will go out), while keeping a little bit waiting for a better rate if theres a spike.  And since the rates are over 0.1% right now you'll take advantage of the high rates with 30 day loans, but as rates go down, you'll move into a position to keep loans short and wait for another rate spike.

(again, these are just loose suggestions, and you mileage may vary....)


Pages:
Jump to: