You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
632 B

  1. //
  2. // ChartAPI.h
  3. // HC
  4. //
  5. // Created by huilinLi on 2025/12/15.
  6. //
  7. #import <Foundation/Foundation.h>
  8. @class StockKLineModel; // 前向声明 Model
  9. // 定义业务回调,直接返回转换好的 Model 数组,而不是原始 JSON
  10. typedef void(^KLineDataSuccess)(NSArray<StockKLineModel *> *kLineData);
  11. typedef void(^APIError)(NSString *errorMessage);
  12. @interface ChartAPI : NSObject
  13. // 获取 K 线数据
  14. + (void)fetchKLineDataWithSymbol:(NSString *)symbol
  15. type:(NSString *)type
  16. success:(KLineDataSuccess)success
  17. failure:(APIError)failure;
  18. @end