Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "hatchling.build"
urls = { "Homepage" = "https://github.com/ln-markets/sdk-python", "Repository" = "https://github.com/ln-markets/sdk-python", "Bug Tracker" = "https://github.com/ln-markets/sdk-python/issues" }

name = "lnmarkets-sdk"
version = "0.1.0"
version = "0.1.1"
description = "LN Markets API Python SDK"
readme = "README.md"
license = { text = "MIT" }
Expand Down
8 changes: 8 additions & 0 deletions src/lnmarkets_sdk/rest/v3/models/futures_isolated.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ class FuturesTrade(BaseModel, BaseConfig):
running: SkipValidation[bool]
side: SkipValidation[Literal["buy", "sell"]]
stoploss: SkipValidation[float]
sum_cash_in_margin: SkipValidation[float] = Field(
default=0.0,
description="Total amount cashed in from margin over the trade lifetime",
)
sum_cash_in_pl: SkipValidation[float] = Field(
default=0.0,
description="Total amount cashed in from PL over the trade lifetime",
)
sum_funding_fees: SkipValidation[float]
takeprofit: SkipValidation[float]
type: SkipValidation[Literal["limit", "market"]]
Expand Down
2 changes: 2 additions & 0 deletions src/lnmarkets_sdk/rest/v3/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,8 @@ async def test_new_trade(self):
assert trade.opening_fee >= 0
assert trade.closing_fee >= 0
assert trade.sum_funding_fees is not None
assert trade.sum_cash_in_pl is not None
assert trade.sum_cash_in_margin is not None
except Exception as e:
pytest.skip("Could not create a new trade: " + str(e))

Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading