Skip to content

Commit

Permalink
[Community] add LOCAL_ID to positions
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeDSM committed Jan 23, 2025
1 parent 567f90f commit ce5ed51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions octobot/community/models/formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def format_positions(positions: list, exchange_name: str) -> list:
backend_enums.PositionKeys.TIME.value: position[trading_enums.ExchangeConstantsPositionColumns.TIMESTAMP.value],
backend_enums.PositionKeys.POSITION_ID.value: position[trading_enums.ExchangeConstantsPositionColumns.ID.value],
# from trading positions
backend_enums.PositionKeys.LOCAL_ID.value: position[trading_enums.ExchangeConstantsPositionColumns.LOCAL_ID.value],
backend_enums.PositionKeys.SYMBOL.value: position[trading_enums.ExchangeConstantsPositionColumns.SYMBOL.value],
backend_enums.PositionKeys.STATUS.value: position[trading_enums.ExchangeConstantsPositionColumns.STATUS.value],
backend_enums.PositionKeys.SIDE.value: position[trading_enums.ExchangeConstantsPositionColumns.SIDE.value],
Expand Down
1 change: 1 addition & 0 deletions octobot/community/supabase_backend/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ class PositionKeys(enum.Enum):
POSITION_ID = "position_id"
# subset of octobot_trading.enums.ExchangeConstantsPositionColumns
SYMBOL = "symbol"
LOCAL_ID = "local_id"
ENTRY_PRICE = "entry_price"
MARK_PRICE = "mark_price"
LIQUIDATION_PRICE = "liquidation_price"
Expand Down

0 comments on commit ce5ed51

Please sign in to comment.