Author

Topic: Help with Bitstamp API (Read 917 times)

newbie
Activity: 13
Merit: 0
February 26, 2014, 01:57:01 AM
#7
If someone bought at a price then someone else sold at the same price.  Bitstamp matches buy and sell orders to create trades.  Thus each trade consists of a matched buy and sell order (or parts thereof).  Thus your trade doesn't tell you if it was a bid or ask because it's a matched pair.

I won't post again because you ask for help yet you won't take it when it's given...
it is different because the sequence, someone first place an order, then someone buy from the order list,it is called a bid.
sr. member
Activity: 362
Merit: 261
February 25, 2014, 05:24:00 PM
#6
If someone bought at a price then someone else sold at the same price.  Bitstamp matches buy and sell orders to create trades.  Thus each trade consists of a matched buy and sell order (or parts thereof).  Thus your trade doesn't tell you if it was a bid or ask because it's a matched pair.

I won't post again because you ask for help yet you won't take it when it's given...
newbie
Activity: 13
Merit: 0
February 25, 2014, 12:54:06 PM
#5
don't troll!!!!


if someone buy bitcoin at given price, then the trade type is bid!!! otherwise ask!


sr. member
Activity: 362
Merit: 261
February 25, 2014, 11:49:57 AM
#4
That's my point.  I'm assuming this feed gives you executed trades?  If so each trade is matching of a bid and ask at a volume and price.  So it's both, or am I misinterpreting something?
newbie
Activity: 13
Merit: 0
February 25, 2014, 11:27:19 AM
#3
just want know the trade is bid or ask.
sr. member
Activity: 362
Merit: 261
February 25, 2014, 10:32:45 AM
#2
Never used this but doesn't a trade go both ways.  It is both an ask and a bid?
newbie
Activity: 13
Merit: 0
February 25, 2014, 08:48:11 AM
#1
i found bitstamp live trade stream api in this forum post,

my code:

Code:
var pusher = new Pusher('de504dc5763aeef9ff52');

var trades_channel = pusher.subscribe('live_trades');
trades_channel.bind('trade',  function(data) {
   console.debug(data);

and it is works,
it returns trade data like this:

Code:
amount: 0.30628
id: 3764896
price: 492.23


but it didn't return trade type. how to get?
Jump to: