没有不值得去解决的问题,也没有不值得去学习的技术!

How to Calculate Total Profit for a Cryptocurrency Over a Period on OKX

Click on the PnL column and sum it: 421.32. Click on the Fee column and sum it: -5.36. Add the two together to calculate the result: from 2023/8/4 21:48 - 2023/8/16 6:45 over a total of 13 days, the total profit is 421.32 - 5.36 = 415.96

1. I want to calculate the total profit from shorting YGG-USDT-SWAP over the past few months. In the APP, navigate to Assets – Trading Account – Bills. Trade type: Perpetual, Instrument: USDT-margined YGGUSDT perpetual. See Figure 1.

I want to calculate the total profit from shorting YGG-USDT-SWAP over the past few months. In the APP, navigate to Assets - Trading Account - Bills. Trade type: Perpetual, Instrument: USDT-margined YGGUSDT perpetual
Figure 1

2. However, calculating the total profit for a specific time period requires manually adding and subtracting each entry one by one, which is too difficult.

3. On the WEB, go to Trading Account Bills – Order History. Date: 2023-05-17 > 2023-08-17, Coin: USDT; Filter: Perpetual; Contract type: USDT-margined; Instrument: YGGUSDT. See Figure 2.

On the WEB, go to Trading Account Bills - Order History. Date: 2023-05-17 > 2023-08-17, Coin: USDT; Filter: Perpetual; Contract type: USDT-margined; Instrument: YGGUSDT
Figure 2

4. Since the WEB page does not provide a sum for the PnL column, click the Download link. Date: 2023-05-01 > 2023-08-16. See Figure 3.

Since the WEB page does not provide a sum for the PnL column, click the Download link. Date: 2023-05-01 > 2023-08-16
Figure 3

5. Extract the downloaded zip file, open the CSV file, and then filter by Product Name: YGG-USDT-SWAP. See Figure 4.

Extract the downloaded zip file, open the CSV file, and then filter by Product Name: YGG-USDT-SWAP
Figure 4

6. Click on the PnL column and sum it: 421.32. Click on the Fee column and sum it: -5.36. Add the two together to calculate the result: from 2023/8/4 21:48 – 2023/8/16 6:45
over a total of 13 days, the total profit is 421.32 – 5.36 = 415.96. See Figure 5.

Click on the PnL column and sum it: 421.32. Click on the Fee column and sum it: -5.36. Add the two together to calculate the result: from 2023/8/4 21:48 - 2023/8/16 6:45 over a total of 13 days, the total profit is 421.32 - 5.36 = 415.96
Figure 5

7. Filter by Type: Funding fee income, Funding fee expense, click on the PnL column, and sum it: -108.3849. This shows that OKX’s funding fees are genuinely high. For the profit from closing positions, 108.3849/529.7068 = 0.20, meaning about 20% of the short closing profit was spent on funding fees. See Figure 6.

Filter by Type: Funding fee income, Funding fee expense, click on the PnL column, and sum it: -108.3849. This shows that OKX's funding fees are genuinely high. For the profit from closing positions, 108.3849/529.7068 = 0.20, meaning about 20% of the short closing profit was spent on funding fees
Figure 6

关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系