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

return timestamp in get_order_book api call #1908

Closed
oxarbitrage opened this issue Aug 13, 2019 · 2 comments
Closed

return timestamp in get_order_book api call #1908

oxarbitrage opened this issue Aug 13, 2019 · 2 comments
Labels
1b User Story The User Story details a requirement. It may reference a parent Epic. It may reference child Task(s) 3b Feature Classification indicating the addition of novel functionality to the design 6 API Impact flag identifying the application programing interface (API) 6 UX Impact flag identifying the User Interface (UX)

Comments

@oxarbitrage
Copy link
Member

To get the timestamp of an order book the developer will have to make a separated query to get the head_block_time. This can be a different time than the order book he/she is getting.

A timestamp field can be added among the bids and the asks with timestamp at the moment of pulling the order book.

Coming from bitshares/bitshares-explorer-api#64 (comment)

@oxarbitrage oxarbitrage added 1b User Story The User Story details a requirement. It may reference a parent Epic. It may reference child Task(s) 3b Feature Classification indicating the addition of novel functionality to the design 6 API Impact flag identifying the application programing interface (API) 6 UX Impact flag identifying the User Interface (UX) labels Aug 13, 2019
@abitmore
Copy link
Member

Please be aware that

  1. order book of normal API nodes usually contains unconfirmed data due to pending transactions, thus it can change when being included in a block;
  2. even if it's included in a block, before the block become irreversible, the state can change due to chain reorganization;
  3. order book of delayed_node usually doesn't make sense for traders.

So a timestamp especially head_block_time doesn't really make sense. IMHO you can just return a local time.

@oxarbitrage
Copy link
Member Author

Makes sense to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1b User Story The User Story details a requirement. It may reference a parent Epic. It may reference child Task(s) 3b Feature Classification indicating the addition of novel functionality to the design 6 API Impact flag identifying the application programing interface (API) 6 UX Impact flag identifying the User Interface (UX)
Projects
None yet
Development

No branches or pull requests

2 participants