Skip to content

sui_v1.39.0_1733341330_ci

@tonylee08 tonylee08 tagged this 04 Dec 18:01
## Description 

**Modified Endpoint 1:** 
/get_historical_volume/:pool_id -> /historical_volume/pool_name
Response will display pool as pool_name

Example call:

`/historical_volume/SUI_USDC,DEEP_USDC?start_time=1733152516&end_time=1733238917`

Example response:
`{"DEEP_USDC":24033500000000,"SUI_USDC":2647584300000000}`

**New Endpoint 1: /all_historical_volume**
Retrieves the pools stored in db and return volume for all pools within
time range

Example Call:
`/all_historical_volume?start_time=1733152516&end_time=1733238917`

Example Response:

`{"DEEP_USDC":23658150000000,"DEEP_SUI":5311220000000,"TYPUS_SUI":662314300000000,"SUI_USDC":3365051200000000,"WUSDC_USDC":7960304900000,"NS_USDC":783869300000,"NS_SUI":379958200000}`

**New Endpoint 2: /orderbook/:pool_name**
More information:
[https://docs.google.com/document/d/1S4urpzUnO2t7DmS_1dc4EL4tgnnbTObPYXvDeBnukCg/edit?tab=t.0#bookmark=kix.ojdax1m5sg58](url)

Required path:
`pool_name`: "LTC_BTC" 

Optional params: 
`level` (1 or 2): Level 1 – Only the best bid and ask. Level 2 –
Arranged by best bids and asks.
`depth`: Not defined or 0 = full order book Depth = 100 means 50 for
each bid/ask side. Cannot be 1.
All bids and asks returned are sorted by best to worst

Example call:
`/orderbook/SUI_USDC?depth=4`

Example output:

`{"timestamp":"1733252111939","bids":[["3.796","958.5"],["3.795","5000"]],"asks":[["3.799","1000"],["3.801","7238"]]}`

## 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): 
- [x] Indexer: Deepbook Indexer
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] REST API:
Assets 2
Loading