Bitcoin Forum

Other => Beginners & Help => Topic started by: cnd on April 29, 2013, 02:27:42 PM



Title: Mt.Gox - what's difference between "bid" / "ask" and "market" / "limit"?
Post by: cnd on April 29, 2013, 02:27:42 PM
So... I do the following:

# perl -e 'print time'
1367244848

# curl 'http://data.mtgox.com/api/2/BTCUSD/money/trades/fetch?Currency=USD&since=1367244848000000'

{"result":"success","data": [
{"date":1367244849,
 "price":"143.25661",
 "amount":"2.28045686",
 "price_int":"14325661",
 "amount_int":"228045686",
 "tid":"1367244849353590",
 "price_currency":"USD",
 "item":"BTC",
 "trade_type":"bid",
 "primary":"Y",
 "properties":"market"},
{"date":1367244849,
 "price":"143.25661",
 "amount":"1.6445",
 "price_int":"14325661",
 "amount_int":"164450000",
 "tid":"1367244849654839",
 "price_currency":"USD",
 "item":"BTC",
 "trade_type":"bid",
 "primary":"Y",
 "properties":"limit"},
{"date":1367244857,
 "price":"142.63001",
 "amount":"0.03795578",
 "price_int":"14263001",
 "amount_int":"3795578",
 "tid":"1367244857007284",
 "price_currency":"USD",
 "item":"BTC",
 "trade_type":"ask",
 "primary":"Y",
 "properties":"limit"},
{"date":1367244857,
 "price":"142.63",
 "amount":"2.17982948",
 "price_int":"14263000",
 "amount_int":"217982948",
 "tid":"1367244857061458",
 "price_currency":"USD",
 "item":"BTC",
 "trade_type":"ask",
 "primary":"Y",
 "properties":"limit"},
{"date":1367244857,
 "price":"143.25599",
 "amount":"0.8028",
 "price_int":"14325599",
 "amount_int":"80280000",
 "tid":"1367244857426715",
 "price_currency":"USD",
 "item":"BTC",
 "trade_type":"bid",
 "primary":"Y",
 "properties":"market"},
{"date":1367244859,
 "price":"142.63",
 "amount":"0.63613875",
 "price_int":"14263000",
 "amount_int":"63613875",
 "tid":"1367244859424413",
 "price_currency":"USD",
 "item":"BTC",
 "trade_type":"ask",
 "primary":"Y",
 "properties":"market"},
{"date":1367244859,
 "price":"142.62",
 "amount":"1.42786125",
 "price_int":"14262000",
 "amount_int":"142786125",
 "tid":"1367244859497547",
 "price_currency":"USD",
 "item":"BTC",
 "trade_type":"ask",
 "primary":"Y",
 "properties":"market"},
{"date":1367244860,
 "price":"142.62",
 "amount":"2.2706509",
 "price_int":"14262000",
 "amount_int":"227065090",
 "tid":"1367244860239912",
 "price_currency":"USD",
 "item":"BTC",
 "trade_type":"ask",
 "primary":"Y",
 "properties":"market"},
{"date":1367244860,
 "price":"143.25599",
 "amount":"0.6",
 "price_int":"14325599",
 "amount_int":"60000000",
 "tid":"1367244860839385",
 "price_currency":"USD",
 "item":"BTC",
 "trade_type":"bid",
 "primary":"Y",
 "properties":"limit"},
{"date":1367244861,
 "price":"143.25599",
 "amount":"0.41954114",
 "price_int":"14325599",
 "amount_int":"41954114",
 "tid":"1367244861158710",
 "price_currency":"USD",
 "item":"BTC",
 "trade_type":"bid",
 "primary":"Y",
 "properties":"limit"},
{"date":1367244861,
 "price":"143.256",
 "amount":"1",
 "price_int":"14325600",
 "amount_int":"100000000",
 "tid":"1367244861198775",
 "price_currency":"USD",
 "item":"BTC",
 "trade_type":"bid",
 "primary":"Y",
 "properties":"limit"},
{"date":1367244865,
 "price":"143.25662",
 "amount":"1.79058811",
 "price_int":"14325662",
 "amount_int":"179058811",
 "tid":"1367244865385919",
 "price_currency":"USD",
 "item":"BTC",
 "trade_type":"ask",
 "primary":"Y",
 "properties":"limit"},
{"date":1367244865,
 "price":"143.25661",
 "amount":"8.20941189",
 "price_int":"14325661",
 "amount_int":"820941189",
 "tid":"1367244865433889",
 "price_currency":"USD",
 "item":"BTC",
 "trade_type":"ask",
 "primary":"Y",
 "properties":"limit"},
{"date":1367244866,
 "price":"143.25661",
 "amount":"0.2782",
 "price_int":"14325661",
 "amount_int":"27820000",
 "tid":"1367244866968567",
 "price_currency":"USD",
 "item":"BTC",
 "trade_type":"ask",
 "primary":"Y",
 "properties":"limit"}]
}

Can someone tell me the *meaning* of those 4 combinations bid+limit, bid+market, ask+limit, ask+market?

Also - are these things the actual trades that have taken place, or are some of them "orders".  If they're not orders - does anyone know where to get a list of orders from?

Also - does anyone know how Mt.Gox handles "partial" stuff?  e.g. if I want 1 BTC, and the best price has someone is selling 2, does that other guy just sell me half of what he's got for sale?  What about the opposite - what if I want 2, and a pair of different people are each selling 1 - I assume I get both of theirs?  How does the above data reflect these things - as a pair of orders perhaps?

Thanks!!!


Title: Re: Mt.Gox - what's difference between "bid" / "ask" and "market" / "limit"?
Post by: cnd on April 29, 2013, 02:55:01 PM
And, while I'm still struggling to grasp this stuff - I'm also trying to understand the "direction" of whatever the actual meanings are.

Or in other words - in my brain, I see a "trade" as being something that TWO people engage in (a seller, and a buyer), which probably accounts for my inability to understand why trades have only one designation applied to them (e.g. why are all these trades recorded from the point of view of only one side of the transaction?  Is there a second matching transaction for everything (and if so - how do I find it?, or if not, why not?  and how do they pick *which* one (buyer/seller) to use?)


Title: Re: Mt.Gox - what's difference between "bid" / "ask" and "market" / "limit"?
Post by: GorkaMorka on April 29, 2013, 02:57:37 PM
Bid is the most someone is willing to pay for something

Ask is the least that someone is asking for when they are selling something.

Market is just a sale at whatever the highest bid or lowest ask is

Limit is when you specify the most you are going to pay or the least you are going to sell for.


Title: Re: Mt.Gox - what's difference between "bid" / "ask" and "market" / "limit"?
Post by: BitcoinWisdom on April 29, 2013, 03:59:27 PM
bid: buy BTC, ask: sell BTC.
market: buy/sell all of specified number of BTC no care about the price
limit: buy/sell the BTC until reach the specified price, the remain BTC will put on bid/ask list with that price.


Title: Re: Mt.Gox - what's difference between "bid" / "ask" and "market" / "limit"?
Post by: cnd on April 30, 2013, 09:51:25 AM
Hi Guys,

Thanks for those answers - I did sortof guess most of that, but the thing I still don't understand, is how those answers apply to the actual data I'm seeing.

What do you guys reckon is the answer?

When we see "ask" - that's obviously going to have been matched up with some previous "bid" - so do you think they're reporting *only* the actual transaction that *caused* the trade, and not the original transaction that *facilitated* it?