base currency configurable - feature request
I noticed in your program everything has to be converted to USD.
def convert_to_usd(self)
that you hard wired the base currency to function name.
It is possible to avoid using the concept of base currency at all. This is how to achieve it:
- When displaying price difference, cross reference prices in both ccurrency;
- When measuring profit, measure it directly using bitcoin.
e.g. output can be:
There is 1BTC profit to be made! Sell 10 BTC on Intersango @ 110EUR (worth 8800CNY) and buy 11BTC on MtGox @800CNY (worth 100EUR)
In the above example, since USD is not involved, it is not used at all. USD is not necessarily involved in the trade, but bitcoin must, thus profit is better measured in BTC than in USD.
You are right USD is not necessarily involved, it was just easier to write it like that (call me lazy). I'm really busy these days, I keep the issue open.
Hey Max, thanks for writing this bot. The code's clean and easy to read, though a little light on documentation for my tastes. I went ahead and sent you $5 in bitcoin as a token of appreciation. Get yourself some coffee or a pint or something. :-)
Hey thank you @ryepdx :+1: - first time an issue reply brings me money ;) - BTW, you're right, documentation and testing are seriously lacking.
I'm working on both this issue and on improving the documentation and testing in my fork. I'm also doing a major overhaul of the whole thing to allow for multi-market trade chains that leave you with more of the currency you began with. I'm particularly interested in this because it'll allow users to take advantage of inter-crypto arbitrage opportunities.
That said, is there any reason you're passing weighted_buyprice and weighted_sellprice around everywhere? I see that you're logging it to different places, but they don't appear to be doing anything beyond that.
Hi - I'm new to github and new to python (but hopefully enough experience of other languages to get on fairly quickly). I'm in the UK, so agree the USD bias is a bit strong. After a few hours have got all your code up and running, and added MtGox GBP - should I add this to the repository? would anyone be interested?
Please do add MtGox GBP if you get a chance.
On Sun, Nov 24, 2013 at 8:01 AM, roryj78 [email protected] wrote:
Hi - I'm new to github and new to python (but hopefully enough experience of other languages to get on fairly quickly). I'm in the UK, so agree the USD bias is a bit strong. After a few hours have got all your code up and running, and added MtGox GBP - should I add this to the repository? would anyone be interested?
— Reply to this email directly or view it on GitHubhttps://github.com/maxme/bitcoin-arbitrage/issues/17#issuecomment-29154867 .
Roryj78, you should probably create a fork of this project, push your changes to the fork, and the issue a pull request for your changes. That'll give us a chance to review your code.
I will give it a go
On 24 November 2013 18:38, Ryan [email protected] wrote:
Roryj78, you should probably create a fork of this project, push your changes to the fork, and the issue a pull request for your changes. That'll give us a chance to review your code.
— Reply to this email directly or view it on GitHubhttps://github.com/maxme/bitcoin-arbitrage/issues/17#issuecomment-29162307 .
I think I have managed to create a fork ( github.com/roryj78/bitcoin-arbitrage) and issed a pull request... Let me know if i've done it correctly!
I've also been looking at CampBX feed - but it comes back as "order book expired". Is this because there isn't a date in the returned data, or because we are parsing the data incorrectly. It pulls data from: http://campbx.com/api/xdepth.php which appears to be correctly formatted and up to date...?
On 24 November 2013 18:45, Rory Johnston [email protected] wrote:
I will give it a go
On 24 November 2013 18:38, Ryan [email protected] wrote:
Roryj78, you should probably create a fork of this project, push your changes to the fork, and the issue a pull request for your changes. That'll give us a chance to review your code.
— Reply to this email directly or view it on GitHubhttps://github.com/maxme/bitcoin-arbitrage/issues/17#issuecomment-29162307 .