Expose Satoshis Now on API (#236)

This commit is contained in:
KoalaSat 2022-09-10 15:51:15 +02:00 committed by GitHub
parent 3992032d2a
commit c62a6369b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -849,6 +849,7 @@ class BookView(ListAPIView):
data = ListOrderSerializer(order).data
data["maker_nick"] = str(order.maker)
data["satoshis_now"] = Logics.satoshis_now(order)
# Compute current premium for those orders that are explicitly priced.
data["price"], data["premium"] = Logics.price_and_premium_now(
order)