Bitcoin Forum
June 27, 2024, 04:12:04 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 [48] 49 50 51 »
941  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: March 15, 2013, 01:21:21 AM
fixed within 5 minutes after quick chat in #mtgox on freenode ;-)
Now I know where to go when there are problems
942  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: March 15, 2013, 12:34:34 AM

"Method not found"

is the answer I get from the server for every signed API request (such as private/idkey or private/info or private/orders or order/add, order/cancel etc).

It started happening exactly at 2013-03-14 23:53:48 (central european time), it did not close the connection, it just suddenly stopped accepting any API commands.

Both servers (socketio and websocket) behave this way. I still get ticker, trade and depth but cannot send any trading commands or other commands anymore.

943  Economy / Trading Discussion / Re: ncurses based MtGox live monitor and trading-bot-framework on: March 13, 2013, 05:03:05 PM
I have just run my code through 2to3 and did some additional small adjustments and got it almost working (there are no fundamental problems, its just a few module names have changed, the () around the print (there are only few) and the change to the str class (strings in py3 are always unicode and for byte-strings i have to use bytes() because str() will not have a decode() method anymore, so a few things regarding the encryption/decryption of the api secret and and base64-encoding/decoding and signing stuff must be slightly changed to use bytes() where I currently (ab)use str() for byte strings, this should all be possible without too many problems. Its only few places that need to be changed.

The main problem was the websocket code from Hiroki Ohtani, I first tried to port it myself, it contains a lot of the same sort of string manipulation all over the place and after an hour or so I gave up. Then I saw that there already exists an experimental py3 version of this module from the same author already on github, so not all hope is lost, it can eventually be ported to python 3 if necessary.

I will try to make my own code more python3 friendly (in small steps to not break anything) so that it will be prepared for easy transition eventually but I won't switch to python 3 yet, not at this time.
944  Economy / Trading Discussion / Re: ncurses based MtGox live monitor and trading-bot-framework on: March 13, 2013, 02:29:49 PM
yes, if backporting isnt possible i will run python2.7 coexistent, that should be fine Wink

I have just googled and it seems you could break your debian stable or bring it into some totally inconsistent state when installing 2.7 on it.

If you really want to experiment with new software then I think debian stable is not the right distribution for you. Its main "advantage" is that it consists only of stuff that is so old (old abandoned branches of software versions) that won't ever change anymore (not moving == stable (== dead?)). You can use it to run old server software that has existed for 20+ years and run them for another 20+ years, software that won't break or change APIs with new updates because the only updates they will ever receive at all will be security fixes. That the Debian definition of "stable": old, petrified, fossilized. Thats what Debian *stable* is meant for.

If you have a Desktop computer and want to be flexible and experiment with cool new stuff now and not in 3 years when its old, you should choose a different distribution. The simplest solution for you would probably to upgrade to Debian testing if you intend to test new (everything that is not really old) software and then stay on their testing release schedule from then on.

Bleeding edge and Debian-Stable just does not go together. Not even "pretty well stable" or "stable" or even "rock solid stable for 2 years now" and "Debian-stable". They have a different and very extreme definition of "stable" over there at Debian.
945  Economy / Trading Discussion / Re: ncurses based MtGox live monitor and trading-bot-framework on: March 13, 2013, 01:07:29 PM
Code:
AttributeError: 'module' object has no attribute 'WeakSet'

This is unfortunate because I am not going to refrain from using these weakref classes. Maybe it would be easier to port the entire program to python-3 than to backport weakref.WeakSet() to a deprecated old python-2.6 version, but then again the problem would be that I would then probably be tempted to use features from python 3.2 (Ubuntu) and Debian users with deprecated 3.0 would complain.

I'm doing this for *fun* and not for profit! If I see that there is there is python 2.7 installed on stable Ubuntu (and even was installed on the previous Ubuntu version too and probably even on the one before that) then I am going to use it. I choose python-2.7 because it is the largest stable island and common denominator in the entire python world that is most likely to be available *everywhere*.

There *must* exist a python-2.7 installer for your distribution, 2.7 is three(!) years stable already. Maybe somewhere in the backports repository. If not then there is something seriously wrong in Debian-land, sorry.
946  Economy / Trading Discussion / Re: ncurses based MtGox live monitor and trading-bot-framework on: March 13, 2013, 09:55:15 AM
+1 for 2.6
Debian squeeze has 2.5, 2.6 and 3.0 in repo.

Debian. Isn't the whole point of willingly choosing Debian instead of practically *any* other distribution to explicitly *avoid* any software that is less than 5 years old and work only with old and proven stuff that does not move a single millimeter anymore?

Don't misunderstand me. I mean I really try my best to avoid using any bleeding edge stuff when writing software (I once criticized bitcoin-wx for using a bleeding edge wx-widgets version that was *not* in widespread use), I consider something stable and available and usable for mainstream development if it is in the standard repositories of Ubuntu LTS. I had the same kind of problems when I started TorChat 5(!) years ago with python 2.6 (stable on Ubuntu Hardy at that time and widely used everywhere), soon after the Debian users started complaining that it would not work with their ancient python version.

There were even a few Windows-98 users (imagine! win98!), I even installed win98 in wmvare to see what strange problem they had with python-2.6 on win-98 and to see if I could fix it (and fixed it!) but eventually I decided that it is just not reasonably possible to care about all these exotic corner cases (and a Debian stable user (==conservative by definition) who wants to install the latest bleeding edge software is an exotic corner case). I don't have an army of programmers and testers working for me, At some point I must make a decision and then stick to it. In my case this is the software and libs and their versions that are available in Ubuntu.
947  Economy / Trading Discussion / Re: ncurses based MtGox live monitor and trading-bot-framework on: March 13, 2013, 09:41:43 AM
is it possible to make it backward compatible to 2.6?

Not sure, I don't have python 2.6 installed to test it, I relied on the fact that the 2.x branch ended at 2.7 many years ago (I consider it as old and mature and stable) and I assumed that over the time (until now?) from all the different 2.x versions there would eventually only 2.7 be left as the only relevant 2.x version. What Linux distribution are you using? Debian?

What exactly is missing/wrong/different? If it is something trivial it might be possible, but the main problem is I can't (and don't want to) test and maintain it on 2.6 but maybe someone else can temporarily maintain a 2.6 fork until there is no 2.6 anymore (hopefully soon).
948  Economy / Speculation / Re: mtgox api lag on: March 12, 2013, 02:25:36 PM


Edit: now its 52 minutes already :-(
949  Bitcoin / Bitcoin Discussion / Re: Data source url change (ticker, depth, history) on: March 11, 2013, 10:50:39 AM
I'm not sure about user-defined order ids, as it's going to be using a lot of storage on our side

It would really be a great help. Imagine a bot that needs to place orders at certain prices if certain conditions are met but under no circumstances may place the same order twice. Ideally it would look up in its own order list whether its orders are there already (sent but not yet acked or acked and pending or open) or whether they are still missing.

Currently this is not easy: One possibility at the moment would be for my bot to generate an ID and send it in the id field of the signed call and then wait for the op:result that returns this id *and* the official mtgox oid and then update my own database to link these two ids together. But unfortunately the op:result is the only message that will ever refer to this user-generated ID, its the only link between my ID and mtgox ID, if its ever lost for some reasons (temporary disconnect between order/add and op:result during busy times, etc) I cannot reconstruct it. did the order/add goo through? is it pending? is it missing? If it suddenly appears 20 minutes later how do I know where it came from? If I query the private/orders it will not contain these user-generated IDs, I cannot know which of the existing orders belong to which of my bots or belong to manual trading.

Ideally I would want to be able implement a send_order() function in my trading client that is non-blocking and immediately returns an (internal) ID that I can rely on that will survive disconnects, restarts, all kinds of errors, etc. and my cancel_order() function and other order functions would always be able to use this internal ID to refer to the order.

Currently the only reliable way to do it is to encode such additional information in the least significant bits of the order volume: Instead of buying 1 BTC my bot would buy 1.00000042 or <whatever_amount> + <some_small_ID_number>, so each of my bots can recognize their own orders and restore this important part of their state from a simple private/orders query. But I consider this a dirty hack. Its only a workaround.

Such an ID field would not have to be large, people would not need to be able to store their entire autobiography in this field, 32 bit unsigned int would be plenty enough for this purpose.
950  Economy / Trading Discussion / Re: ncurses based MtGox live monitor and trading-bot-framework on: March 10, 2013, 08:41:57 PM
Implemented manual trading functions, now its a full featured trading client :-)



In the above screenshot you see the order cancel dialog (press F6 to open it). It is inspired by midnight commander: arrow keys to move up/down, insert to select/unselect an order, F8 to cancel all selected orders, F10 to exit the dialog (sorry, cannot use ESC without ugly hacks). F10 is the key to exit all dialogs.

F4: new buy order
F5: new sell order
F6: cancel order(s)
q quit the client

l (lowercase L) reload the strategy module (your trading bot)

other keys (a..z, except the two above) will emit the signal gox.signal_keypress, the default empty strategy class already has a slot connected to this signal, there you can trigger stuff to happen in your bot when you press certain keys.

Also added since my last posting: display total fiat on the orderbook bid side, total BTC on the orderbook ask side, ratio of these two numbers BTC/USD, everything updating in realtime (see screenshot)

Code:
$ ./goxtool.py -h
usage: goxtool.py [-h] [--add-secret] [--strategy STRATEGY]
                  [--protocol PROTOCOL] [--no-fulldepth] [--no-history]

MtGox live market data monitor and trading bot experimentation framework

optional arguments:
  -h, --help           show this help message and exit
  --add-secret         prompt for API secret, encrypt it and then exit
  --strategy STRATEGY  name of strategy module file, default=strategy.py
  --protocol PROTOCOL  force protocol (socketio or websocket), ignore setting
                       in .ini
  --no-fulldepth       do not download full depth (useful for debugging)
  --no-history         do not download full history (useful for debugging)


happy trading :-)
951  Bitcoin / Bitcoin Discussion / Re: Data source url change (ticker, depth, history) on: March 10, 2013, 09:03:00 AM
Either way getting the same data again and again will not result in new data being returned, remember this.

There are other reasons for requesting the same API more often than only 5 times per hour, for example when developing client software and testing it. Your API should just be able to take such usage without a problem, after all its mostly only reading and not writing, so it should not put any noticeable stress on your servers.

A few suggestions: If you ever decide to make an API V2 then please consider the following:

 * remove all the redundant different representations of the same number (value, display, display_short), only use value_int. There is a lot of totally redundant data in these structures, if you remove it all it would probably cut down bandwidth by 2/3 and your server would not need to waste time with string formatting.
 * gzip all data
 * allow orders to carry a user defined ID number, so I can generate my own order-id *before* submitting it to mtgox. Then when requesting "private/orders" or inside the private:user_order message each order would have two IDs, my own and the official mtgox oid. Then I could use my own ID for all my internal bookkeeping in my own database during the entire lifetime of the order and use the mtgx id only for commands that I send to mtgox.
 * please provide historical OHLCV data of various time frames, they don't all need to have the entire history, just 100 bars each would be enough already, this would remove the need for many people (including me) to request huge amounts trading history if one just quickly want to plot a graph where for example each 15 minutes or 4 hours or an entire week of trading is consolidated into only 5 numbers.

And finally: Is there a thread or a section on this forum specifically for mtgox feature requests/problems/questions/etc?

PS: the websocket server is working again, did you fix it or does it go off and on on its own every Friday? Maybe its the cleaning lady who needs a wall socket for the vacuum cleaner every Friday, maybe you should just lock the door to that room to avoid these problems?
952  Economy / Speculation / Re: Wall Observer - MtGoxUSD wall movement tracker on: March 10, 2013, 08:05:09 AM
Over $5 mil in visible orderbook.



Could you (or anyone who has the data) please make a graph that shows:

  (total_bid / total_ask) vs. time

and overlay that with a price graph?

It would be interesting to see if it can be used a an indicator for future bitcoin price. I noticed that at the moment total_bid/total_ask = 56.9 BTC/USD (and slowly rising). This number is strikingly close to the bitcoin market price (and it is of the same dimension). It would be interesting to see a graph of historical values of that number, especially how it behaves during the times immediately before a major price drop.

953  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: March 09, 2013, 05:20:21 PM
Could you please elaborate about significant overhead?

Every layer on top of another layer adds overhead. The overhead in this case (it might also be the way MtGox is using it or how they hooked it up to their other software) must be enormous, otherwise it would not lag behind the plain websocket server by at least 10 seconds during idle times (up to a few minutes at busy times), silently drop API-commands (or not ack them for 2 or more minutes, etc), while at the same time the old websocket server (when it is running) will instantly ACK (op:result) all my commands (for example give me the order-IDs for new pending orders within fractions of a second even when order-lag is high).  On the socketio stream I can sometimes wait 2 minutes for my order-ID while the order lag reading says "idle" all the time.
954  Economy / Speculation / Fair value is at 53.31$ ;-) on: March 09, 2013, 05:02:53 PM
see here: (click for larger image)


5.487 Million USD total on the bid side vs 102931 BTC on the ask side,
this is a ratio of 53.31 USD per BTC :-)
955  Bitcoin / Bitcoin Discussion / Re: Data source url change (ticker, depth, history) on: March 09, 2013, 04:01:50 PM
The websocket server does not respond anymore since yesterday. It connects instantly but then its totally silent, not even sending headers.

(Socketio-websocket still "works" but with a delay of 2+ Minutes on top of the usual order-lag, it won't even ack my calls to give me an oid for my pending orders in less than 2 minutes even when order-lag says "idle", this is almost unusable for trading)

Is websocket.mtgox.com affected by the change? Is it a known problem, Is somebody already working on the problem and will it be fixed?
956  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: March 08, 2013, 09:03:56 PM
@MagicalTux:

When will the streaming API leave the beta phase so that it can be used for financial applications?
957  Economy / Speculation / Re: Will the price stagnate or drop because of this issue? on: March 08, 2013, 07:28:32 PM
please excuse my ignorance but why does this need a fork at all? "fork" sounds like all users will be forced to make a complicated decision with uncertain consequences, inconveniences, etc and actively migrating from A to B. At least thats what it sounds like. Couldn't it simply be done like that:

Code:
# pseudo-code

def get_limit(block):
  if block.timestamp > SOME_DATE_IN_2014_FAR_AWAY_SUDDENLY_IN_THE_MIDDLE_OF_THE_NIGHT:
    return 2E6
  else:
    return 1E6


and then commit that change to the master branch of the reference implementation like every other upgrade or bug-fix or protocol extension too, document it in the official specifications and be done with it?
958  Economy / Speculation / Re: How are people getting their Trade Information with everything so slow? on: March 07, 2013, 05:48:01 PM
Yeah sure, when people panic sell at $33 after it was at $49, that definitely removes volatility.

Without many scalpers who have their orders on both sides of the book (real orders from real scalpers with the intention to be filled, not fake and bait orders from quote stuffers), orders that absorb parts of the panic-volume (and convert the loss of the n00bs into profits for themselves) it would drop even faster and much further on every temporary panic event.
959  Economy / Speculation / Re: How are people getting their Trade Information with everything so slow? on: March 07, 2013, 05:29:48 PM
Too much short-term scalping going on.
Whats wrong with scalping? It adds liquidity and removes volatility.
Removes volatility? Please pass what you are smoking.
I have smoked some basic logic: Scalping is converting volatility into profit (for the scalper). Since there is no such thing as a perpetuum mobile it must therefore *reduce* volatility until no profit can be made from it anymore.
960  Economy / Speculation / Re: in defense of technical analysis on: March 07, 2013, 02:28:50 PM
I love chart patterns. I don't use any other technical indicators, only patterns. This pattern (yesterday) has the potential to indicate a spike to 55$ (next few days, maybe even today!).
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 [48] 49 50 51 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!