Given the following CSV data 

Can you (a) determine what the user's profit must be so far? Current mark price of BTC is $62700

(b) provide a Python to do this automatically

Note that each time the user opened a long on BTC, he paid approx $10. Although this gets put in the 'closed PnL' column, that column is used both for commission/fees (as it is in this case) AND for actual profit. If you're getting a closed PnL right at the time of opening a long, it's obviously fees

time,coin,dir,px,sz,ntl,fee,closedPnl
04/10/2024 - 01:10:47,BTC,Open Long,60786,0.25,15196.5,5.106024,-5.106024
04/10/2024 - 01:10:51,BTC,Open Long,60788,0.25,15197,5.106192,-5.106192
04/10/2024 - 01:12:25,BTC,Open Long,60805,0.5,30402.5,10.215238,-10.215238
04/10/2024 - 01:12:32,BTC,Open Long,60813.68,0.5,30406.84,10.216697,-10.216697
04/10/2024 - 01:12:36,BTC,Open Long,60814,0.5,30407,10.216752,-10.216752
04/10/2024 - 01:17:15,BTC,Open Long,60863,0.5,30431.5,10.224984,-10.224984
04/10/2024 - 01:17:41,BTC,Open Long,60856,0.5,30428,10.223808,-10.223808
04/10/2024 - 01:17:44,BTC,Open Long,60856,0.5,30428,10.223805,-10.223805
04/10/2024 - 01:19:38,BTC,Open Long,60758,0.5,30379,10.207342,-10.207342
04/10/2024 - 01:24:08,BTC,Open Long,60834,0.5,30417,10.220109,-10.220109
04/10/2024 - 01:24:11,BTC,Open Long,60835.1968,0.5,30417.5984,10.220307,-10.220307
04/10/2024 - 01:25:01,BTC,Open Long,60844,0.5,30422,10.22179,-10.22179
04/10/2024 - 01:25:03,BTC,Open Long,60844,0.5,30422,10.221789,-10.221789
04/10/2024 - 01:51:33,BTC,Open Long,60877.6182,0.5,30438.8091,10.227436,-10.227436
04/10/2024 - 01:58:11,BTC,Open Long,60900.06574,0.5,30450.03287,10.231207,-10.231207
04/10/2024 - 02:37:26,BTC,Open Long,60747,0.5,30373.5,10.205494,-10.205494
04/10/2024 - 02:37:28,BTC,Open Long,60747,0.5,30373.5,10.205494,-10.205494
04/10/2024 - 02:37:43,BTC,Open Long,60752,0.5,30376,10.206334,-10.206334
04/10/2024 - 02:37:47,BTC,Open Long,60754.3236,0.5,30377.1618,10.206724,-10.206724
04/10/2024 - 02:38:49,BTC,Open Long,60800.92002,0.5,30400.46001,10.214553,-10.214553
04/10/2024 - 02:38:52,BTC,Open Long,60801,0.5,30400.5,10.214568,-10.214568
04/10/2024 - 02:41:29,BTC,Open Long,60830,0.5,30415,10.219438,-10.219438
04/10/2024 - 02:41:33,BTC,Open Long,60830,0.5,30415,10.219438,-10.219438
04/10/2024 - 02:46:51,BTC,Open Long,60803,0.5,30401.5,10.214902,-10.214902
04/10/2024 - 02:46:55,BTC,Open Long,60807,0.5,30403.5,10.215576,-10.215576
04/10/2024 - 02:47:06,BTC,Open Long,60811.41328,0.5,30405.70664,10.216316,-10.216316
04/10/2024 - 02:48:49,BTC,Open Long,60803.68422,0.5,30401.84211,10.215015,-10.215015
04/10/2024 - 02:48:56,BTC,Open Long,60801,0.5,30400.5,10.214566,-10.214566
04/10/2024 - 02:51:01,BTC,Open Long,60771,0.5,30385.5,10.209528,-10.209528
04/10/2024 - 02:59:31,BTC,Open Long,60761,0.5,30380.5,10.207848,-10.207848
04/10/2024 - 03:03:45,BTC,Open Long,60785,0.5,30392.5,10.21188,-10.21188
04/10/2024 - 03:03:48,BTC,Open Long,60786,0.5,30393,10.212048,-10.212048
04/10/2024 - 03:04:04,BTC,Open Long,60771,0.5,30385.5,10.209528,-10.209528
04/10/2024 - 03:04:08,BTC,Open Long,60771,0.5,30385.5,10.209525,-10.209525
04/10/2024 - 03:05:57,BTC,Open Long,60781.7205,0.5,30390.86025,10.211324,-10.211324
04/10/2024 - 03:06:12,BTC,Open Long,60784,0.5,30392,10.211712,-10.211712
04/10/2024 - 18:01:08,BTC,Open Long,61261,0.5,30630.5,10.291848,-10.291848
04/10/2024 - 18:01:20,BTC,Open Long,61241,0.5,30620.5,10.288486,-10.288486
06/10/2024 - 22:20:09,BTC,Open Long,62841.18822,0.5,31420.59411,10.557315,-10.557315
06/10/2024 - 22:20:12,BTC,Open Long,62842,0.5,31421,10.557456,-10.557456
06/10/2024 - 22:20:20,BTC,Open Long,62836,0.5,31418,10.556446,-10.556446
06/10/2024 - 22:20:24,BTC,Open Long,62831,0.5,31415.5,10.555606,-10.555606
06/10/2024 - 22:20:50,BTC,Open Long,62831,0.5,31415.5,10.555608,-10.555608
06/10/2024 - 22:20:52,BTC,Open Long,62831,0.5,31415.5,10.555605,-10.555605
06/10/2024 - 22:20:56,BTC,Open Long,62843,0.5,31421.5,10.557621,-10.557621
06/10/2024 - 22:21:00,BTC,Open Long,62843,0.5,31421.5,10.557619,-10.557619
06/10/2024 - 22:22:03,BTC,Open Long,62851.53816,0.5,31425.76908,10.559053,-10.559053
06/10/2024 - 22:22:06,BTC,Open Long,62854,0.5,31427,10.55947,-10.55947
06/10/2024 - 22:22:36,BTC,Open Long,62858,0.5,31429,10.560144,-10.560144
06/10/2024 - 22:22:40,BTC,Open Long,62858,0.5,31429,10.560142,-10.560142
06/10/2024 - 22:23:18,BTC,Open Long,62845.15908,0.5,31422.57954,10.55798,-10.55798
06/10/2024 - 22:23:44,BTC,Open Long,62857,0.5,31428.5,10.559974,-10.559974
06/10/2024 - 22:28:01,BTC,Open Long,62890,0.5,31445,10.565516,-10.565516
06/10/2024 - 22:28:03,BTC,Open Long,62886,0.5,31443,10.564845,-10.564845
06/10/2024 - 22:28:18,BTC,Open Long,62886,0.5,31443,10.564848,-10.564848
06/10/2024 - 22:28:34,BTC,Open Long,62900,0.5,31450,10.567196,-10.567196
06/10/2024 - 22:28:37,BTC,Open Long,62901,0.5,31450.5,10.567365,-10.567365
06/10/2024 - 22:28:40,BTC,Open Long,62901,0.5,31450.5,10.567368,-10.567368
06/10/2024 - 22:28:42,BTC,Open Long,62898,0.5,31449,10.566863,-10.566863
06/10/2024 - 22:34:46,BTC,Open Long,62787,0.5,31393.5,10.548214,-10.548214
06/10/2024 - 22:34:49,BTC,Open Long,62790,0.5,31395,10.548717,-10.548717
06/10/2024 - 22:34:53,BTC,Open Long,62791,0.5,31395.5,10.548886,-10.548886
06/10/2024 - 22:34:58,BTC,Open Long,62791,0.5,31395.5,10.548886,-10.548886
06/10/2024 - 22:35:19,BTC,Open Long,62804.6,0.5,31402.3,10.55117,-10.55117
06/10/2024 - 22:35:21,BTC,Open Long,62803.999,0.5,31401.9995,10.551067,-10.551067
06/10/2024 - 22:35:27,BTC,Open Long,62794,0.5,31397,10.54939,-10.54939
06/10/2024 - 22:37:11,BTC,Open Long,62821,0.5,31410.5,10.553928,-10.553928
06/10/2024 - 22:37:44,BTC,Open Long,62791,0.5,31395.5,10.548886,-10.548886
06/10/2024 - 22:37:46,BTC,Open Long,62791.73274,0.5,31395.86637,10.549007,-10.549007
06/10/2024 - 22:40:16,BTC,Open Long,62786,0.5,31393,10.548048,-10.548048
06/10/2024 - 22:40:18,BTC,Open Long,62786,0.5,31393,10.548047,-10.548047
06/10/2024 - 22:42:56,BTC,Open Long,62734,0.5,31367,10.53931,-10.53931
06/10/2024 - 22:42:58,BTC,Open Long,62734,0.5,31367,10.539308,-10.539308
06/10/2024 - 22:43:17,BTC,Open Long,62734,0.5,31367,10.539309,-10.539309
06/10/2024 - 22:43:37,BTC,Open Long,62734,0.5,31367,10.53931,-10.53931
06/10/2024 - 22:43:55,BTC,Open Long,62743.2115,0.5,31371.60575,10.540853,-10.540853
06/10/2024 - 22:44:10,BTC,Open Long,62746,0.5,31373,10.541328,-10.541328
06/10/2024 - 22:44:24,BTC,Open Long,62746,0.5,31373,10.541326,-10.541326
06/10/2024 - 22:46:00,BTC,Open Long,62740,0.5,31370,10.540319,-10.540319
06/10/2024 - 22:46:03,BTC,Open Long,62740,0.5,31370,10.540318,-10.540318
06/10/2024 - 22:46:13,BTC,Open Long,62746,0.5,31373,10.541328,-10.541328
06/10/2024 - 22:46:42,BTC,Close Long,62745,0.25,15686.25,5.270578,206.904422
06/10/2024 - 22:46:44,BTC,Close Long,62745,0.25,15686.25,5.270579,206.904421
06/10/2024 - 22:46:52,BTC,Close Long,62742,0.25,15685.5,5.270328,206.154672
06/10/2024 - 22:46:54,BTC,Close Long,62742.08444,0.25,15685.52111,5.27033,206.17578
06/10/2024 - 22:47:00,BTC,Close Long,62749,0.25,15687.25,5.270915,207.904085
06/10/2024 - 22:47:03,BTC,Close Long,62756,0.25,15689,5.271504,209.65349600000002