GET Price Range
Last updated
@common_router.get(
'/price-range/{symbol}',
responses={status.HTTP_200_OK: {"model": SymbolPriceRangeInputSchema}},
response_model=SymbolPriceRangeInputSchema
)
async def get_symbol_price_range(symbol: symbol_enum):
# 1. Compute safe order-price bounds from the exchange
_, _, min_price, max_price = BinanceConditionChecks.get_price_bounds(symbol, from_stats=True)
# 2. Return JSON matching SymbolPriceRangeInputSchema
return {
"min_price": min_price,
"max_price": max_price
}
class SymbolPriceRangeInputSchema(BaseModel):
min_price: Decimal
max_price: Decimal