BitShares Forum
Main => General Discussion => Topic started by: monsterer on October 09, 2014, 08:39:47 pm
-
Can someone check my logic here?
FREE asset, precision of 1, giving it 0 decimal places.
Market BTSX/FREE (base/quote) currently has two asks:
{"jsonrpc":2,"id":1,"method":"blockchain_market_order_book","params":["FREE","BTSX",-1]}
Result:
{
"id":1,
"result":[
[
],
[
{
"type":"ask_order",
"market_index":{
"order_price":{
"ratio":"0.1",
"quote_asset_id":27,
"base_asset_id":0
},
"owner":"BTSXMn5LG22KviDRpDJYdBMtwkUYSVFHhWrww"
},
"state":{
"balance":1000000,
"short_price_limit":null,
"last_update":"20140902T014300"
},
"collateral":null,
"expiration":null
},
{
"type":"ask_order",
"market_index":{
"order_price":{
"ratio":"0.999999999999999872",
"quote_asset_id":27,
"base_asset_id":0
},
"owner":"BTSXCvfhDQxHscBT2LZ2nHt3ko7MFc4SyNj7P"
},
"state":{
"balance":10000,
"short_price_limit":null,
"last_update":"20140914T005930"
},
"collateral":null,
"expiration":null
}
]
]
}
So thats:
10 BTSX priced at 0.1 FREE and
0.1 BTSX priced at 0.99 FREE
How can these quote prices make any sense with a precision of 0 decimal places? That would put the price at 0 for both orders?
Am I missing something obvious here?
Cheers, Paul.
-
I don't believe this is an active market. Those are just generic price quotes.
I think Xeroc is the asset owner. He had mentioned in another thread of possibly using FREE asset as a giveaway to help introduce newbies into the Bitshares Eco System.
edit* here's the link to that thread
https://bitsharestalk.org/index.php?topic=8858.0
-
I didn't even know people would PAY for them :)
anyway, the ratio is NOT the price .. you need to incorporate the ratio of precisions of both assets aswell .. BTSX is 10e5 and FREE is 10^0 .. which leads to a price of ratio*10^5/10^0 .. so 0.1 would be 10000 Larimers per FREE ...
take a look at the BTSX/USD markets and you will see that the ratios are off by a factor of ten .. because USD is 10^4 and BTSX is 10^5
-
I didn't even know people would PAY for them :)
These are sell orders, though?
anyway, the ratio is NOT the price .. you need to incorporate the ratio of precisions of both assets aswell .. BTSX is 10e5 and FREE is 10^0 .. which leads to a price of ratio*10^5/10^0 .. so 0.1 would be 10000 Larimers per FREE ...
Ok, thanks- I didn't realise there was a ratio of precisions as well.
Your calculation above puts the price in BTSX * 10000 (i.e. larimers), but the market is BTSX/FREE (base/quote), so the quote price ought to be denominated in FREE, shouldn't it?
I still feel I'm not understanding something fundamental here.
-
These are sell orders, though?
nope ... s.o. is asking for FREE at a price
anyway, the ratio is NOT the price .. you need to incorporate the ratio of precisions of both assets aswell .. BTSX is 10e5 and FREE is 10^0 .. which leads to a price of ratio*10^5/10^0 .. so 0.1 would be 10000 Larimers per FREE ...
Ok, thanks- I didn't realise there was a ratio of precisions as well.
Your calculation above puts the price in BTSX * 10000 (i.e. larimers), but the market is BTSX/FREE (base/quote), so the quote price ought to be denominated in FREE, shouldn't it?
I still feel I'm not understanding something fundamental here.
all amounts on the blockchain are in larimers .. so you take that number and DIVIDE by 10^5 to get BTSX for the BTSX asset .. for the FREE asset you devide that number by just 1
-
nope ... s.o. is asking for FREE at a price
{
"type":"ask_order",
"market_index":{
"order_price":{
"ratio":"0.1",
"quote_asset_id":27,
"base_asset_id":0
},
That looks like a sell order to me?
all amounts on the blockchain are in larimers .. so you take that number and DIVIDE by 10^5 to get BTSX for the BTSX asset .. for the FREE asset you devide that number by just 1
Ok, got you. :)
Cheers, Paul.
-
it's an ASK order ... more evidence:
my balance:
xeroc 100,000,000,000,000. FREE
which is the maximum supply:
default (unlocked) >>> blockchain_get_asset FREE
{
"id": 27,
"symbol": "FREE",
"name": "Free",
"description": "Free as in beer",
"public_data": {},
"issuer_account_id": 284,
"precision": 1,
"registration_date": "20140719T200230",
"last_update": "19700101T000000",
"current_share_supply": 100000000000000,
"maximum_share_supply": 100000000000000,
"collected_fees": 0
}
No single FREE share is looked in an open order!
-
it's an ASK order ... more evidence:
Ok, now I know I'm not understanding something fundamental here. An ask order *is* a sell order, isn't it? Ask as in asking price?
That can't be different in bitshares than it is in forex, or bitcoin exchanges in general, surely? :o
-
Ok, now I know I'm not understanding something fundamental here. An ask order *is* a sell order, isn't it? Ask as in asking price?
That can't be different in bitshares than it is in forex, or bitcoin exchanges in general, surely? :o
I like to think of BTSX as "real money" in that it's the collateral that backs everything, and BitUSD as some interesting derivative contract. So, to me, when Alice places an Ask order, she offering to sell her BitUSD for BTSX. When Bob places a Bid order, he is offering to buy BitUSD with BTSX (perhaps from Alice if the prices overlap). And when you short, you want the price of BitUSD -- as measured in BTSX -- to go down. So shorts go onto the same "side" of the market as Alice.
bytemaster prefers to think about things "backwards". He likes to think of BitUSD as "real money" (maybe because it has more stable value?) and BTSX as something that's priced in BitUSD. So -- to Bytemaster -- Alice's order is a bid order in the above example, and Bob's order is an Ask order. Shorts are a special kind of bid order, and a short seller actually makes money when the price of BTSX goes up.
I hate the backwards viewpoint because (to me) it's really confusing. But I think things are actually implemented "backwards." You can "flip" away from the "backwards" view, and in fact the GUI wallet defaults to the "flipped" view for BitUSD. But the CLI doesn't support flipping; if you use the CLI, you're stuck with the "backwards" view. I requested the developers to add flipping to the CLI, and the request was refused in no uncertain terms [1].
I have no idea how any of this applies to FREE. But I think maybe the source of your confusion is that whether a given order is considered a Bid or Ask depends on how the market is flipped. And if you use the CLI, the choice of labelling is the less intuitive one, at least for BitUSD.
[1] https://github.com/BitShares/bitshares_toolkit/issues/702