{"action":"opened","issue":{"url":"https://api.github.com/repos/ExchangeUnion/xud/issues/353","repository_url":"https://api.github.com/repos/ExchangeUnion/xud","labels_url":"https://api.github.com/repos/ExchangeUnion/xud/issues/353/labels{/name}","comments_url":"https://api.github.com/repos/ExchangeUnion/xud/issues/353/comments","events_url":"https://api.github.com/repos/ExchangeUnion/xud/issues/353/events","html_url":"https://github.com/ExchangeUnion/xud/issues/353","id":351317578,"node_id":"MDU6SXNzdWUzNTEzMTc1Nzg=","number":353,"title":"Market order call returns remainingOrder","user":{"login":"sangaman","id":3440835,"node_id":"MDQ6VXNlcjM0NDA4MzU=","avatar_url":"https://avatars1.githubusercontent.com/u/3440835?v=4","gravatar_id":"","url":"https://api.github.com/users/sangaman","html_url":"https://github.com/sangaman","followers_url":"https://api.github.com/users/sangaman/followers","following_url":"https://api.github.com/users/sangaman/following{/other_user}","gists_url":"https://api.github.com/users/sangaman/gists{/gist_id}","starred_url":"https://api.github.com/users/sangaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sangaman/subscriptions","organizations_url":"https://api.github.com/users/sangaman/orgs","repos_url":"https://api.github.com/users/sangaman/repos","events_url":"https://api.github.com/users/sangaman/events{/privacy}","received_events_url":"https://api.github.com/users/sangaman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-16T18:26:36Z","updated_at":"2018-08-16T18:26:36Z","closed_at":null,"author_association":"COLLABORATOR","body":"I have not investigated this yet, but I'm logging the output here so as to not forget about it. Unfortunately I forgot to check whether the market order was actually added to the orderbook. Noticed this in some testing with @kilrau.\r\n\r\n1. Receive a peer order\r\n\r\n```bash\r\nxucli getorders BTC/LTC\r\n{\r\n  \"peerOrders\": {\r\n    \"buyOrdersList\": [\r\n      {\r\n        \"price\": 100,\r\n        \"quantity\": 1,\r\n        \"pairId\": \"BTC/LTC\",\r\n        \"peerPubKey\": \"03d2fc7499fa9ee64290acdd12cd653e2c63963d660642422903c3c66c5dc98931\",\r\n        \"id\": \"a9f1e570-a178-11e8-8822-81f39cd0b447\",\r\n        \"localId\": \"\",\r\n        \"createdAt\": 1534440152964,\r\n        \"invoice\": \"dummyInvoice\",\r\n        \"canceled\": false\r\n      }\r\n    ],\r\n    \"sellOrdersList\": []\r\n  },\r\n  \"ownOrders\": {\r\n    \"buyOrdersList\": [],\r\n    \"sellOrdersList\": []\r\n  }\r\n}\r\n```\r\n\r\n2. Attempt to fill it with a market order, but accidentally do a market buy instead of a market sell: `xucli marketorder BTC/LTC 1 1`\r\n\r\n3. Observe a `remainingOrder` with max price, instead returning a null value for remaining order to indicate it has been discarded and not added to the orderbook (also doublecheck nothing gets added).\r\n\r\n```bash\r\n{\r\n  \"matchesList\": [],\r\n  \"remainingOrder\": {\r\n    \"price\": 1.7976931348623157e+308,\r\n    \"quantity\": 1,\r\n    \"pairId\": \"BTC/LTC\",\r\n    \"peerPubKey\": \"\",\r\n    \"id\": \"64655f40-a179-11e8-909c-8985afb322c4\",\r\n    \"localId\": \"1\",\r\n    \"createdAt\": 1534440338228,\r\n    \"invoice\": \"\",\r\n    \"canceled\": false\r\n  }\r\n}\r\n```"}}
{"actor":{"display_login":"sangaman"}}