Skip to content

Commit f47ea4e

Browse files
authored
Deepbook Docs Update (MystenLabs#21745)
## Description Update Deepbook minimum fees, merge after upgrade ## Test plan Docs only ## 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:
1 parent 24f9ea2 commit f47ea4e

File tree

2 files changed

+86
-22
lines changed

2 files changed

+86
-22
lines changed

docs/content/standards/deepbookv3-indexer.mdx

Lines changed: 82 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ produces a response similar to
469469
### Get trades
470470

471471
```http
472-
/trades/:pool_name
472+
/trades/:pool_name?limit=<INTEGER>&start_time=<UNIX_TIMESTAMP_SECONDS>&end_time=<UNIX_TIMESTAMP_SECONDS>&maker_balance_manager_id=<ID>&taker_balance_manager_id=<ID>
473473
```
474474

475475
Returns the most recent trade in the pool.
@@ -478,14 +478,18 @@ Returns the most recent trade in the pool.
478478

479479
```json
480480
[
481-
{
482-
"trade_id": "string",
483-
"base_volume": integer,
484-
"quote_volume": integer,
485-
"price": integer,
486-
"type": "string",
487-
"timestamp": integer
488-
}
481+
{
482+
"trade_id": "string",
483+
"base_volume": integer,
484+
"quote_volume": integer,
485+
"price": integer,
486+
"type": "string",
487+
"timestamp": integer,
488+
"maker_order_id": "string",
489+
"taker_order_id": "string",
490+
"maker_balance_manager_id": "string",
491+
"taker_balance_manager_id": "string"
492+
}
489493
]
490494
```
491495

@@ -496,21 +500,81 @@ The `timestamp` value is in Unix milliseconds.
496500
A successful request to
497501

498502
```http
499-
/trades/DEEP_USDC
503+
trades/SUI_USDC?limit=2&start_time=1738093405&end_time=1738096485&maker_balance_manager_id=0x344c2734b1d211bd15212bfb7847c66a3b18803f3f5ab00f5ff6f87b6fe6d27d&taker_balance_manager_id=0x47dcbbc8561fe3d52198336855f0983878152a12524749e054357ac2e3573d58
500504
```
501505

502506
produces a response similar to
503507

504508
```json
505509
[
506-
{
507-
"timestamp": 1733874285058,
508-
"trade_id": "170141183461771756330731935155489889951",
509-
"quote_volume": 9.8854,
510-
"price": 0.07061,
511-
"base_volume": 140.0,
512-
"type": "buy"
513-
}
510+
{
511+
"trade_id": "136321457151457660152049680",
512+
"base_volume": 405,
513+
"quote_volume": 1499,
514+
"price": 3695,
515+
"type": "sell",
516+
"timestamp": 1738096392913,
517+
"maker_order_id": "68160737799100866923792791",
518+
"taker_order_id": "170141183460537392451039660509112362617",
519+
"maker_balance_manager_id": "0x344c2734b1d211bd15212bfb7847c66a3b18803f3f5ab00f5ff6f87b6fe6d27d",
520+
"taker_balance_manager_id": "0x47dcbbc8561fe3d52198336855f0983878152a12524749e054357ac2e3573d58"
521+
},
522+
...
523+
]
524+
```
525+
526+
### Get order updates
527+
528+
```http
529+
/order_updates/:pool_name?limit=<INTEGER>&start_time=<UNIX_TIMESTAMP_SECONDS>&end_time=<UNIX_TIMESTAMP_SECONDS>&status=<"Placed" or "Canceled">&balance_manager_id=<ID>
530+
```
531+
532+
Returns the orders that were recently placed or canceled in the pool
533+
534+
#### Response
535+
536+
```json
537+
[
538+
{
539+
"order_id": "string",
540+
"balance_manager_id": "string",
541+
"timestamp": integer,
542+
"original_quantity": integer,
543+
"remaining_quantity": integer,
544+
"filled_quantity": integer,
545+
"price": integer,
546+
"status": "string",
547+
"type": "string"
548+
}
549+
]
550+
```
551+
552+
The `timestamp` value is in Unix milliseconds.
553+
554+
#### Example
555+
556+
A successful request to
557+
558+
```http
559+
/order_updates/DEEP_USDC?start_time=1738703053&end_time=1738704080&limit=2&status=Placed&balance_manager_id=0xd335e8aa19d6dc04273d77e364c936bad69db4905a4ab3b2733d644dd2b31e0a
560+
```
561+
562+
produces a response similar to
563+
564+
```json
565+
[
566+
{
567+
"order_id": "170141183464610341308794360958165054983",
568+
"balance_manager_id": "0xd335e8aa19d6dc04273d77e364c936bad69db4905a4ab3b2733d644dd2b31e0a",
569+
"timestamp": 1738704071994,
570+
"original_quantity": 8910,
571+
"remaining_quantity": 8910,
572+
"filled_quantity": 0,
573+
"price": 22449,
574+
"status": "Placed",
575+
"type": "sell"
576+
},
577+
...
514578
]
515579
```
516580

docs/content/standards/deepbookv3/design.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ Every epoch, users with non zero stake can submit a proposal to change these par
5656

5757
| min_value (bps) | max_value (bps) | Pool type | Taker or maker |
5858
| --- | --- | --- | --- |
59-
| 5 | 10 | Volatile | Taker |
60-
| 2 | 5 | Volatile | Maker |
61-
| 0.5 | 1 | Stable | Taker |
62-
| 0.2 | 0.5 | Stable | Maker |
59+
| 1 | 10 | Volatile | Taker |
60+
| 0 | 5 | Volatile | Maker |
61+
| 0.1 | 1 | Stable | Taker |
62+
| 0 | 0.5 | Stable | Maker |
6363
| 0 | 0 | Whitelisted | Taker and maker |
6464

6565
Users can also vote on live proposals. When a proposal exceeds the quorum, the new trade parameters are queued to go live from the following epoch and onwards. Proposals and votes are reset every epoch. Users can start submitting and voting on proposals the epoch following their stake. Quorum is equivalent to half of the total voting power. A user's voting power is calculated with the following formula where ${V}$ is the voting power, ${S}$ is the amount staked, and ${V_c}$ is the voting power cutoff. ${V_c}$ is currently set to 100,000 DEEP.

0 commit comments

Comments
 (0)