Phase 1.4: Update frontend types
Regenerate API types from OpenAPI schema with new: - ExchangeStatus enum - TradeDirection enum - ExchangeConfigResponse schema - PriceResponse schema - ExchangePriceResponse schema - GET /api/exchange/price endpoint
This commit is contained in:
parent
2702b66fd2
commit
d88d69cf9f
1 changed files with 92 additions and 0 deletions
|
|
@ -124,6 +124,35 @@ export interface paths {
|
|||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/api/exchange/price": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
/**
|
||||
* Get Exchange Price
|
||||
* @description Get the current BTC/EUR price for trading.
|
||||
*
|
||||
* Returns the latest price from the database. If no price exists or the price
|
||||
* is stale, attempts to fetch a fresh price from Bitfinex.
|
||||
*
|
||||
* The response includes:
|
||||
* - market_price: The raw price from the exchange
|
||||
* - agreed_price: The price with admin premium applied
|
||||
* - is_stale: Whether the price is older than 5 minutes
|
||||
* - config: Trading configuration (min/max EUR, increment)
|
||||
*/
|
||||
get: operations["get_exchange_price_api_exchange_price_get"];
|
||||
put?: never;
|
||||
post?: never;
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/api/profile": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
|
|
@ -574,6 +603,30 @@ export interface components {
|
|||
/** Target Dates */
|
||||
target_dates: string[];
|
||||
};
|
||||
/**
|
||||
* ExchangeConfigResponse
|
||||
* @description Exchange configuration for the frontend.
|
||||
*/
|
||||
ExchangeConfigResponse: {
|
||||
/** Eur Min */
|
||||
eur_min: number;
|
||||
/** Eur Max */
|
||||
eur_max: number;
|
||||
/** Eur Increment */
|
||||
eur_increment: number;
|
||||
/** Premium Percentage */
|
||||
premium_percentage: number;
|
||||
};
|
||||
/**
|
||||
* ExchangePriceResponse
|
||||
* @description Combined price and configuration response.
|
||||
*/
|
||||
ExchangePriceResponse: {
|
||||
price: components["schemas"]["PriceResponse"] | null;
|
||||
config: components["schemas"]["ExchangeConfigResponse"];
|
||||
/** Error */
|
||||
error?: string | null;
|
||||
};
|
||||
/** HTTPValidationError */
|
||||
HTTPValidationError: {
|
||||
/** Detail */
|
||||
|
|
@ -690,6 +743,25 @@ export interface components {
|
|||
*/
|
||||
created_at: string;
|
||||
};
|
||||
/**
|
||||
* PriceResponse
|
||||
* @description Current BTC/EUR price with premium applied.
|
||||
*/
|
||||
PriceResponse: {
|
||||
/** Market Price */
|
||||
market_price: number;
|
||||
/** Agreed Price */
|
||||
agreed_price: number;
|
||||
/** Premium Percentage */
|
||||
premium_percentage: number;
|
||||
/**
|
||||
* Timestamp
|
||||
* Format: date-time
|
||||
*/
|
||||
timestamp: string;
|
||||
/** Is Stale */
|
||||
is_stale: boolean;
|
||||
};
|
||||
/**
|
||||
* ProfileResponse
|
||||
* @description Response model for profile data.
|
||||
|
|
@ -978,6 +1050,26 @@ export interface operations {
|
|||
};
|
||||
};
|
||||
};
|
||||
get_exchange_price_api_exchange_price_get: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description Successful Response */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["ExchangePriceResponse"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
get_profile_api_profile_get: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue