Bitcoin Forum
May 26, 2024, 04:29:00 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1] 2 »
1  Local / Трейдеры / Re: Qt Bitcoin Trader [Клиент для безопасных торгов на Mac/Windows/Linux] on: August 08, 2015, 08:23:33 PM
беда с пробелами

не терпит пробелы в событиях
Code:
trader.on(_"AskPrice" ).changed()

не правильно фурычит с пробелами в функциях
Code:
trader.get(_"Balance", "USD" ) // выдает 0 
Code:
trader.get("Balance","USD") // выдает НЕ 0, правильно 
2  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: February 15, 2012, 10:39:41 AM
and right now I dont recv any useful datas  Huh

UPD:
it's working right now (13:44 UTC)

UPD2:
it's working if wait connected sometimes 20 minutes and sometimes 0 minutes and sometimes "never". very strange and no good.
can someone's debug session stops sending messages to other users?.. who knows implementation of socket.io server?

To MtGox:
maybe it's sabotage.. Slow Read DoS attack.. bad guys overflow send pool with slow connections and.. voila!
will be better for all clients drop connections that cannot read string, i.e. send to client not finished for.. hmm.. 0.5sec! +ban by IP 10min (epoll, select or other asynchronous mechanism). I took digits from air, I dont know % loading for servers machines and number of connections.
p.s. ping ("2::") works always
3  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: February 15, 2012, 10:08:59 AM
right now datas arrived (my format after string -> json -> object -> string):
JSON: Packet={ Depth={ price=4,67000 USD,       vol=0,05300000,         dir=bid,        when=2012:02:15_10:03:56.735844 } }
JSON: Packet={ Ticker={ bid=$4.68100,   ask=$4.70075,   lo=$4.21211,    hi=$4.97000,    last=$4.70075,  vol=256,165.42727403??BTC } }

I dont know Python, but:
- on connected (or after recv "1::" - that's mean u connected now) u must send strings like:
4:::{"op":"mtgox.subscribe","type":"trades"}
- on "2::" u must response "2::" (not "1::" as in ur sample)
4  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: February 14, 2012, 05:57:55 PM
So I got the handshake coded, getting me my connection-ID. I then can connect to the websocket just fine.
However, I dont receive any data, only two messages: '1::' and '2::'. Both come once in the first few seconds of being connected, then total silence. I am not being disconnected neither, I think.
Do I have to join a channel? Or am I connected to the default channels just like before?
I dont have "sending messages" finished yet to test..
Any hints?
in the past (3+ weeks ago):
by default u dont subscribed to channels
u may send simple strings over internal (socket.io's) websocket
for "2::" u must send "2::" (or send "2::" every 15secs)
for subscribe u must send post #162
datas stopped in socket after 3-15min.. u can open & sync 2 socket.io..
for now:
post #162 looks no more working - no datas except "1::" & "2::"
Huh
5  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: January 26, 2012, 03:11:16 PM
I get my ID nicely from https://socketio.mtgox.com/socket.io/1/ but then after I connect my websocket lib to ws://socketio.mtgox.com:80/socket.io/1/websocket/XXXXX - it just sends me "7:::1+0" and disconnects immediately after that.
If u got ID from https:// than u must connect to wss:// with this ID (SSL/TLS - secure connection)
and if http:// than ws://
6  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: January 13, 2012, 09:37:48 PM
The "data" field seems to be the message I intended to submit, but the subscribe fails with "Unknown command".  Any help would be appreciated.
my subscribtions (raw socket.io messages over websocket - no explicit frames borders) are:
   "4:::{"op":"mtgox.subscribe","type":"trades"}"
   "4:::{"op":"mtgox.subscribe","type":"ticker"}"
   "4:::{"op":"mtgox.subscribe","type":"depth"}"
7  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: January 11, 2012, 09:53:33 AM
I see data
Quote
{"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","op":"private","origin":"broadcast","private":"depth","depth":{"price":"5.80025","type":2,"type_str":"bid","volume":"0","price_int":"580025","volume_int":"0","item":"BTC","currency":"USD","now":"1326266472912980","total_volume_int":"19811387"}}    
why exists messages with volume=0 ?
is this rounding errors in MtGox's guts or users posts such orders to exchange ?

+++ existence of "total_volume_int" - is wonderful
8  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: January 09, 2012, 07:56:18 PM
request to "https://socketio.mtgox.com/socket.io/1" doesnt respond (net::ERR_CONNECTION_REFUSED)
Is URL valid?
something happened.. but WHAT happened?..

UPD1:
P.S.
I wrote to Mt.Gox support issue: open some technical twitter channel with info: what? when? how long?
IRC-channel is just flame - no info, no logs, no history, no search..

UPD2 (2:28 AM):
its working now
9  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: December 11, 2011, 05:33:59 PM
I created project for .NET socket.io + WebSockets at codeplex.com
http://socketiowebsockets.codeplex.com/
for now it can hold ssl-connection with mtgox (no parsing json and etc)

my old ideas (in this topic) died and raised again Smiley
10  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: August 30, 2011, 09:06:20 PM
It happens very often that there are consecutive "depth" messages, where one comes immediately after another and they both have the same amount/price and the opposite sign. So effectively they do nothing, except causing confusion and an unnecessary traffic.

For instance:
Quote
{"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","depth":{"currency":"USD","item":"BTC","price":"8.86852","price_int":"886852","type":2,"type_str":"bid","volume":"-0.79287883","volume_int":"-79287883"},"op":"private","origin":"broadcast","private":"depth"}
{"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","depth":{"currency":"USD","item":"BTC","price":"8.86852","price_int":"886852","type":2,"type_str":"bid","volume":"0.79287883","volume_int":"79287883"},"op":"private","origin":"broadcast","private":"depth"}

It seems like some glitch and it would be nice if could be fixed one day.

imho, all changes must be. human's or robot's..
11  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: July 03, 2011, 05:13:31 PM
and where is depth channel? no datas for it. will it appear in the future?
Looks like this is "the new" depth-channel...
my English is not so good. where is "this "the new" depth-channel" ?
EDIT: on #mtgox they say me that "should come soon"


and I try to get key for personal channel via https://mtgox.com/code/getKey.php (as say in post 0). it returns
Quote
{"error":"Bad token"}
Huh
EDIT: maybe same (come soon)
12  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: July 03, 2011, 04:33:39 PM
good! websocket works for now!

some questions:

Quote
{"channel":"d5f06780-30a8-4a48-a2f8-7ed181b4a13f","op":"private", "origin":"broadcast","private":"ticker", "ticker":{"avg":15.469053268,"buy":15.63,"high":15.689,"last":15.63001,"low":15.311,"sell":15.63001,"vol":15679}}
"avg" is average volume by trade?

Quote
{"channel":"dbf1dee9-4f2e-4a08-8cb7-748919a71b21","op":"private","origin":"broadcast","private":"trade", "trade":{"amount":2,"amount_int":"200000000","date":1309710218,"item":"BTC","price":15.632,"price_currency":"USD","price_int":"1563200","tid":"1309710218345711","trade_type":"ask","type":"trade"}}
what mean "trade_type":"ask"? trade raised by ask order?

and where is depth channel? no datas for it. will it appear in the future?
13  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: June 19, 2011, 06:46:31 PM
at now
for determine connection lost (iPhone hasn't keepalive ops for socket) I do next:
if App dont recv any datas on channels over 6seconds it send:
Quote
"{"op":"ping"}"
if connection is ok than server responds to App:
Quote
{"message":"Unknown command","op":"remark","success":false}
if no any responds in next 6seconds (include other datas on channels) App decides that current connection lost and try to create new connection (with close old)

NB: "ping" dont send every 6seconds! only if at last 6seconds no datas (including "Unknown command")
otherwise App works but nothing shows over hour on broken connection (turnoff WAN at router). I dont known default values in iPhone keep-alive logic.

and my suggestion:
maybe add "good" response:
Quote
{"op":"pong"}
it dont requires any logic or DB-access. simple response for current connection
although its works well now
14  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: June 16, 2011, 06:43:52 PM
today I saw MtGox Live for Android

and here is screen of my iPhone app (not in AppStore yet) - depth state


in first version will be depth state & trades only, no wallet & orders
15  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: June 13, 2011, 07:24:25 AM
found site with fast check websockets (and wss too)
http://websocket.org/echo.html
browser must support websockets (or enabled it)

for now MtGox-WebSockets requires Sec-WebSocket-Key1 and Sec-WebSocket-Key2 and 8bytes-data

at now (UTC 19:27 13-jun) WS dont responds with 16bytes of hash

and at now (UTC 20:37 13-jun) no connection

at now (UTC 20:35 14-jun) System.Net.Sockets.SocketException: Connection refused
16  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: June 12, 2011, 05:27:35 PM
it will be good create IRC-channel
  • for talks
  • for "websockets OFF for hour"
  • for bans in websockets (if exists)

at now
opened socket, sent handshake, received nothing - conn reset by peer
and I dont know what happened and how long it will last
17  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: June 08, 2011, 05:03:45 PM
There's a new MTGox websocket API. This API works by subscription to channels, and each channel is represented by an UUID.

Which min volume of order required for trading (min step size)?
I saw volume=0.007 in depth channel, but ticker channel ignores that values (so values lessOrEqual 0.007 I ignore)
18  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: June 08, 2011, 03:15:33 PM
hint (from my bugs)
see MSDN Math.Round( decimal d, int decimals ), which I use
MtGox rounds numbers NOT SAME:
If the value of the first digit in d to the right of the decimals decimal position is 5, the digit in the decimals position is rounded up if it is odd, or left unchanged if it is even. If the precision of d is less than decimals, d is returned unchanged. The behavior of this method follows IEEE Standard 754, section 4. This kind of rounding is sometimes called rounding to nearest, or banker's rounding. It minimizes rounding errors that result from consistently rounding a midpoint value in a single direction.

some datas:
{"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","depth":{"price":30.22425,"type":1,"volume":1},"op":"private","origin":"broadcast","private":"depth"}
{"channel":"d5f06780-30a8-4a48-a2f8-7ed181b4a13f","op":"private","origin":"broadcast","private":"ticker","ticker":{"buy":30,"high":31.89,"last":30,"low":18.6,"sell":30.2243,"vol":98781}}
19  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: May 23, 2011, 05:02:07 PM
I prefer my suggestion of a request packet which the client can send at any time to request the complete depth state, and then relative +volume -volume stream continues from there.
good variant (1)
but people dont want to calculate depth state. they often will request the one. more traffic, slow server, bad trading.

variant (1.5)
every depth message contains all state. without unnessary attrs - one number is price, next in pair is volume with right sort order: "depth":{"asks":[X.XXXX, V.VVV,...],"bids":[...]}

another variant (2):
- new channel for depth-20(or some N) values asks & bids every one minute (only for checking purpose or as starting point)
- clear description of algorithm how calculate depth state over trade & depth channels

one more variant (2.5):
- depth values is absolute forever
- new attr "pos" with values { +N, N, -N } where
     +N - new row inserted at N pos, rows [N..end] shifted down
       N - updates values ar row N
      -N - row N deleted. other rows shifted to close gap (to up)
- "trade" values ​​must match the changes in "depth" values (a priori)
- but still need starting point - current depth state - use variant (2) or something
pros: simple calcs, asks & bids always sorted by server(that must be), traffic +1attr, CPU calcs almost same(as now)

"make your choice!" Smiley

We need as many digits as people can specify, which as far as I know is an unlimited amount.
now: values with volume less 0.001 remains in my depth state after process depth & trades from corresponding channels. but next ticker does not account for their. so, I delete them from calculated depth state.
20  Economy / Marketplace / Re: [BETA] MTGox websocket API, testers wanted on: May 22, 2011, 09:27:32 PM
volumes and prices sometimes received as :X.YYYYYYYYYYY
who needed so many digits after dot?
for price enough.. 2 digits for cents.. and.. ok, let be 4digits after dot
for volume.. hmm.. similar numbers less than 0.001 are considered as zero.. = so 3 digits after dot for volumes
Pages: [1] 2 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!