sbv2-solana/website/docs/developers/feed.mdx

193 lines
2.4 KiB
Plaintext

---
sidebar_position: 30
title: Data Feeds
---
import { Box, Typography, Grid } from "@mui/material";
import Link from "@docusaurus/Link";
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
<Typography variant="h4">
<Link to="https://github.com/switchboard-xyz/switchboard-v2/tree/main/programs/anchor-feed-parser">
# anchor-feed-parser
</Link>
</Typography>
## Reading a Data Feed
<Tabs>
<TabItem value="Rust" label="Rust" default>
```rust
// Rust code
```
</TabItem>
<TabItem value="Typescript" label="Typescript">
```ts
// Typescript code
```
</TabItem>
<TabItem value="Python" label="Python">
```python
# Python code
```
</TabItem>
<TabItem value="CLI" label="CLI">
```bash
# CLI command
```
</TabItem>
</Tabs>
## Creating a Data Feed
- `aggregatorInit`
- `leaseInit`
- `jobInit`
- `permissionInit`
- `aggregatorAddJob`
<Tabs>
<TabItem value="Typescript" label="Typescript" default>
```ts
// Typescript code
```
</TabItem>
<TabItem value="Python" label="Python">
```python
# Python code
```
</TabItem>
<TabItem value="CLI" label="CLI">
```bash
# CLI command
```
</TabItem>
</Tabs>
## Funding a Data Feed
- `leeaseExtend`
<Tabs>
<TabItem value="Typescript" label="Typescript" default>
```ts
// Typescript code
```
</TabItem>
<TabItem value="Python" label="Python">
```python
# Python code
```
</TabItem>
<TabItem value="CLI" label="CLI">
```bash
# CLI command
```
</TabItem>
</Tabs>
## Requesting a Feed Update
- `openRound`
<Tabs>
<TabItem value="Typescript" label="Typescript" default>
```ts
// Typescript code
```
</TabItem>
<TabItem value="Python" label="Python">
```python
# Python code
```
</TabItem>
<TabItem value="CLI" label="CLI">
```bash
# CLI command
```
</TabItem>
</Tabs>
## Push to Crank
- `crankPush`
<Tabs>
<TabItem value="Typescript" label="Typescript" default>
```ts
// Typescript code
```
</TabItem>
<TabItem value="Python" label="Python">
```python
# Python code
```
</TabItem>
<TabItem value="CLI" label="CLI">
```bash
# CLI command
```
</TabItem>
</Tabs>
## Add History Buffer
- `aggregatorSetHistoryBuffer`
<Tabs>
<TabItem value="Typescript" label="Typescript" default>
```ts
// Typescript code
```
</TabItem>
<TabItem value="Python" label="Python">
```python
# Python code
```
</TabItem>
<TabItem value="CLI" label="CLI">
```bash
# CLI command
```
</TabItem>
</Tabs>