# Spread

The spread is the difference between the prices at which you can buy and sell an asset. It is usually displayed as the difference between the best buy price and the best sell price.

## Base spread

The base spread on Gravix is fixed and included in the opening and closing prices of a position. It depends on the asset type and does not change depending on the current ratio of long and short positions.

So, when opening or closing a position, a trader must take into account the base spread in the asset price. If a trader buys an asset, then they must pay a price equal to the current selling price plus the base spread. If a trader sells an asset, then they must sell at a price equal to the current purchase price minus the base spread. For detailed information on the base spread, please refer to the Available Assets page.

pageAvailable Assets## Dynamic spread

Dynamic spread is the difference between the sale and purchase price of an asset. It varies depending on the current number of long and short positions. The spread changes in real time in accordance with the the ratio of long and short positions opened by traders on the platform.

On Gravix, the dynamic spread is taken into account in the opening price of the position, but not in the closing price. Thus, when closing a position, the dynamic spread does not play any role. The closing price depends only on the base spread.

The dynamic spread is calculated as follows:

$Dynamic\,spread\,for\,long = max(0; \cfrac{(Long + 0.5*Long_{new} - Short)}{Depth} * 0.1\%)$

$Dynamic\,spread\,for\,short = max(0; \cfrac{(Short +0.5*Short_{new} - Long)}{Depth} * 0.1\%)$

Where:

Short/Long - the number of short/long positions

$Short_{new}/Long_{new}$ - the size of a new position

Depth - the depth parameter of the asset in question

## Final spread

The final spread is calculated as the sum of the base and dynamic spreads while opening new positions. Conversely, when a position is closed, only the base spread is taken into account while the dynamic is not.

**Formulas for calculating Open price, taking into account spreads:**

$Open\,long\,price = Current\,price*(1+Base\,spread+Dymamic\,spread)$

$Open\,short\,price = Current\,price*(1-Base\,spread-Dymamic\,spread)$

**Formulas for calculating Close price, taking into account spreads:**

$Close\,long\,price = Current\,price*(1-Base\,spread)$

$Close\,short\,price = Current\,price*(1+Base\,spread)$

Last updated