Add bitcoin_transfer_method to ExchangeRequest and response schemas

This commit is contained in:
counterweight 2025-12-23 14:36:39 +01:00
parent e1c7c5209f
commit d82829ab40
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
2 changed files with 5 additions and 0 deletions

View file

@ -170,6 +170,7 @@ def _to_exchange_response(
slot_start=exchange.slot_start,
slot_end=exchange.slot_end,
direction=exchange.direction.value,
bitcoin_transfer_method=exchange.bitcoin_transfer_method.value,
eur_amount=exchange.eur_amount,
sats_amount=exchange.sats_amount,
market_price_eur=exchange.market_price_eur,
@ -588,6 +589,7 @@ def _to_admin_exchange_response(exchange: Exchange) -> AdminExchangeResponse:
slot_start=exchange.slot_start,
slot_end=exchange.slot_end,
direction=exchange.direction.value,
bitcoin_transfer_method=exchange.bitcoin_transfer_method.value,
eur_amount=exchange.eur_amount,
sats_amount=exchange.sats_amount,
market_price_eur=exchange.market_price_eur,

View file

@ -198,6 +198,7 @@ class ExchangeRequest(BaseModel):
slot_start: datetime
direction: str # "buy" or "sell"
bitcoin_transfer_method: str # "onchain" or "lightning"
eur_amount: int # EUR cents (e.g., 10000 = €100)
@ -210,6 +211,7 @@ class ExchangeResponse(BaseModel):
slot_start: datetime
slot_end: datetime
direction: str
bitcoin_transfer_method: str
eur_amount: int # EUR cents
sats_amount: int # Satoshis
market_price_eur: float
@ -241,6 +243,7 @@ class AdminExchangeResponse(BaseModel):
slot_start: datetime
slot_end: datetime
direction: str
bitcoin_transfer_method: str
eur_amount: int
sats_amount: int
market_price_eur: float