GET Price Range
/price-range
/price-range/{symbol}Example Query:
https://base-hedger82.rasa.capital/price-range/BTCUSDTExample Response:
{
"min_price": "1113.60",
"max_price": "754960.6666666666666666666668176588"
}Data Source
The min_price and max_price are configured by the hedger but must align with the price range of the external exchange where the hedger is actively hedging (e.g., Binance, Bybit).
min_price: The minimum acceptable order price for the symbol (in quote currency, e.g., USDT). Derived from the external exchange’s current price floor or liquidity constraints.
Example:
"1113.60"→ Orders below this price are rejected.
max_price: The maximum acceptable order price for the symbol. Reflects the hedging platform’s upper price limit.
Price Range Implementation (Rasa)
Router
Reads the exchange’s order-book or recent trades (via the Binance API or a cached copy).
Computes a safe min_price (floor) and max_price (ceiling) for new orders.
Steps to Implement Your Own Version
Define the Response Schema
Build Your Condition-Checks Utility
Implement
BinanceConditionChecks.get_price_bounds(symbol, from_stats)to return a tuple(_, _, min_price, max_price).
Add the FastAPI Route
In
common_router, register theGET /price-range/{symbol}endpoint as shown above.Import
symbol_enumfor the path parameter (a class containing all Symbol names), andSymbolPriceRangeInputSchemafor the response.
Last updated
