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
2 changes: 1 addition & 1 deletion docs/blockchain/Solana/Pumpfun/Pump-Fun-API.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ If you have any question on other data points reach out to [support](https://t.m
Want to analyze Pump.fun tokens for potential phishing risks? Check out our [**PumpFun Token Sniffer**](https://docs.bitquery.io/pumpfun-token-sniffer/) — a proof-of-concept tool that helps identify suspicious token behavior by analyzing transfers and trades.
:::

Need zero-latency Pumpfun data? [Read about our Shred Streams and Contact us for a Trial](https://docs.bitquery.io/docs/streams/real-time-solana-data/).
Need zero-latency Pumpfun data? [Read about our Shred Streams and Contact us for a Trial](https://docs.bitquery.io/docs/streams/real-time-solana-data/). For gRPC streaming: [Pump.fun gRPC Streams →](https://docs.bitquery.io/docs/grpc/solana/examples/pump-fun-grpc-streams/).

You may also be interested in:

Expand Down
2 changes: 2 additions & 0 deletions docs/blockchain/Solana/Solana-Raydium-DEX-API.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ sidebar_position: 7

In this section, we will see how to get Raydium information using Bitquery APIs.

For gRPC streaming of Raydium DEX trades: [Solana gRPC Streams (CoreCast) →](https://docs.bitquery.io/docs/grpc/solana/introduction/)

:::note
`Trade Side Account` field will not be available for aggregate queries in Archive and Combined Datasets
:::
Expand Down
10 changes: 10 additions & 0 deletions docs/blockchain/Solana/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: Collection of Solana APIs organized by project.
slug: /blockchain/Solana/
keywords:
- Solana API
- Solana gRPC
- solana grpc
- Solana RPC
- Solana RPC API
- Best Solana API
Expand Down Expand Up @@ -58,6 +60,14 @@ Bitquery Solana APIs are very flexible, you can fetch trade, transaction, balanc

Read more [here](https://docs.bitquery.io/docs/streams/real-time-solana-data/) and contact sales via [Telegram](https://t.me/Bloxy_info) or [form](https://bitquery.io/forms/api) for a **Trial**.

## Solana gRPC Streams (CoreCast)

Bitquery **[Solana gRPC Streams](https://docs.bitquery.io/docs/grpc/solana/introduction/)** (CoreCast) provide ultra-low-latency, real-time data over gRPC with protobuf encoding. Subscribe to DEX trades, transfers, transactions, balances, and more with context-aware filtering — ideal for trading bots, copy trading, and high-frequency applications.

- **[CoreCast Introduction](https://docs.bitquery.io/docs/grpc/solana/introduction/)** — Topics, filters, and quick start
- **[Pump.fun gRPC Streams](https://docs.bitquery.io/docs/grpc/solana/examples/pump-fun-grpc-streams/)** — Real-time Pump.fun trades
- **[Copy Trading Bot](https://docs.bitquery.io/docs/grpc/solana/examples/grpc-copy-trading-bot/)** — Build a Solana copy trading bot with gRPC

## Does Bitquery support Solana Websocket and Solana Webhooks?

Bitquery supports websocket and webhooks, you can convert most of the graphQL APIs into graphQL streams by changing the word `query` to `subscription`. You can monitor this data via a websocket. More and [code samples available here](https://docs.bitquery.io/docs/subscriptions/websockets/)
Expand Down
3 changes: 2 additions & 1 deletion docs/blockchain/Solana/solana-dextrades.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ The GraphQL APIs and subscriptions below are examples of the real-time and histo
If you have questions or need custom data, reach out to [support](https://t.me/Bloxy_info).

Need zero-latency Solana DEX trade data?
[Read about our Shred Streams and contact us for a trial ➤](https://docs.bitquery.io/docs/streams/real-time-solana-data/)
[Read about our Shred Streams and contact us for a trial ➤](https://docs.bitquery.io/docs/streams/real-time-solana-data/)
For gRPC streaming: [Solana gRPC Streams (CoreCast) →](https://docs.bitquery.io/docs/grpc/solana/introduction/)

## 🔗 Related Solana APIs

Expand Down
56 changes: 51 additions & 5 deletions docs/grpc/solana/authorisation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@
---
title: "Solana gRPC Authentication - CoreCast API Token"
description: "Authenticate Bitquery Solana gRPC streams (CoreCast). Configure API token for corecast.bitquery.io. Metadata, config.yaml, 401 debug."
keywords: ["Solana gRPC auth", "CoreCast authentication", "grpc solana token", "bitquery api token"]
---

# Authentication

To access Bitquery’s Solana gRPC streams (CoreCast), you must authenticate every stream using an **[authorization token](https://account.bitquery.io/user/api_v2/access_tokens)**. This token is provided in your configuration file and automatically added to the gRPC metadata before starting a stream. Check the [documentation](https://docs.bitquery.io/docs/authorisation/how-to-generate/) to create a new token.
To access Bitquery's Solana gRPC streams (CoreCast), you must authenticate every stream using an **[authorization token](https://account.bitquery.io/user/api_v2/access_tokens)**. This token is provided in your configuration file and automatically added to the gRPC metadata before starting a stream. Check the [documentation](https://docs.bitquery.io/docs/authorisation/how-to-generate/) to create a new token.

---

## Overview

1. Generate an API token at [account.bitquery.io](https://account.bitquery.io/user/api_v2/access_tokens)
2. Add it to your config or environment
3. Inject it into gRPC metadata as `Authorization` header before each stream call

---

## Quick Example

Minimal Node.js snippet: create metadata and start a stream. Use your token from `config.yaml` or `process.env`.

```javascript
const grpc = require('@grpc/grpc-js');

const metadata = new grpc.Metadata();
metadata.add('authorization', process.env.BITQUERY_TOKEN || config.server.authorization);

// Use with any CoreCast stream (DexTrades, Transfers, etc.)
const stream = client.DexTrades(request, metadata);
stream.on('data', (msg) => console.log(msg));
stream.on('error', (err) => console.error(err));
```

:::tip No extra headers
Only the `authorization` header is required. No API keys or other credentials.
:::

---

## Configuration

Expand All @@ -13,9 +51,13 @@ server:
insecure: false
```

* **address** → gRPC server host address, which is `corecast.bitquery.io`.
* **authorization** → your API token (string that usually starts with `ory_at_...`).
* **insecure** → set `true`
| Field | Description |
| ----- | ----------- |
| **address** | gRPC server host: `corecast.bitquery.io` |
| **authorization** | Your API token (usually starts with `ory_at_...`) |
| **insecure** | Set `true` for unencrypted; prefer `false` (TLS) |

---

## How it works

Expand All @@ -31,15 +73,19 @@ const stream = client.DexTrades(request, metadata);

This adds an `authorization` header to the gRPC call. No other headers or credentials are required.

---

## Security

* Always keep your token secret — do not hardcode it in your codebase.
* Store it in `config.yaml`, an environment variable, or a secret manager.
* If `insecure: true`, traffic will not be encrypted. Prefer TLS (`insecure: false`).

---

## Common Issues

When authentication fails, youll see gRPC error **code `16`** with HTTP status **`401 Unauthorized`**:
When authentication fails, you'll see gRPC error **code `16`** with HTTP status **`401 Unauthorized`**:

```json
{
Expand Down
8 changes: 7 additions & 1 deletion docs/grpc/solana/examples/grpc-copy-trading-bot.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
---
title: "Solana Copy Trading Bot with gRPC Streams"
description: "Build a copy trading bot using CoreCast gRPC and Jupiter API. Real-time DEX trade streaming on Solana."
keywords: ["solana grpc", "grpc solana", "copy trading", "CoreCast", "Solana trading bot"]
---

# Building Solana Copy Trading Bot with gRPC Streams

A comprehensive guide to building a **high-performance Solana trading bot** that leverages **gRPC streams** for real-time copy trading using [Bitquery CoreCast](https://docs.bitquery.io/docs/grpc/solana/introduction).
A comprehensive guide to building a **high-performance Solana trading bot** that leverages **gRPC streams** for real-time copy trading using [Bitquery CoreCast](https://docs.bitquery.io/docs/grpc/solana/introduction/).

## Table of Contents

Expand Down
8 changes: 7 additions & 1 deletion docs/grpc/solana/examples/letsbonk-grpc-streams.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
title: "LetsBonk.fun gRPC Streams - Real-time DEX Trades"
description: "Stream LetsBonk.fun DEX trades via CoreCast gRPC. Raydium LaunchLab memecoin launchpad."
keywords: ["solana grpc", "grpc solana", "LetsBonk gRPC", "CoreCast", "Raydium LaunchLab"]
---

# LetsBonk.fun gRPC Streams

Real-time streaming of LetsBonk.fun DEX trades, orders, and transactions via CoreCast gRPC API.
Expand All @@ -9,7 +15,7 @@ Real-time streaming of LetsBonk.fun DEX trades, orders, and transactions via Cor
Clone and get started:

```bash
git clone hhttps://github.com/bitquery/grpc-usecase-examples.git
git clone https://github.com/bitquery/grpc-usecase-examples.git
```

## Introduction
Expand Down
6 changes: 6 additions & 0 deletions docs/grpc/solana/examples/pump-fun-grpc-streams.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
title: "Pump.fun gRPC Streams - Real-time DEX Trades"
description: "Stream Pump.fun DEX trades, orders, and transactions via CoreCast gRPC. Node.js example with filtering."
keywords: ["solana grpc", "grpc solana", "Pump.fun gRPC", "CoreCast", "Pump.fun stream"]
---

# Pump.fun gRPC Streams

Real-time streaming of Pump.fun DEX trades, orders, and transactions via CoreCast gRPC API.
Expand Down
5 changes: 3 additions & 2 deletions docs/grpc/solana/introduction.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: CoreCast - Smart Solana gRPC Streams
description: Low-latency, context-aware, topic-wise streaming from Bitquery for onchain data over gRPC.
title: "Solana gRPC Streams - CoreCast Real-Time DEX, Transfers, Transactions"
description: "grpc solana, solana grpc: Bitquery CoreCast streams for real-time DEX trades, transfers, transactions. Low-latency protobuf. Pump.fun, Raydium, Orca."
keywords: ["grpc solana", "solana grpc", "CoreCast", "Solana gRPC stream", "Solana real-time data"]
---

# CoreCast - Smart Solana gRPC Streams
Expand Down
58 changes: 58 additions & 0 deletions docs/grpc/solana/topics/balance.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,56 @@
---
title: "Solana Balance Updates - gRPC Stream (CoreCast)"
description: "Real-time balance updates via Solana gRPC. Filter by address, token. Protobuf."
keywords: ["solana grpc", "grpc solana", "CoreCast", "Solana balance stream"]
---

# Solana Balance Updates gRPC Stream

The `balance` gRPC Stream provides real-time balance update data for Solana accounts and token accounts.

---

## Overview

Subscribe to live balance changes for accounts and token accounts. Each event includes pre/post balances, currency details, and account context. Data is in **protobuf format** — use `bitquery-corecast-proto` to parse.

---

## Quick Example (Node.js)

Subscribe to balance updates for WSOL and log each event:

```javascript
const grpc = require('@grpc/grpc-js');
const { loadPackageDefination } = require('bitquery-corecast-proto');

const packageDefinition = loadPackageDefination();
const protoDescriptor = grpc.loadPackageDefinition(packageDefinition);
const CoreCast = protoDescriptor.solana_corecast.CoreCast;

const client = new CoreCast('corecast.bitquery.io', grpc.credentials.createSsl());
const metadata = new grpc.Metadata();
metadata.add('authorization', process.env.BITQUERY_TOKEN || 'YOUR_API_TOKEN');

const request = {
token: { addresses: ['So11111111111111111111111111111111111111112'] } // WSOL
};

const stream = client.BalanceUpdates(request, metadata);
stream.on('data', (msg) => {
if (msg.BalanceUpdate) {
const pre = msg.BalanceUpdate.BalanceUpdate?.PreBalance?.toString() || '0';
const post = msg.BalanceUpdate.BalanceUpdate?.PostBalance?.toString() || '0';
console.log(`Balance: ${pre} -> ${post}`);
}
});
stream.on('error', (err) => console.error(err));
```

Run: `npm install @grpc/grpc-js bitquery-corecast-proto` then `BITQUERY_TOKEN=ory_at_xxx node index.js`

---

## Configuration

To subscribe to balance updates, configure your stream as follows:
Expand Down Expand Up @@ -96,3 +145,12 @@ npm install bitquery-corecast-proto
```

This package includes all necessary protobuf definitions without requiring manual downloads.

---

## Related

- [CoreCast Introduction](https://docs.bitquery.io/docs/grpc/solana/introduction/) — Topics and concepts
- [Transfers gRPC](https://docs.bitquery.io/docs/grpc/solana/topics/transfer/) — Token transfers
- [Solana Balance Updates (GraphQL)](https://docs.bitquery.io/docs/blockchain/Solana/solana-balance-updates/) — WebSocket subscriptions
- [Authorization](https://docs.bitquery.io/docs/grpc/solana/authorisation/) — Token setup
58 changes: 58 additions & 0 deletions docs/grpc/solana/topics/dexorder.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,56 @@
---
title: "Solana DEX Orders - gRPC Stream (CoreCast)"
description: "Real-time DEX order book data via Solana gRPC. OpenBook, Serum. Filter by program, pool, token."
keywords: ["solana grpc", "grpc solana", "CoreCast", "Solana DEX orders", "order book"]
---

# Solana DEX Orders gRPC Stream

The `dex_orders` gRPC Stream provides real-time DEX order placement and execution data across supported Solana protocols.

---

## Overview

Subscribe to live DEX order book events (place, cancel, fill) from OpenBook, Serum, and other order-book DEXs. Each event includes order details, market info, and balance updates. Data is in **protobuf format** — use `bitquery-corecast-proto` to parse.

---

## Quick Example (Node.js)

Subscribe to OpenBook orders and log each event:

```javascript
const grpc = require('@grpc/grpc-js');
const { loadPackageDefination } = require('bitquery-corecast-proto');

const packageDefinition = loadPackageDefination();
const protoDescriptor = grpc.loadPackageDefinition(packageDefinition);
const CoreCast = protoDescriptor.solana_corecast.CoreCast;

const client = new CoreCast('corecast.bitquery.io', grpc.credentials.createSsl());
const metadata = new grpc.Metadata();
metadata.add('authorization', process.env.BITQUERY_TOKEN || 'YOUR_API_TOKEN');

const request = {
program: { addresses: ['opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb'] } // OpenBook v2
};

const stream = client.DexOrders(request, metadata);
stream.on('data', (msg) => {
if (msg.Order) {
const dex = msg.Order.Dex?.ProtocolName || '?';
const side = msg.Order.Order?.BuySide ? 'BUY' : 'SELL';
console.log(`[${dex}] Order: ${side}`);
}
});
stream.on('error', (err) => console.error(err));
```

Run: `npm install @grpc/grpc-js bitquery-corecast-proto` then `BITQUERY_TOKEN=ory_at_xxx node index.js`

---

## Configuration

To subscribe to DEX orders, configure your stream as follows:
Expand Down Expand Up @@ -174,3 +223,12 @@ npm install bitquery-corecast-proto

This package includes all necessary protobuf definitions without requiring manual downloads.

---

## Related

- [CoreCast Introduction](https://docs.bitquery.io/docs/grpc/solana/introduction/) — Topics and concepts
- [DEX Trades gRPC](https://docs.bitquery.io/docs/grpc/solana/topics/dextrades/) — DEX swap stream
- [Copy Trading Bot](https://docs.bitquery.io/docs/grpc/solana/examples/grpc-copy-trading-bot/) — Uses dex_orders
- [Authorization](https://docs.bitquery.io/docs/grpc/solana/authorisation/) — Token setup

58 changes: 58 additions & 0 deletions docs/grpc/solana/topics/dexpools.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,56 @@
---
title: "Solana DEX Pools - gRPC Stream (CoreCast)"
description: "Real-time DEX pool liquidity events via Solana gRPC. Add/remove liquidity, swaps. Protobuf."
keywords: ["solana grpc", "grpc solana", "CoreCast", "Solana DEX pools", "liquidity"]
---

# Solana DEX Pools gRPC Stream

The `dex_pools` gRPC Stream provides real-time DEX pool liquidity and balance change data across supported Solana protocols.

---

## Overview

Subscribe to live DEX pool events: liquidity adds, removes, swaps, and pool creation. Each event includes base/quote changes, market info, and balance updates. Data is in **protobuf format** — use `bitquery-corecast-proto` to parse.

---

## Quick Example (Node.js)

Subscribe to PumpSwap pool events and log each event:

```javascript
const grpc = require('@grpc/grpc-js');
const { loadPackageDefination } = require('bitquery-corecast-proto');

const packageDefinition = loadPackageDefination();
const protoDescriptor = grpc.loadPackageDefinition(packageDefinition);
const CoreCast = protoDescriptor.solana_corecast.CoreCast;

const client = new CoreCast('corecast.bitquery.io', grpc.credentials.createSsl());
const metadata = new grpc.Metadata();
metadata.add('authorization', process.env.BITQUERY_TOKEN || 'YOUR_API_TOKEN');

const request = {
program: { addresses: ['pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA'] } // PumpSwap AMM
};

const stream = client.DexPools(request, metadata);
stream.on('data', (msg) => {
if (msg.PoolEvent) {
const dex = msg.PoolEvent.Dex?.ProtocolName || '?';
const method = msg.PoolEvent.Instruction?.Program?.Method || '?';
console.log(`[${dex}] Pool: ${method}`);
}
});
stream.on('error', (err) => console.error(err));
```

Run: `npm install @grpc/grpc-js bitquery-corecast-proto` then `BITQUERY_TOKEN=ory_at_xxx node index.js`

---

## Configuration

To subscribe to DEX pool events, configure your stream as follows:
Expand Down Expand Up @@ -157,3 +206,12 @@ npm install bitquery-corecast-proto
```

This package includes all necessary protobuf definitions without requiring manual downloads.

---

## Related

- [CoreCast Introduction](https://docs.bitquery.io/docs/grpc/solana/introduction/) — Topics and concepts
- [DEX Trades gRPC](https://docs.bitquery.io/docs/grpc/solana/topics/dextrades/) — DEX swap stream
- [Pump.fun gRPC Example](https://docs.bitquery.io/docs/grpc/solana/examples/pump-fun-grpc-streams/) — Uses dex_pools
- [Authorization](https://docs.bitquery.io/docs/grpc/solana/authorisation/) — Token setup
Loading