fix: Remove agreed_price from price API response
The agreed_price depends on trade direction (buy/sell) and must be calculated on the frontend. Returning a buy-side-only agreed_price from the API was misleading and unused. Frontend already calculates the direction-aware price correctly.
This commit is contained in:
parent
1008eea2d9
commit
bf57fc6b77
7 changed files with 640 additions and 270 deletions
|
|
@ -98,8 +98,7 @@ class TestExchangePriceEndpoint:
|
|||
assert "config" in data
|
||||
assert data["price"]["market_price"] == 20000.0
|
||||
assert data["price"]["premium_percentage"] == 5
|
||||
# Agreed price should be market * 1.05 (5% premium)
|
||||
assert data["price"]["agreed_price"] == pytest.approx(21000.0, rel=0.001)
|
||||
# Note: agreed_price is calculated on frontend based on direction (buy/sell)
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_admin_cannot_get_price(self, client_factory, admin_user):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue