Skip to content

Commit 9e5e996

Browse files
Added clarification on market id and perpeutal id differences (#400)
* Added clob pair id description and fixed parameter description in get_price api * Added clarification on market id and perpeutal id differences * Added warning on market id and perpetual id alignment issue
1 parent b740af3 commit 9e5e996

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

vocs-docs/docs/pages/node-client/public/get_price.mdx

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,37 @@ pub async fn get_price(&mut self, market_id: u32) -> Result<MarketPrice, Error>
2121
```url [API]
2222
/dydxprotocol.prices.Query/MarketPrice
2323
```
24+
:::
25+
26+
:::warning
27+
In `dYdX`, `market id` and `perpetual id` may not match. For example,
28+
29+
```text
30+
dydxprotocold query perpetuals show-perpetual 145
31+
perpetual:
32+
funding_index: "6530"
33+
open_interest: "0"
34+
params:
35+
atomic_resolution: -5
36+
default_funding_ppm: 100
37+
id: 145
38+
liquidity_tier: 4
39+
market_id: 71
40+
market_type: PERPETUAL_MARKET_TYPE_ISOLATED
41+
ticker: LUCE-USD
42+
```
2443

44+
Here, `perpetual id` is 145 but the `market id` is 71.
2545
:::
2646

2747
:::details[Unification Plan]
2848
:::
2949

3050
#### Parameters
3151

32-
| Parameter | Location | Type | Required | Description |
33-
| --------- | -------- | ----- | -------- | --------------------- |
34-
| `id` | query | [u32] | true | Market ID |
52+
| Parameter | Location | Type | Required | Description |
53+
| ----------- | -------- | ----- | -------- | ---------------------------------- |
54+
| `market_id` | query | [u32] | true | ID of the market to fetch price of |
3555

3656
#### Response
3757

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ClobPairId
22

3+
A CLOB (Central Limit Order Book) Pair ID refers to the identifier for a specific order book (spot, perpetual, etc.). It uniquely identifies where liquidity rests, tick sizes, step sizes, and other trading configuration for that product.
4+
35
`ClobPairId` is represented by [u32]
46

57
[u32]: /types/u32

0 commit comments

Comments
 (0)