# Optimal Execution

## Execution Plan

{% hint style="warning" %}
Coming Soon
{% endhint %}

This subscription provides a continual summary of the orders required to achieve a given position as a price taker, across exchanges, at the best price after adjusting for fees and liquidity.

This is available for all [Combined Orderbook](/streaming/combined-orderbook.md) pairs, and provides an execution plan of which exchanges to send orders to, at which limit price and the currently available amount of liquidity at that price.

The execution plan can be tailored by providing an amount to execute (given in USD) and either provided continuously or on-demand through subscribe/unsubscribe calls.

```python
# Subscribe to BTCUSD spot execution plan for $100,000
channel = ['BTCUSD spot.executionplan.100000']

# Subscribe to XRPUSD perpetual execution plan for $20,000
channel = ['XRPUSD perpetual.executionplan.20000']
```

## Volume

{% hint style="warning" %}
Coming Soon
{% endhint %}

## Global Best Bid

{% hint style="warning" %}
Coming Soon
{% endhint %}

Get the global, fee-adjusted best bid for a given pair (e.g. BTCUSD) across all exchanges. See [Combined Orderbook.](/streaming/combined-orderbook.md)

## Global Best Ask

{% hint style="warning" %}
Coming Soon
{% endhint %}

Get the global, fee-adjusted best askfor a given pair (e.g. BTCUSD) across all exchanges. See [Combined Orderbook.](/streaming/combined-orderbook.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cryptostats.dev/streaming/optimal-execution.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
