It is not possible to know the current amount of spread. You can code a strategy to not trade at times when spread is known to be large such as when a market is closed or you can allow for fixed levels of spread at different times of the day to be considered in your code but you cannot know if for example spread has suddenly widened due to high volatility.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok