Skip to content

Commit 6f403e1

Browse files
committed
wip-api-reference
1 parent 7bd214e commit 6f403e1

File tree

5 files changed

+26
-1
lines changed

5 files changed

+26
-1
lines changed

apps/api-reference/src/apis/evm/get-price.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@ export const getPrice = readApi<"id">({
55
name: "getPrice",
66
summary: "Get the **latest** price object for the requested price feed ID.",
77
description: `
8+
This method returns the latest price object for the requested price feed ID.
9+
10+
The \`Price\` object contains the following fields:
11+
1. \`price\`: The price of the asset.
12+
2. \`conf\`: The confidence level of the price.
13+
3. \`expo\`: The exponent of the price.
14+
4. \`publishTime\`: The timestamp of the price update.
15+
16+
Sample \`Price\` object:
17+
\`\`\`json
18+
{
19+
"price": "1234",
20+
"conf": "1000",
21+
"expo": "-2",
22+
"publishTime": 1626892800
23+
}
24+
\`\`\`
825
Get the latest price and confidence interval for the requested price feed id.
926
The price feed id is a 32-byte id written as a hexadecimal string; see the
1027
[price feed ids](https://pyth.network/developers/price-feed-ids) page to look up

apps/api-reference/src/components/InlineCode/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ export const InlineCode = ({
1313
{...props}
1414
/>
1515
);
16+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { Styled } from "../Styled";
2+
3+
export const NumberedList = Styled("ol", "list-decimal list-inside mb-6 last:mb-0");
4+
export const BulletList = Styled("ul", "list-disc list-inside mb-6 last:mb-0");
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import { Styled } from "../Styled";
22

3-
export const Paragraph = Styled("p", "mb-6 last:mb-0");
3+
export const Paragraph = Styled("p", "mb-6 last:mb-0");

apps/api-reference/src/markdown-components.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ import { InlineCode } from "./components/InlineCode";
22
import { InlineLink } from "./components/InlineLink";
33
import { Paragraph } from "./components/Paragraph";
44
import { Styled } from "./components/Styled";
5+
import { NumberedList, BulletList } from "./components/List";
56

67
export const MARKDOWN_COMPONENTS = {
78
h1: Styled("h1", "mb-8 text-4xl font-medium"),
89
p: Paragraph,
910
a: InlineLink,
1011
code: InlineCode,
1112
strong: Styled("strong", "font-semibold"),
13+
ul: BulletList,
14+
ol: NumberedList,
1215
};

0 commit comments

Comments
 (0)