https://www.bitmex.com/app/swapsGuide#premium-index?
Funding occurs every 8 hours at 04:00 UTC, 12:00 UTC and 20:00 UTC. You will only pay or receive funding if you hold a position at one of these times. If you close your position prior to the funding exchange then you will not pay or receive funding.
The funding you pay or receive is calculated as:
Your position value is irrespective of leverage. For example, if you hold 100 XBTUSD contracts, funding is charged/received on the notional value of those contracts, and is not based on how much margin you have assigned to the position.
When the Funding Rate
is positive, longs pay shorts. When it is negative, shorts pay longs. See examples.