# bloXroute: Websocket Endpoints

### Subscribe to recently used tip amounts

This subscription provides you with percentiles for recently used tips.

{% hint style="warning" %}
Please note that using a suggested tip amount does not guarantee your transaction will be included in the next block.
{% endhint %}

**Example request**

```
wscat --header "X-TOKEN: your_token" \
	-c wss://solana-rpc.rpcfast.net/ws/trader \
	--wait 1000000 \
  --execute '{"jsonrpc": "2.0", "id": 1, "method": "subscribe", "params": ["GetBundleTipStream", {}]}'
```

**Request format**

```
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "subscribe",
  "params": ["GetBundleTipStream", {}]
}
```

**Response format**

```
{
	"jsonrpc": "2.0",
	"method": "subscribe",
	"params": {
		"subscription": "044d3209-0dd6-4a72-acee-9f80a19b48a1",
		"result": {
			"timestamp": null,
			"percentile25": 1.91875e-06,
			"percentile50": 1e-05,
			"percentile75": 3.719075e-05,
			"percentile95": 0.00099338365,
			"percentile99": 0.013046900000000005,
			"emaPercentile50": 1.0000062827311115e-05
		}
	}
}
```

**Event result format**

| **Field**         | **Type** | **Description**                                                           |
| ----------------- | -------- | ------------------------------------------------------------------------- |
| `timestamp`       | string   | The timestamp when the sample was taken                                   |
| `percentile25`    | uint64   | How much tip was paid at the 25th percentile                              |
| `percentile50`    | uint64   | How much tip was paid at the 50th percentile                              |
| `percentile75`    | uint64   | How much tip was paid at the 75th percentile                              |
| `percentile95`    | uint64   | How much tip was paid at the 95th percentile                              |
| `percentile99`    | uint64   | How much tip was paid at the 99th percentile                              |
| `emaPercentile50` | uint64   | The 1-minute Exponential Moving Average (EMA) for the 50th percentile tip |

### Subscribe to transaction priority fee stream

This subscription provides you recent priority fee based on the project over the last 100 slots.

{% hint style="warning" %}
Please note that using a suggested priority fee does not guarantee your transaction will be included in the next block.
{% endhint %}

**Example request**

```
wscat --header "X-TOKEN: your_token" \
	-c wss://solana-rpc.rpcfast.net/ws/trader \
	--wait 1000000 \
  --execute '{"jsonrpc": "2.0", "id": 1, "method": "subscribe", "params": ["GetPriorityFeeStream", {}]}'
```

**Request format**

```
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "subscribe",
  "params": [
    "GetPriorityFeeStream",
    {
      "project": "P_RAYDIUM"
    }
  ]
}
```

**Extra parameters**

<table data-header-hidden><thead><tr><th></th><th width="102"></th><th></th><th></th><th></th></tr></thead><tbody><tr><td><strong>Parameter</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td><td>Allowed values</td><td>Optional</td></tr><tr><td><code>project</code></td><td>enum</td><td>Specify which project to fetch the recent priority fee for</td><td><code>"P_JUPITER"</code>,<code>"P_RAYDIUM"</code></td><td>no</td></tr><tr><td><code>percentile</code></td><td>double</td><td>Specify how much percentile of the previous <strong>100</strong> slot's priority fee. Use <code>90</code>, if you want the top 90% percentile. Default value is <code>55</code></td><td></td><td>yes</td></tr></tbody></table>

**Response format**

```
{
    "jsonrpc": "2.0",
    "method": "subscribe",
    "params": {
        "subscription": "f29bc4fa-1c0a-42e2-b9b0-1684e6fa8b63",
        "result": {
            "project": "P_JUPITER", 
            "percentile": 55, 
            "feeAtPercentile": "71428"
        }
    }
}

```
