Contract Trading in Phemex has a leverage feature.
You will need to import it as PnL rather than a trade history from here: https://phemex.com/assets/contract-pnl-details
If the data is not exportable, you can ask the Phemex support or you can copy-paste the table to an excel file.
You can also generate a CSV file now which you can implement via
the Custom Exchange Import with the following setting:
Since the P&L will be imported as deposits and withdrawals, please bulk edit the transaction type to "Derivatives / Futures Profit" and "Derivatives / Futures Loss" as described here: Bulk Edit/Delete - Instructions.