{"openapi":"3.1.0","info":{"title":"Crypto Market Data","version":"1.0.0","description":"A crypto market data agent that exposes live symbols, market metadata, and historical Binance candlesticks.","x-guidance":"Use the default explain_service and ask_question endpoints before calling the paid service endpoint.","contact":{"email":"crypto-market-data@mymail.com"}},"paths":{"/health":{"get":{"operationId":"getHealth","summary":"Health check","description":"Simple check to ensure the application is running.","tags":["Health"],"security":[],"responses":{"200":{"description":"Service is healthy","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"timestamp":{"type":"number","description":"Unix timestamp"}},"required":["status","message"]}}}}}}},"/explain_service":{"get":{"operationId":"explainService","summary":"Get detailed information about this service","tags":["service"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.0015"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"Service information","content":{"application/json":{"schema":{"properties":{"name":{"description":"The name of the agent","title":"Name","type":"string"},"mission":{"description":"The agent's mission and what they can do for you","title":"Mission","type":"string"},"endpoints":{"description":"The agent's service endpoints / You options to interact with the agent","items":{"additionalProperties":true,"type":"object"},"title":"Endpoints","type":"array"}},"required":["name","mission","endpoints"],"title":"ServiceDetailsResponse","type":"object"}}}},"402":{"description":"Payment Required"}}}},"/ask_question":{"post":{"operationId":"askQuestion","summary":"Ask questions before using the service","tags":["service"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"question":{"description":"Ask a question before purchasing the service!","title":"Question","type":"string"}},"required":["question"],"title":"QuestionAboutServiceRequest","type":"object"}}}},"responses":{"200":{"description":"Answer to the question","content":{"application/json":{"schema":{"properties":{"answer":{"description":"The agent's answer to your question.","title":"Answer","type":"string"}},"required":["answer"],"title":"QuestionAboutServiceResponse","type":"object"}}}},"402":{"description":"Payment Required"}}}},"/symbols":{"get":{"operationId":"symbols","summary":"Returns all available trading symbols.","tags":["market-data","symbols"],"responses":{"200":{"description":"Returns all available trading symbols.","content":{"application/json":{"schema":{"properties":{"symbols":{"description":"All available trading symbols.","examples":[["BTCUSDT","ETHUSDT"]],"items":{"type":"string"},"title":"Symbols","type":"array"}},"required":["symbols"],"title":"AllSymbolsResponse","type":"object"}}}}},"security":[]}},"/symbol-info":{"post":{"operationId":"symbolInfo","summary":"Returns trading info for a single symbol.","tags":["market-data","symbols"],"responses":{"200":{"description":"Returns trading info for a single symbol.","content":{"application/json":{"schema":{"properties":{"symbol":{"description":"Trading symbol.","examples":["BTCUSDT"],"title":"Symbol","type":"string"},"status":{"description":"Current trading status of the symbol.","examples":["TRADING"],"title":"Status","type":"string"},"baseAsset":{"description":"Base asset of the trading pair.","examples":["BNB"],"title":"Baseasset","type":"string"},"baseAssetPrecision":{"description":"Number of decimal places supported for the base asset.","examples":[8],"title":"Baseassetprecision","type":"integer"},"quoteAsset":{"description":"Quote asset of the trading pair.","examples":["BTC"],"title":"Quoteasset","type":"string"},"quotePrecision":{"description":"Number of decimal places supported for the quote asset.","examples":[8],"title":"Quoteprecision","type":"integer"},"quoteAssetPrecision":{"description":"Number of decimal places supported for quote-asset amounts.","examples":[8],"title":"Quoteassetprecision","type":"integer"}},"required":["symbol","status","baseAsset","baseAssetPrecision","quoteAsset","quotePrecision","quoteAssetPrecision"],"title":"SymbolInfo","type":"object"}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.00155"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"symbol":{"description":"Trading symbol to look up, e.g. BTCUSDT.","examples":["BTCUSDT"],"pattern":"^[A-Z0-9]+$","title":"Symbol","type":"string"}},"required":["symbol"],"title":"SymbolInfoRequest","type":"object"}}}}}},"/symbol-infos":{"post":{"operationId":"symbolInfos","summary":"Returns trading info for a list of symbols.","tags":["market-data","symbols"],"responses":{"200":{"description":"Returns trading info for a list of symbols.","content":{"application/json":{"schema":{"properties":{"infos":{"additionalProperties":{"$ref":"#/components/schemas/SymbolInfo"},"description":"Trading info for each requested symbol, keyed by symbol.","title":"Infos","type":"object"}},"required":["infos"],"title":"SymbolInfosResponse","type":"object"}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"symbols":{"description":"Trading symbols to look up, e.g. BTCUSDT.","examples":[["BTCUSDT","ETHUSDT"]],"items":{"type":"string"},"maxItems":10,"minItems":2,"title":"Symbols","type":"array"}},"required":["symbols"],"title":"SymbolInfosRequest","type":"object"}}}}}},"/historical-klines":{"post":{"operationId":"historicalKlines","summary":"Returns historical klines (candlesticks) for a symbol within a time range.","tags":["market-data","klines"],"responses":{"200":{"description":"Returns historical klines (candlesticks) for a symbol within a time range.","content":{"application/json":{"schema":{"properties":{"symbol":{"description":"Trading symbol the klines belong to.","examples":["BTCUSDT"],"title":"Symbol","type":"string"},"interval":{"$ref":"#/components/schemas/KlineInterval","description":"Candlestick interval of the returned klines."},"klines":{"description":"List of candlesticks, ordered from oldest to newest.","items":{"$ref":"#/components/schemas/Kline"},"title":"Klines","type":"array"}},"required":["symbol","interval","klines"],"title":"HistoricalKlinesResponse","type":"object"}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"symbol":{"description":"Trading symbol, e.g. BTCUSDT.","examples":["BTCUSDT"],"pattern":"^[A-Z0-9]+$","title":"Symbol","type":"string"},"interval":{"$ref":"#/components/schemas/KlineInterval","default":"1h","description":"Candlestick interval"},"from_time":{"description":"Start of the time range, format: %Y-%m-%d %H:%M","examples":["2024-01-01 00:00"],"title":"From Time","type":"string"},"to_time":{"description":"End of the time range, format: %Y-%m-%d %H:%M","examples":["2024-01-02 00:00"],"title":"To Time","type":"string"}},"required":["symbol","from_time","to_time"],"title":"HistoricalKlinesRequest","type":"object"}}}}}},"/historical-klines/recent":{"post":{"operationId":"historicalKlinesRecent","summary":"Returns the most recent n klines (candlesticks) for a symbol.","tags":["market-data","klines"],"responses":{"200":{"description":"Returns the most recent n klines (candlesticks) for a symbol.","content":{"application/json":{"schema":{"properties":{"symbol":{"description":"Trading symbol the klines belong to.","examples":["BTCUSDT"],"title":"Symbol","type":"string"},"interval":{"$ref":"#/components/schemas/KlineInterval","description":"Candlestick interval of the returned klines."},"klines":{"description":"List of candlesticks, ordered from oldest to newest.","items":{"$ref":"#/components/schemas/Kline"},"title":"Klines","type":"array"}},"required":["symbol","interval","klines"],"title":"HistoricalKlinesResponse","type":"object"}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"symbol":{"description":"Trading symbol, e.g. BTCUSDT.","examples":["BTCUSDT"],"pattern":"^[A-Z0-9]+$","title":"Symbol","type":"string"},"interval":{"$ref":"#/components/schemas/KlineInterval","default":"1h","description":"Candlestick interval."},"n":{"default":100,"description":"Number of most recent klines to fetch (max 1000).","exclusiveMinimum":0,"maximum":1000,"title":"N","type":"integer"}},"required":["symbol"],"title":"RecentKlinesRequest","type":"object"}}}}}},"/tickers":{"get":{"operationId":"tickers","summary":"Returns the latest price for all symbols.","tags":["market-data","tickers"],"responses":{"200":{"description":"Returns the latest price for all symbols.","content":{"application/json":{"schema":{"properties":{"tickers":{"additionalProperties":{"type":"number"},"description":"Latest price for every symbol, keyed by symbol.","title":"Tickers","type":"object"}},"required":["tickers"],"title":"AllTickersResponse","type":"object"}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{}}]}}}},"components":{"schemas":{"SymbolInfo":{"properties":{"symbol":{"description":"Trading symbol.","examples":["BTCUSDT"],"title":"Symbol","type":"string"},"status":{"description":"Current trading status of the symbol.","examples":["TRADING"],"title":"Status","type":"string"},"baseAsset":{"description":"Base asset of the trading pair.","examples":["BNB"],"title":"Baseasset","type":"string"},"baseAssetPrecision":{"description":"Number of decimal places supported for the base asset.","examples":[8],"title":"Baseassetprecision","type":"integer"},"quoteAsset":{"description":"Quote asset of the trading pair.","examples":["BTC"],"title":"Quoteasset","type":"string"},"quotePrecision":{"description":"Number of decimal places supported for the quote asset.","examples":[8],"title":"Quoteprecision","type":"integer"},"quoteAssetPrecision":{"description":"Number of decimal places supported for quote-asset amounts.","examples":[8],"title":"Quoteassetprecision","type":"integer"}},"required":["symbol","status","baseAsset","baseAssetPrecision","quoteAsset","quotePrecision","quoteAssetPrecision"],"title":"SymbolInfo","type":"object"},"Kline":{"properties":{"open_time":{"description":"Timestamp of the candle's opening.","format":"date-time","title":"Open Time","type":"string"},"open_price":{"description":"Price at the start of the candle.","title":"Open Price","type":"number"},"high_price":{"description":"Highest price reached during the candle.","title":"High Price","type":"number"},"low_price":{"description":"Lowest price reached during the candle.","title":"Low Price","type":"number"},"close_price":{"description":"Price at the end of the candle.","title":"Close Price","type":"number"},"volume":{"description":"Traded volume, in base asset units, during the candle.","title":"Volume","type":"number"},"close_time":{"description":"Timestamp of the candle's closing.","format":"date-time","title":"Close Time","type":"string"},"quote_asset_volume":{"description":"Traded volume, in quote asset units, during the candle.","title":"Quote Asset Volume","type":"number"},"amount_trades":{"description":"Number of trades executed during the candle.","title":"Amount Trades","type":"integer"},"taker_buy_base_volume":{"description":"Base asset volume bought by takers during the candle.","title":"Taker Buy Base Volume","type":"number"},"taker_buy_quote_volume":{"description":"Quote asset volume bought by takers during the candle.","title":"Taker Buy Quote Volume","type":"number"}},"required":["open_time","open_price","high_price","low_price","close_price","volume","close_time","quote_asset_volume","amount_trades","taker_buy_base_volume","taker_buy_quote_volume"],"title":"Kline","type":"object"},"KlineInterval":{"description":"Allowed candlestick intervals.","enum":["1m","3m","5m","15m","30m","1h","2h","4h","6h","8h","12h","1d","3d","1w","1M"],"title":"KlineInterval","type":"string"}}}}