# Orders which did not match off 100%

**URL:** <https://forums.counterparty.io/t/orders-which-did-not-match-off-100/172>\
**Category:** Counterparty\
**Created:** [March 10, 2014, 6:31am UTC](https://forums.counterparty.io/t/orders-which-did-not-match-off-100/172 "2014-03-10T06:31:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Global\_trade\_repo](https://avatars.discourse-cdn.com/v4/letter/g/8baadc/32.png) [@Global\_trade\_repo](https://forums.counterparty.io/u/Global_trade_repo)\
**Post date:** [March 10, 2014, 6:31am UTC](https://forums.counterparty.io/t/orders-which-did-not-match-off-100/172/1 "2014-03-10T06:31:01Z")

</div>

I was having a look at an order match. I’m not sure why it wasn’t 100% filled. Is this a rounding error that will be fixed?  
  
`Give 0.085 XBTC get 10 XCP<br />sqlite> select * from orders where tx_index=5265;<br />5265|667f1bfb97499e9450c81d9bf0c8914442938a634e6d22b74ee0f5a0dd2dd86c|289101|1G38xjStnniS5Pjh2jryQeCMisu1EwnjYe|XBTC|8500000|1|XCP|1000000000|118|1440|290541|0|0|10000|10000|valid<br /><br />Give 10 XCP get 0.085 XBTC<br />sqlite> select * from orders where tx_index=5281;<br />5281|5317f9078208edc792db754bc3085c52364d8a5a5eb4fd3df05cfbe0ada4d2ba|289287|1xXCPxBC7kRkkYnTeS4ARk3YYwLF5Y5QT|XCP|1000000000|118|XBTC|8500000|1|240|289527|0|0|10000|10000|valid<br /><br />Order match<br />sqlite> select * from order_matches where tx1_index=5281;<br />667f1bfb97499e9450c81d9bf0c8914442938a634e6d22b74ee0f5a0dd2dd86c5317f9078208edc792db754bc3085c52364d8a5a5eb4fd3df05cfbe0ada4d2ba|5265|667f1bfb97499e9450c81d9bf0c8914442938a634e6d22b74ee0f5a0dd2dd86c|1G38xjStnniS5Pjh2jryQeCMisu1EwnjYe|5281|5317f9078208edc792db754bc3085c52364d8a5a5eb4fd3df05cfbe0ada4d2ba|1xXCPxBC7kRkkYnTeS4ARk3YYwLF5Y5QT|XBTC|8499999|XCP|999999882|289101|289287|1440|240|289297|completed`

---

<div class="post-metadata">

**Author:** ![cityglut](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@cityglut](https://forums.counterparty.io/u/cityglut)\
**Post date:** [March 10, 2014, 12:47pm UTC](https://forums.counterparty.io/t/orders-which-did-not-match-off-100/172/2 "2014-03-10T12:47:52Z")

</div>

[quote author=Global\_trade\_repo link=topic=171.msg1171#msg1171 date=1394447461]  
I was having a look at an order match. I’m not sure why it wasn’t 100% filled. Is this a rounding error that will be fixed?  
  
`Give 0.085 XBTC get 10 XCP<br />sqlite> select * from orders where tx_index=5265;<br />5265|667f1bfb97499e9450c81d9bf0c8914442938a634e6d22b74ee0f5a0dd2dd86c|289101|1G38xjStnniS5Pjh2jryQeCMisu1EwnjYe|XBTC|8500000|1|XCP|1000000000|118|1440|290541|0|0|10000|10000|valid<br /><br />Give 10 XCP get 0.085 XBTC<br />sqlite> select * from orders where tx_index=5281;<br />5281|5317f9078208edc792db754bc3085c52364d8a5a5eb4fd3df05cfbe0ada4d2ba|289287|1xXCPxBC7kRkkYnTeS4ARk3YYwLF5Y5QT|XCP|1000000000|118|XBTC|8500000|1|240|289527|0|0|10000|10000|valid<br /><br />Order match<br />sqlite> select * from order_matches where tx1_index=5281;<br />667f1bfb97499e9450c81d9bf0c8914442938a634e6d22b74ee0f5a0dd2dd86c5317f9078208edc792db754bc3085c52364d8a5a5eb4fd3df05cfbe0ada4d2ba|5265|667f1bfb97499e9450c81d9bf0c8914442938a634e6d22b74ee0f5a0dd2dd86c|1G38xjStnniS5Pjh2jryQeCMisu1EwnjYe|5281|5317f9078208edc792db754bc3085c52364d8a5a5eb4fd3df05cfbe0ada4d2ba|1xXCPxBC7kRkkYnTeS4ARk3YYwLF5Y5QT|XBTC|8499999|XCP|999999882|289101|289287|1440|240|289297|completed`  
[/quote]  
  
They would be perfectly matched only if they had exactly the same [tt]fee\_required[/tt]/[tt]fee\_provided[/tt]. Did they?

---

<div class="post-metadata">

**Author:** ![Global\_trade\_repo](https://avatars.discourse-cdn.com/v4/letter/g/8baadc/32.png) [@Global\_trade\_repo](https://forums.counterparty.io/u/Global_trade_repo)\
**Post date:** [March 10, 2014, 6:24pm UTC](https://forums.counterparty.io/t/orders-which-did-not-match-off-100/172/3 "2014-03-10T18:24:03Z")

</div>

> [@](#):
>
> [quote author=Global\_trade\_repo link=topic=171.msg1171#msg1171 date=1394447461]  
> I was having a look at an order match. I’m not sure why it wasn’t 100% filled. Is this a rounding error that will be fixed?  
>   
> `Give 0.085 XBTC get 10 XCP<br />sqlite> select * from orders where tx_index=5265;<br />5265|667f1bfb97499e9450c81d9bf0c8914442938a634e6d22b74ee0f5a0dd2dd86c|289101|1G38xjStnniS5Pjh2jryQeCMisu1EwnjYe|XBTC|8500000|1|XCP|1000000000|118|1440|290541|0|0|10000|10000|valid<br /><br />Give 10 XCP get 0.085 XBTC<br />sqlite> select * from orders where tx_index=5281;<br />5281|5317f9078208edc792db754bc3085c52364d8a5a5eb4fd3df05cfbe0ada4d2ba|289287|1xXCPxBC7kRkkYnTeS4ARk3YYwLF5Y5QT|XCP|1000000000|118|XBTC|8500000|1|240|289527|0|0|10000|10000|valid<br /><br />Order match<br />sqlite> select * from order_matches where tx1_index=5281;<br />667f1bfb97499e9450c81d9bf0c8914442938a634e6d22b74ee0f5a0dd2dd86c5317f9078208edc792db754bc3085c52364d8a5a5eb4fd3df05cfbe0ada4d2ba|5265|667f1bfb97499e9450c81d9bf0c8914442938a634e6d22b74ee0f5a0dd2dd86c|1G38xjStnniS5Pjh2jryQeCMisu1EwnjYe|5281|5317f9078208edc792db754bc3085c52364d8a5a5eb4fd3df05cfbe0ada4d2ba|1xXCPxBC7kRkkYnTeS4ARk3YYwLF5Y5QT|XBTC|8499999|XCP|999999882|289101|289287|1440|240|289297|completed`  
> [/quote]  
>   
> They would be perfectly matched only if they had exactly the same [tt]fee\_required[/tt]/[tt]fee\_provided[/tt]. Did they?

---

<div class="post-metadata">

**Author:** ![PhantomPhreak](https://avatars.discourse-cdn.com/v4/letter/p/ccd318/32.png) [@PhantomPhreak](https://forums.counterparty.io/u/PhantomPhreak)\
**Post date:** [March 21, 2014, 1:01pm UTC](https://forums.counterparty.io/t/orders-which-did-not-match-off-100/172/4 "2014-03-21T13:01:22Z")

</div>

I just fixed this issue with a new commit to [tt]develop[/tt], in which the change to the rounding rules is only active on [tt]testnet[/tt] for now. The solution is a bit hackish, is all.  
  
See [https://github.com/PhantomPhreak/counterpartyd/commit/d7bd4d1344285fe79667752f5c2bd853457b7d07](https://github.com/PhantomPhreak/counterpartyd/commit/d7bd4d1344285fe79667752f5c2bd853457b7d07).

---

<div class="post-metadata">

**Author:** ![Global\_trade\_repo](https://avatars.discourse-cdn.com/v4/letter/g/8baadc/32.png) [@Global\_trade\_repo](https://forums.counterparty.io/u/Global_trade_repo)\
**Post date:** [March 23, 2014, 8:00pm UTC](https://forums.counterparty.io/t/orders-which-did-not-match-off-100/172/5 "2014-03-23T20:00:41Z")

</div>

Thanks for having a look PhantomPhreak, I performed a test on testnet where the ratio is a repeating number and as expected the orders matched exactly.

---

<div class="post-metadata">

**Author:** ![Global\_trade\_repo](https://avatars.discourse-cdn.com/v4/letter/g/8baadc/32.png) [@Global\_trade\_repo](https://forums.counterparty.io/u/Global_trade_repo)\
**Post date:** [March 23, 2014, 9:58pm UTC](https://forums.counterparty.io/t/orders-which-did-not-match-off-100/172/6 "2014-03-23T21:58:51Z")

</div>

Sorry, I didn’t check properly. The orders were not filled 100%. Is it active in testnet on the servers running Counterwallet?  
  
Order id: 2042  
  
  
edit: order id not order match id

---

<div class="post-metadata">

**Author:** ![PhantomPhreak](https://avatars.discourse-cdn.com/v4/letter/p/ccd318/32.png) [@PhantomPhreak](https://forums.counterparty.io/u/PhantomPhreak)\
**Post date:** [March 24, 2014, 11:30am UTC](https://forums.counterparty.io/t/orders-which-did-not-match-off-100/172/7 "2014-03-24T11:30:52Z")

</div>

[quote author=Global\_trade\_repo link=topic=171.msg1560#msg1560 date=1395626331]  
Sorry, I didn’t check properly. The orders were not filled 100%. Is it active in testnet on the servers running Counterwallet?  
  
Order id: 2042  
  
  
edit: order id not order match id  
[/quote]  
  
What’s the tx hash of the order?
