We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65f0426 commit a7d26e6Copy full SHA for a7d26e6
examples/chain_client/10_SearchLiquidablePositions.py
@@ -5,7 +5,7 @@
5
from pyinjective.core.network import Network
6
7
def adjusted_margin(quantity: Decimal, margin: Decimal, is_long: bool, cumulative_funding_entry: Decimal, cumulative_funding: Decimal) -> Decimal:
8
- unrealized_funding_payment = (cumulative_funding - cumulative_funding_entry) * quantity * (1 if is_long else -1)
+ unrealized_funding_payment = (cumulative_funding - cumulative_funding_entry) * quantity * (-1 if is_long else 1)
9
return margin + unrealized_funding_payment
10
11
async def main() -> None:
0 commit comments