I'm trying to figure out what happened here.
This is the market:
default (unlocked) >>> blockchain_market_order_book USD XTS
BIDS (* Short Order) | ASKS
TOTAL QUANTITY PRICE | PRICE QUANTITY TOTAL COLLATERAL
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
103.6513 USD MARKET PRICE | 0.011111110000 USD 1,000.00000 XTS 11.1111 USD
99.9999 USD 9,000.00900 XTS 0.011111100000 USD*| 0.011111111111 USD 100.00000 XTS 1.1111 USD
219.4796 USD 24,142.76556 XTS 0.009090909091 USD*| 0.011111111200 USD 1,000.00000 XTS 11.1111 USD
100.0000 USD 12,000.00000 XTS 0.008333333333 USD | 0.011200000000 USD 1,000.00000 XTS 11.1999 USD
19.9999 USD 2,469.13580 XTS 0.008100000000 USD*| 0.014000000000 USD 10,000,000.00000 XTS 140,000.0000 USD
99,889.0002 USD 14,269,857.17144 XTS 0.007000000000 USD*| 0.014000000000 USD 10,000.00000 XTS 140.0000 USD
19.9999 USD 3,921.56862 XTS 0.005100000000 USD*| 1.111111111111 USD 0.90000 XTS 1.0000 USD
1.0000 USD 1,000.00000 XTS 0.001000000000 USD |
19.9999 USD 39,215.68627 XTS 0.000510000000 USD*|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| MARGIN
| CALL PRICE QUANTITY TOTAL COLLATERAL
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0.008333333333 USD 135.00000 XTS 0.9999 USD 180.00000 XTS
| 0.008250000000 USD 13.63635 XTS 0.0999 USD 18.18180 XTS
| 0.008250000000 USD 136,363.63635 XTS 999.9998 USD 181,818.18180 XTS
| 0.008250000000 USD 13.63635 XTS 0.0999 USD 18.18180 XTS
| 0.008241758242 USD 2,729.99998 XTS 19.9999 USD 3,639.99998 XTS
| 0.008241758242 USD 1,364.99998 XTS 9.9999 USD 1,819.99998 XTS
| 0.007500000000 USD 30,000.00000 XTS 200.0000 USD 40,000.00000 XTS
| 0.006862500000 USD 32.78688 XTS 0.1999 USD 43.71584 XTS
| 0.006825000000 USD 7,582.41757 XTS 45.9999 USD 10,109.89010 XTS
| 0.006818181818 USD 128,785.85166 XTS 780.5201 USD 171,714.46888 XTS
| 0.006750000000 USD 16,666.66665 XTS 99.9999 USD 22,222.22221 XTS
| 0.005250000000 USD 23,785.67140 XTS 110.9998 USD 31,714.22854 XTS
Median Feed Price: 0.008109332 USD / XTS Maximum Short Price: 0.01081244266666666 USD / XTS Minimum Cover Price: 0.00540622133333333 USD / XTS
Bid Depth: 14,348,606.33669 XTS Ask Depth: 10,464,665.75455 XTS Min Depth: 2,000,000.00000 XTS
This is what is in the account:
default (unlocked) >>> wallet_account_balance
ACCOUNT BALANCE
============================================================
maqifrnswa 480.0000 USD
6,705.62173 XTS
I make this order:
default (unlocked) >>> wallet_market_submit_bid maqifrnswa 480 XTS 1 USD
{
"expiration": "20140814T143920",
"delegate_slate_id": null,
"operations": [{
"type": "withdraw_op_type",
"data": {
"balance_id": "XTSHzdmQMZfxAUqEBsSNKmaU8NwYFbTX5Qce",
"amount": 4800000,
"claim_input_data": ""
}
},{
"type": "withdraw_op_type",
"data": {
"balance_id": "XTSAwtaSJ44fTUkm8kHjqFu3jbPzNzZKP9Ey",
"amount": 10000,
"claim_input_data": ""
}
},{
"type": "bid_op_type",
"data": {
"amount": 4800000,
"bid_index": {
"order_price": {
"ratio": "0.100000000000000005",
"quote_asset_id": 22,
"base_asset_id": 0
},
"owner": "XTSJUzKXsQrVqPeL21C3uMSaT6AGqSefNGnK"
}
}
}
],
"signatures": [
"1f8226eda47c43167b07f5a521f5baa178b588212bcdb9021b6c8f3f159fe39ec5e4bbf6a5e090bf1ef82281c456a9da1d16de9063360149b5003deb7c7178a501",
"20d4d88a7afe9ca1cffb191873a001884d39b30884545aebd07286d29e782f96da2815b77fc387f76b3ab0e638d53010d3e435d746750429df8ad2c2ed2224d409",
"1f37854f51cf473781e090f907d4adf0b1db5e15a927050098bcd6cea89a05aa9314a2c21ac66a0f4c07e7311d80536a64b689e917de539b007e32a507ba2eb616"
]
}
I expect to buy:
11.1111 USD at 0.01111111 USD/XTS = 1000 XTS
1.1111 USD at 0.011111111111 USD/XTS = 100 XTS
11.1111 USD @ 0.011111111200 = 1000 XTS
11.1999 USD @0.011200000000 = 1000 XTS
445.4668 USD @0.014000000000 = 31819.05 XTS
total should have been bought: 34919.05 XTS
Here's the account and market after the purchase:
default (unlocked) >>> wallet_account_balance
ACCOUNT BALANCE
============================================================
maqifrnswa 7,185.52172 XTS
default (unlocked) >>> blockchain_market_order_book USD XTS
BIDS (* Short Order) | ASKS
TOTAL QUANTITY PRICE | PRICE QUANTITY TOTAL COLLATERAL
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
99.9999 USD 9,000.00900 XTS 0.011111100000 USD*| 0.014000000000 USD 9,960,777.27858 XTS 139,450.8819 USD
219.4796 USD 24,142.76556 XTS 0.009090909091 USD*| 0.014000000000 USD 10,000.00000 XTS 140.0000 USD
100.0000 USD 12,000.00000 XTS 0.008333333333 USD | 1.111111111111 USD 0.90000 XTS 1.0000 USD
19.9999 USD 2,469.13580 XTS 0.008100000000 USD*|
99,889.0002 USD 14,269,857.17144 XTS 0.007000000000 USD*|
19.9999 USD 3,921.56862 XTS 0.005100000000 USD*|
1.0000 USD 1,000.00000 XTS 0.001000000000 USD |
19.9999 USD 39,215.68627 XTS 0.000510000000 USD*|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| MARGIN
| CALL PRICE QUANTITY TOTAL COLLATERAL
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| 0.008333333333 USD 135.00000 XTS 0.9999 USD 180.00000 XTS
| 0.008250000000 USD 13.63635 XTS 0.0999 USD 18.18180 XTS
| 0.008250000000 USD 136,363.63635 XTS 999.9998 USD 181,818.18180 XTS
| 0.008250000000 USD 13.63635 XTS 0.0999 USD 18.18180 XTS
| 0.008241758242 USD 2,729.99998 XTS 19.9999 USD 3,639.99998 XTS
| 0.008241758242 USD 1,364.99998 XTS 9.9999 USD 1,819.99998 XTS
| 0.007500000000 USD 30,000.00000 XTS 200.0000 USD 40,000.00000 XTS
| 0.006862500000 USD 32.78688 XTS 0.1999 USD 43.71584 XTS
| 0.006825000000 USD 7,582.41757 XTS 45.9999 USD 10,109.89010 XTS
| 0.006818181818 USD 128,785.85166 XTS 780.5201 USD 171,714.46888 XTS
| 0.006750000000 USD 16,666.66665 XTS 99.9999 USD 22,222.22221 XTS
| 0.005250000000 USD 23,785.67140 XTS 110.9998 USD 31,714.22854 XTS
Median Feed Price: 0.008109332 USD / XTS Maximum Short Price: 0.01081244266666666 USD / XTS Minimum Cover Price: 0.00540622133333333 USD / XTS
Bid Depth: 14,348,606.33669 XTS Ask Depth: 10,422,343.04211 XTS Min Depth: 2,000,000.00000 XTS
So it looks like the market executed ok, but 27,733.52828 XTS seems to be missing from the account.
EDIT: here's the transaction history
[default (unlocked) >>> wallet_account_transaction_history
RECEIVED BLOCK FROM TO AMOUNT MEMO FEE ID
========================================================================================================================================================================
|2014-08-13T01:00:00 0 GENESIS maqifrnswa 60,525.43383 XTS claim Ppf3WEcqakR7CarJWYQ41D5H7UWZKTz5vd 0.00000 XTS [5afce1]|
| GENESIS maqifrnswa 247.73200 XTS claim Pn5cHQPYxzJAso16hpvCCSjj7HEnuccJbs |
| GENESIS maqifrnswa 5,958.39818 XTS claim 1DXCqXn8M7VJ7c1K5H5qhMSkZKkpSesQ8o |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2014-08-14T03:41:44 2307 maqifrnswa maqifrnswa 0.00000 XTS register maqifrnswa as a delegate 25.84228 XTS 34901ef8
2014-08-14T03:45:10 2328 maqifrnswa ASK-DdPHJoDQ 60,000.00000 XTS sell XTS @ 0.008 USD / XTS 0.10000 XTS df867f39
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|2014-08-14T03:45:30 2329 ASK-DdPHJoDQ MARKET 60,000.00000 XTS fill ask @ 0.008 USD / XTS 0.00000 XTS [185799]|
| ASK-DdPHJoDQ maqifrnswa 480.0000 USD ask proceeds @ 0.008 USD / XTS |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2014-08-14T12:39:20 5533 maqifrnswa BID-JUzKXsQr 480.0000 USD buy XTS @ 1.00000000000000005 USD / XTS 0.10000 XTS d48358a5
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|2014-08-14T12:39:40 5534 BID-JUzKXsQr MARKET 480.0000 USD pay bid @ 1.00000000000000005 USD / XTS 0.00000 XTS [f3100d]|
| BID-JUzKXsQr maqifrnswa 479.99999 XTS bid proceeds @ 1.00000000000000005 USD /... |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/code]