Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load user's open orders #633

Closed
priecint opened this issue Jun 16, 2016 · 5 comments
Closed

Load user's open orders #633

priecint opened this issue Jun 16, 2016 · 5 comments
Assignees
Milestone

Comments

@priecint
Copy link
Contributor

No description provided.

@priecint priecint self-assigned this Jun 16, 2016
@thinkloop thinkloop added this to the MVP milestone Jun 16, 2016
@priecint priecint changed the title Trading: Display user's open orders Load user's open orders Jun 19, 2016
@priecint
Copy link
Contributor Author

@priecint
Copy link
Contributor Author

@tinybike, @joeykrug Please, what's the best way to get user's open orders for market (outcome)? One way is to filter values from getOrderBook by owner field. Any better way?

@joeykrug
Copy link
Contributor

You should be able to filter by owner and market
event log_add_tx(market:indexed, sender:indexed, type, price, amount, outcome, tradeid)

Jack can explain more / may have a better way in augur js already setup i think

@tinybike
Copy link
Member

@joeykrug The logs I'm getting from the log_add_tx event (and the log_cancel event) only have 2 topics, for example:

{
    address: '0x8d28df956673fa4a8bc30cd0b3cb657445bc820e',
    blockHash: '0x8c3fa0f2a092adf52702b8ebda332c12311f32a9d7dbeca3fd7ad3237a1b143a',
    blockNumber: '0x11964c',
    data: '0x000000000000000000000000ae1ba9370f9c3d64894ed9a101079fd17bf1044800000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000001d7dd185ffffff8d00000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000002ccb7a4c7d0c9a0de5c08c459ce78642b23fdbd9df707781a9f4c24f9c1205bfd',
    logIndex: '0x1',
    topics: [
        '0x8dbed7bffe37a9907a92186110f23d8104f5967a71fb059f3b907ca9001fd160',
        '0xbbc704ce88ff685a56a6a8e708cec54f981d750d8fe83a53d8c4ffb2d4bf4ddd'
    ],
    transactionHash: '0xa1796f1e7bd1290ba695908a2633a5164deb83c1431c5106c51fb186e79c257e',
    transactionIndex: '0x3'
}

The first topic is the event signature sha3("log_add_tx(int256,int256,int256,int256,int256,int256,int256)"), the second is the market ID. The sender's address 0xae1ba9370f9c3d64894ed9a101079fd17bf10448 is the first entry in the (serialized) data array. Not sure why it's not being indexed but seems like it's not.

priecint added a commit that referenced this issue Jul 18, 2016
 - update selected user open orders group
priecint added a commit that referenced this issue Jul 19, 2016
 - add order cancellation
 - refactoring
 - improve test
 - change prefer-arrow-callback eslint rule
priecint added a commit that referenced this issue Jul 28, 2016
Conflicts:
	src/modules/bids-asks/selectors/select-order-book.js
	src/services/augurjs.js
	test/bids-asks/reducers/market-order-books-test.js
	test/bids-asks/selectors/select-order-book-test.js
priecint added a commit that referenced this issue Jul 28, 2016
Conflicts:
	src/modules/market/selectors/market.js
	src/modules/transactions/constants/statuses.js
priecint added a commit that referenced this issue Jul 28, 2016
 - add user open orders summary to market
 - fix code where market order books is used
 - remove unused reducers and selectors
priecint added a commit that referenced this issue Aug 1, 2016
 - remove extra userOpenOrdersSummary from market
priecint added a commit that referenced this issue Aug 1, 2016
 - add confirmation
 - fix tests
priecint added a commit that referenced this issue Aug 3, 2016
 - add tests
 - rename/add constants
 - add isOrderOfUser method
priecint added a commit that referenced this issue Aug 3, 2016
Conflicts:
	src/modules/market/selectors/market.js
	src/selectors.js
priecint added a commit that referenced this issue Aug 6, 2016
 - add getOrder
 - add more tests
 - refactoring
 - sync constant with AURC
priecint added a commit that referenced this issue Aug 8, 2016
 - change BID and ASK constants
priecint added a commit that referenced this issue Aug 8, 2016
priecint added a commit that referenced this issue Aug 8, 2016
JohnDanz added a commit that referenced this issue Aug 8, 2016
@tinybike
Copy link
Member

tinybike commented Aug 9, 2016

Added in 1f7878e

@tinybike tinybike closed this as completed Aug 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants