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 Indexer Trade Updates Endpoint #21089

Merged
merged 3 commits into from
Feb 5, 2025
Merged

Conversation

tonylee08
Copy link
Contributor

@tonylee08 tonylee08 commented Feb 4, 2025

Description

order_updates endpoint

Optional Filters:

  1. limit: defaults to 1 (number of trades to be included in result). Most recent trades are always included first.
  2. balance_manager_id: defaults to no filter
  3. status: "Placed" or "Canceled"
  4. start_time: unix timestamp in seconds, defaults to 24hrs before end_time
  5. end_time: unix timestamp in seconds, defaults to current time

Sample query:
/order_updates/DEEP_USDC?start_time=1738703053&end_time=1738704080&limit=2&status=Placed&balance_manager_id=0xd335e8aa19d6dc04273d77e364c936bad69db4905a4ab3b2733d644dd2b31e0a

Sample Response:
[{"original_quantity":8910.0,"remaining_quantity":8910.0,"status":"Placed","type":"sell","price":0.22449,"filled_quantity":0.0,"balance_manager_id":"0xd335e8aa19d6dc04273d77e364c936bad69db4905a4ab3b2733d644dd2b31e0a","timestamp":1738704071994,"order_id":"170141183464610341308794360958165054983"},{"type":"buy","status":"Placed","order_id":"4106245249254490263425922919","balance_manager_id":"0xd335e8aa19d6dc04273d77e364c936bad69db4905a4ab3b2733d644dd2b31e0a","remaining_quantity":8890.0,"original_quantity":8890.0,"filled_quantity":0.0,"timestamp":1738704067473,"price":0.2226}]

Test plan

How did you test the new or updated feature?

Tested locally

Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • gRPC:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

Copy link

vercel bot commented Feb 4, 2025

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

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 4, 2025 9:40pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Feb 4, 2025 9:40pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Feb 4, 2025 9:40pm

@tonylee08 tonylee08 temporarily deployed to sui-typescript-aws-kms-test-env February 4, 2025 21:29 — with GitHub Actions Inactive
@tonylee08 tonylee08 changed the title Tlee/trade updates endpoint Deepbook trade updates endpoint Feb 4, 2025
@tonylee08 tonylee08 changed the title Deepbook trade updates endpoint Deepbook Indexer Trade Updates Endpoint Feb 4, 2025
@tonylee08 tonylee08 merged commit b1f792d into main Feb 5, 2025
49 checks passed
@tonylee08 tonylee08 deleted the tlee/trade-updates-endpoint branch February 5, 2025 14:49
@tonylee08 tonylee08 restored the tlee/trade-updates-endpoint branch February 5, 2025 14:49
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