Perpetual Funding vs Trading Profit and Loss
Separate funding transfers from price-driven profit and loss, preserving position size, settlement intervals and the exchange or protocol calculation rules.

Overview
When translating these concepts into an integration, keep the scope described by the wallet history api with the result. The examples in wallet transaction history and smart contract event logs show how the same distinction affects neighbouring data questions.
A perpetual position can gain or lose value from price movement while also paying or receiving funding. Combining these components without labels obscures why the account changed.
Use the venue-specific definition
Funding rates, calculation intervals and position-size conventions vary. Keep mark, index and execution prices separate where the venue distinguishes them. A displayed rate is not necessarily the amount a particular position paid; realised funding depends on the position and the applicable settlement rule.
Worked example: opposite components
A position has a price-driven gain of twenty units over a period and pays three units of funding under the relevant records. Before other costs, the combined effect is seventeen, but the report should retain twenty and negative three separately. Calling seventeen trading price profit hides the funding mechanism.
Reconcile account changes
Track deposits, withdrawals, realised trades, fees and funding as distinct components. Test a position opened partway through an interval and a size change before settlement. Preserve the venue record and rule version. A current funding quote should not be applied retroactively to every historical interval or presented as a guaranteed future cost.
A practical acceptance test
Combine price-driven gain twenty with realised funding negative three and a separately recorded fee. Assert component totals before the final account change. Open the position partway through another interval and use the venue’s actual rule rather than applying a full-period estimate automatically. A current funding quote must not overwrite historical realised funding records.
Questions about the topic
Frequently asked questions
Is funding the same as trade profit?
No. It is a separate component under the venue’s rules.
Can today’s funding rate explain all historical funding?
No. Use interval-specific evidence and position context.
Standards & technical documentation
