'how to get Pnl & cumu_return in my order from CCXT bybit?

I'm doing long & short strategies in BTCUSDT, may I know how to get my order Pnl & cumu_return after I made a closing order ?

I tried to get 'cum_realised_pnl' & 'realised_pnl', but it does not match to my pnl in exchange. thanks!

response = exchange.private_linear_get_position_list({'symbol': market['id']})
linear_positions = response['result']

order = exchange.create_order('BTCUSDT', 'market', 'sell', float(linear_positions[0]['size']), None,
                                              params={'reduce_only': True})
print(order)
                


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source