https://github.com/bitquery/graphql-streaming-example-rs
Example GraphQL subscription on DexTrades for Solana (Pumpfun) on Rust
https://github.com/bitquery/graphql-streaming-example-rs
Last synced: 7 months ago
JSON representation
Example GraphQL subscription on DexTrades for Solana (Pumpfun) on Rust
- Host: GitHub
- URL: https://github.com/bitquery/graphql-streaming-example-rs
- Owner: bitquery
- Created: 2024-07-28T08:06:01.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-07-28T08:06:53.000Z (over 1 year ago)
- Last Synced: 2025-06-23T10:50:19.958Z (7 months ago)
- Language: Rust
- Size: 126 KB
- Stars: 2
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bitquery Graphql Streaming API Example on Rust
## API Key
For EAP you use API KEYs from API-V2, you can create token on https://account.bitquery.io/user/api_v2/access_tokens
## Usage
```bash
API_KEY=ory_... cargo run
```
## Output
```
Ok(
Response {
data: Some(
ResponseData {
solana: Some(
DexTradesSolana {
dex_trades: Some(
[
DexTradesSolanaDexTrades {
block: Some(
DexTradesSolanaDexTradesBlock {
slot: Some(
"280120788",
),
time: Some(
DateTime(
"2024-07-28T08:01:26Z",
),
),
},
),
trade: Some(
DexTradesSolanaDexTradesTrade {
price_asymmetry: Some(
1.0,
),
buy: Some(
DexTradesSolanaDexTradesTradeBuy {
amount: Some(
"1.537152157",
),
account: Some(
DexTradesSolanaDexTradesTradeBuyAccount {
address: Some(
"AZPEmek7FnZqFRUgzW8mpvaJbNhVDdnHfF73aYbFHrei",
),
},
),
price: Some(
7522075.820553268,
),
currency: Some(
DexTradesSolanaDexTradesTradeBuyCurrency {
name: Some(
"Solana",
),
mint_address: Some(
"11111111111111111111111111111111",
),
},
),
},
),
...
```