Skip to content

Commit

Permalink
feat: adds support for setting transport managers and sending sell or…
Browse files Browse the repository at this point in the history
…ders
  • Loading branch information
jmgilman committed May 24, 2024
1 parent 0af84d6 commit 647bdb4
Show file tree
Hide file tree
Showing 7 changed files with 3,582 additions and 8 deletions.
24 changes: 24 additions & 0 deletions pymerc/api/models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,3 +754,27 @@ class Producer(BaseModel):
recipe: Recipe
reference: str
target: Optional[float] = None


class ItemTrade(BaseModel):
"""Data for buying/selling an item."""

direction: str
expected_balance: float
operation: str
price: float
volume: int


class ItemTradeResult(BaseModel):
"""Result of buying/selling an item."""

settlements: Optional[list[ItemTradeSettlement]] = None
order_id: Optional[int] = None


class ItemTradeSettlement(BaseModel):
"""Settlement of an item trade."""

volume: int
price: float
Loading

0 comments on commit 647bdb4

Please sign in to comment.