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

[Deepbook] Add api for query market price #12088

Merged
merged 1 commit into from
May 21, 2023

Conversation

wiggins-dev
Copy link
Contributor

Description

Add api for query market price of the order book

Test Plan

cd to deepbook dir and run "sui move test"


If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process.

Type of Change (Check all that apply)

  • user-visible impact
  • breaking change for a client SDKs
  • breaking change for FNs (FN binary must upgrade)
  • breaking change for validators or node operators (must upgrade binaries)
  • breaking change for on-chain data layout
  • necessitate either a data wipe or data migration

Description

Describe the changes or additions included in this PR.

Test Plan

How did you test the new or updated feature?


If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process.

Type of Change (Check all that apply)

  • user-visible impact
  • breaking change for a client SDKs
  • breaking change for FNs (FN binary must upgrade)
  • breaking change for validators or node operators (must upgrade binaries)
  • breaking change for on-chain data layout
  • necessitate either a data wipe or data migration

Release notes

## Description

Add api for query market price of the order book

## Test Plan

cd to deepbook dir and run "sui move test"

---
If your changes are not user-facing and not a breaking change, you can
skip the following section. Otherwise, please indicate what changed, and
then add to the Release Notes section as highlighted during the release
process.

### Type of Change (Check all that apply)

- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration
@vercel
Copy link

vercel bot commented May 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
offline-signer-helper ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 19, 2023 1:05am
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
explorer ⬜️ Ignored (Inspect) May 19, 2023 1:05am
explorer-storybook ⬜️ Ignored (Inspect) May 19, 2023 1:05am
sui-wallet-kit ⬜️ Ignored (Inspect) May 19, 2023 1:05am
wallet-adapter ⬜️ Ignored (Inspect) May 19, 2023 1:05am

): (u64, u64){
let (bid_price, _) = critbit::max_leaf(&pool.bids);
let (ask_price, _) = critbit::min_leaf(&pool.asks);
return (bid_price, ask_price)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return (bid_price, ask_price)
(bid_price, ask_price)

@sblackshear sblackshear merged commit 485a898 into MystenLabs:main May 21, 2023
amnn added a commit that referenced this pull request May 22, 2023
To fix protocol config snapshot test which is (correctly) complaining
that the framework bytes being packaged in the binary no longer
matches the snapshot for the max protocol version, after #12088.

Test Plan:

```
cargo nextest run -- check_framework_change_with_protocol_upgrade
```
amnn added a commit that referenced this pull request May 22, 2023
## Description

To fix protocol config snapshot test which is (correctly) complaining
that the framework bytes being packaged in the binary no longer matches
the snapshot for the max protocol version, after #12088.

## Test Plan

```
cargo nextest run -- check_framework_change_with_protocol_upgrade
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants