> For the complete documentation index, see [llms.txt](https://docs.cryptostats.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cryptostats.dev/streaming/optimal-execution.md).

# 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)
