Quote Server API ================ A simple API for generating price quotes with threshold validation and cryptographic signatures. ===[ Endpoint ]=== GET /api/quote Generate a price quote for a given timestamp and threshold price. Query Parameters: - ts (integer, optional): Timestamp for the quote (Unix timestamp in seconds). Defaults to current time. - th (integer, required): Threshold price for quote validation. Must be positive. Example Request: curl "http://localhost:8080/api/quote?ts=1718534400&th=50000" ===[ Response Format ]=== The API returns a JSON object with price data and cryptographic signatures. The response includes: - Quote information (price, timestamp, origin) - Latest price data - Event data (if quote has expired) - Cryptographic signatures and hashes - Server identification (network, public key) Example Response: { "is_expired": false, "srv_network": "test", "srv_pubkey": "03a1b2c3d4e5f6...", "quote_origin": "generator", "quote_price": 50000, "quote_stamp": 1718534400, "latest_origin": "generator", "latest_price": 50000, "latest_stamp": 1718534400, "event_origin": null, "event_price": null, "event_stamp": null, "event_type": "none", "thold_hash": "sha256_hash_here", "thold_key": null, "thold_price": 50000 } ===[ Usage Examples ]=== Basic Quote Request: curl "http://localhost:8080/api/quote?th=50000" Quote for Specific Timestamp: curl "http://localhost:8080/api/quote?ts=1718534400&th=50000" ===[ Error Responses ]=== 400 Bad Request - Invalid parameters: invalid threshold: abc 400 Bad Request - Quote generation failed: invalid quote: price fetch failed 500 Internal Server Error: unknown error --- For detailed API specification, see the OpenAPI/Swagger documentation.