Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions vocs-docs/docs/pages/node-client/public/get_price.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,37 @@ pub async fn get_price(&mut self, market_id: u32) -> Result<MarketPrice, Error>
```url [API]
/dydxprotocol.prices.Query/MarketPrice
```
:::

:::warning
In `dYdX`, `market id` and `perpetual id` may not match. For example,

```text
dydxprotocold query perpetuals show-perpetual 145
perpetual:
funding_index: "6530"
open_interest: "0"
params:
atomic_resolution: -5
default_funding_ppm: 100
id: 145
liquidity_tier: 4
market_id: 71
market_type: PERPETUAL_MARKET_TYPE_ISOLATED
ticker: LUCE-USD
```

Here, `perpetual id` is 145 but the `market id` is 71.
:::

:::details[Unification Plan]
:::

#### Parameters

| Parameter | Location | Type | Required | Description |
| --------- | -------- | ----- | -------- | --------------------- |
| `id` | query | [u32] | true | Market ID |
| Parameter | Location | Type | Required | Description |
| ----------- | -------- | ----- | -------- | ---------------------------------- |
| `market_id` | query | [u32] | true | ID of the market to fetch price of |

#### Response

Expand Down
2 changes: 2 additions & 0 deletions vocs-docs/docs/pages/types/clob_pair_id.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# ClobPairId

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.

`ClobPairId` is represented by [u32]

[u32]: /types/u32