question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FTX futures entryprice for position not working

See original GitHub issue
  • UBUNTU:
  • PYTHON 3.9
  • CCXT version:1.30.34
while True:
   positions = ccxt_bot.private_get_positions()['result']
   position = postions[0]
   print(position)
   

This gives me different output for my position entryPrice https://prnt.sc/wk8suj https://prnt.sc/wk8x90

Hovewer I hold just 1 position: https://prnt.sc/wk8xvl https://prnt.sc/wk8y7t

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
diwenshi61commented, Jan 10, 2021

Should be fetchMyTrades.

1reaction
diwenshi61commented, Jan 10, 2021

You may calculate the original values yourself using the get_positions endpoint, or you can keep track of historical entryPrice yourself. You probably want to look at the fills endpoint (https://docs.ftx.com/#fills) as it seems to be more useful for your purposes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PnL, Average Open Price, and Break-Even Price
Your percentage PnL for futures is PnL / position size. ... Average Open Price = Opening Cost / Opening Size. Break-Even Price.
Read more >
Complete Futures Specs - FTX Exchange
Fills modify position sizes and cost. Fills only affect unrealized pnl, not realized pnl. Position entry price = cost / size. Unrealized pnl: ......
Read more >
Collateral Management - FTX Exchange
We follow a multi-currency cross-margining methodology and thereby accept a variety of non-USD assets as collateral for derivatives and spot ...
Read more >
Profit & Loss Calculation - FTX EU
Fills modify position sizes and cost. Fills only affect unrealized pnl, not realized pnl. Position entry price = cost / size. Unrealized pnl: ......
Read more >
Settlement & Delivery - FTX Exchange
Settlement is the time when futures positions are closed down and are ... So even if it's not during settlement, you will still...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found