index.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import http from '@/services/http'
  2. import { RequestConfig } from '@/services/http/types'
  3. /**
  4. * 实时行情
  5. */
  6. export function quoteSubscribe(config: RequestConfig<Model.QuoteSubscribeReq> = {}) {
  7. return http.goRequest({
  8. method: 'post',
  9. url: '/Quote/QuoteSubscribe',
  10. data: config.data,
  11. })
  12. }
  13. /**
  14. * 查询行情历史数据
  15. */
  16. export function queryHistoryDatas(config: RequestConfig<Model.HistoryDatasReq> = {}) {
  17. return http.commonRequest<Model.HistoryDatasRsp[]>({
  18. url: '/Quote/QueryHistoryDatas',
  19. params: config.data,
  20. })
  21. }
  22. /**
  23. * 分时图数据查询
  24. */
  25. export function queryTSData(config: RequestConfig<Model.TSDataReq> = {}) {
  26. return http.commonRequest<Model.TSDataRsp>({
  27. url: '/Quote/QueryTSData',
  28. params: config.data,
  29. })
  30. }
  31. /**
  32. * 查询行情Tik数据
  33. */
  34. export function queryHistoryTikDatas(config: RequestConfig<Model.HistoryTikDatasReq> = {}) {
  35. return http.commonRequest<Model.HistoryTikDatasRsp[]>({
  36. url: '/Quote/QueryHistoryTikDatas',
  37. params: config.data,
  38. })
  39. }