Does the spread include fees?
No. The spread uses the prices both legs can fill at right now. Trading fees, funding and withdrawal fees are separate.
How the spread is calculated
The Open spread uses the prices both legs can fill at immediately: the long leg buys at the best ask and the short leg sells at the best bid, divided by the long leg price. It already covers the gap between bids and asks. It doesn't include the costs below.
Costs not included
trading fee: each leg fills once to open and once to close, four fills in total, charged at your fee rate on each exchange.
funding fee: settled every period while you hold a perpetual position. You may receive or pay it depending on the net funding. See How net funding is calculated.
withdrawal fee: only when you need to move coins between exchanges.
To judge whether an opportunity is worth taking, subtract the four trading fees from the Open spread, then check whether you receive or pay funding while holding. For the closing price, look at the Close spread. See Open spread vs close spread.