index.ts 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. import http from '@/services/http'
  2. import { RequestConfig } from '@/services/http/types'
  3. /**
  4. * 铁合金现货预售摘牌
  5. */
  6. export function spotPresaleDestingOrder(config: RequestConfig<Partial<Proto.SpotPresaleDestingOrderReq>>) {
  7. return http.mqRequest<Proto.SpotPresaleDestingOrderRsp>({
  8. data: config.data,
  9. requestCode: 'SpotPresaleDestingOrderReq',
  10. responseCode: 'SpotPresaleDestingOrderRsp',
  11. marketId: 64201
  12. })
  13. }
  14. /**
  15. * 铁合金现货预售交收确认
  16. */
  17. export function spotPresaleDeliveryConfirm(config: RequestConfig<Proto.SpotPresaleDeliveryConfirmReq>) {
  18. return http.mqRequest<Proto.SpotPresaleDeliveryConfirmRsp>({
  19. data: config.data,
  20. requestCode: 'SpotPresaleDeliveryConfirmReq',
  21. responseCode: 'SpotPresaleDeliveryConfirmRsp',
  22. marketId: 64201
  23. })
  24. }
  25. /**
  26. * 铁合金现货预售违约确认
  27. */
  28. export function spotPresaleBreachOfContractConfirm(config: RequestConfig<Proto.SpotPresaleBreachOfContractConfirmReq>) {
  29. return http.mqRequest<Proto.SpotPresaleBreachOfContractConfirmRsp>({
  30. data: config.data,
  31. requestCode: 'SpotPresaleBreachOfContractConfirmReq',
  32. responseCode: 'SpotPresaleBreachOfContractConfirmRsp',
  33. marketId: 64201
  34. })
  35. }
  36. /**
  37. * 铁合金现货预售违约申请接口请求
  38. */
  39. export function spotPresaleBreachOfContractApply(config: RequestConfig<Proto.SpotPresaleBreachOfContractApplyReq>) {
  40. return http.mqRequest<Proto.SpotPresaleBreachOfContractApplyRsp>({
  41. data: config.data,
  42. requestCode: 'SpotPresaleBreachOfContractApplyReq',
  43. responseCode: 'SpotPresaleBreachOfContractApplyRsp',
  44. marketId: 64201
  45. })
  46. }
  47. /**
  48. * 铁合金现货预售付款处理接口请求
  49. */
  50. export function spotPresalePlayment(config: RequestConfig<Proto.SpotPresalePlaymentReq>) {
  51. return http.mqRequest<Proto.SpotPresalePlaymentRsp>({
  52. data: config.data,
  53. requestCode: 'SpotPresalePlaymentReq',
  54. responseCode: 'SpotPresalePlaymentRsp',
  55. marketId: 64201
  56. })
  57. }
  58. /**
  59. * 挂牌撤单请求
  60. */
  61. export function wrListingCancelOrder(config: RequestConfig<Proto.WRListingCancelOrderReq>) {
  62. return http.mqRequest<Proto.WRListingCancelOrderRsp>({
  63. data: config.data,
  64. requestCode: 'WRListingCancelOrderReq',
  65. responseCode: 'WRListingCancelOrderRsp',
  66. marketId: 65201
  67. })
  68. }
  69. /**
  70. * 仓单出库申请
  71. */
  72. export function wrOutApply(config: RequestConfig<Proto.WROutApplyReq>) {
  73. return http.mqRequest<Proto.WROutApplyRsp>({
  74. data: config.data,
  75. requestCode: 'WROutApplyReq',
  76. responseCode: 'WROutApplyRsp'
  77. })
  78. }
  79. /**
  80. * 持仓单挂牌请求
  81. */
  82. export function hdWROrder(config: RequestConfig<Proto.HdWROrderReq>) {
  83. return http.mqRequest<Proto.HdWROrderRsp>({
  84. data: config.data,
  85. requestCode: 'HdWROrderReq',
  86. responseCode: 'HdWROrderRsp',
  87. marketId: 17201
  88. })
  89. }
  90. /**
  91. * 持仓单摘牌请求
  92. */
  93. export function hdWRDealOrder(config: RequestConfig<Proto.HdWRDealOrderReq>) {
  94. return http.mqRequest<Proto.HdWRDealOrderRsp>({
  95. data: config.data,
  96. requestCode: 'HdWRDealOrderReq',
  97. responseCode: 'HdWRDealOrderRsp'
  98. })
  99. }
  100. /**
  101. * 铁合金现货预售转让挂牌接口请求
  102. */
  103. export function spotPresaleTransferListing(config: RequestConfig<Proto.SpotPresaleTransferListingReq>) {
  104. return http.mqRequest<Proto.SpotPresaleTransferListingRsp>({
  105. data: config.data,
  106. requestCode: 'SpotPresaleTransferListingReq',
  107. responseCode: 'SpotPresaleTransferListingRsp',
  108. marketId: 64201
  109. })
  110. }
  111. /**
  112. * 铁合金现货预售转让撤销接口请求
  113. */
  114. export function spotPresaleTransferCancel(config: RequestConfig<Proto.SpotPresaleTransferCancelReq>) {
  115. return http.mqRequest<Proto.SpotPresaleTransferCancelRsp>({
  116. data: config.data,
  117. requestCode: 'SpotPresaleTransferCancelReq',
  118. responseCode: 'SpotPresaleTransferCancelRsp',
  119. marketId: 64201
  120. })
  121. }
  122. /**
  123. * 铁合金现货预售转让摘牌接口请求
  124. */
  125. export function spotPresaleTransferDesting(config: RequestConfig<Proto.SpotPresaleTransferDestingReq>) {
  126. return http.mqRequest<Proto.SpotPresaleTransferDestingRsp>({
  127. data: config.data,
  128. requestCode: 'SpotPresaleTransferDestingReq',
  129. responseCode: 'SpotPresaleTransferDestingRsp',
  130. marketId: 64201
  131. })
  132. }
  133. /**
  134. * 铁合金收益支取申请接口请求
  135. */
  136. export function thjProfitDrawApply(config: RequestConfig<Proto.THJProfitDrawApplyReq>) {
  137. return http.mqRequest<Proto.THJProfitDrawApplyRsp>({
  138. data: config.data,
  139. requestCode: 'THJProfitDrawApplyReq',
  140. responseCode: 'THJProfitDrawApplyRsp',
  141. marketId: 65201
  142. })
  143. }
  144. /**
  145. * 铁合金预售点价
  146. */
  147. export function spotPresalePointPrice(config: RequestConfig<Proto.SpotPresalePointPriceReq>) {
  148. return http.mqRequest<Proto.SpotPresalePointPriceRsp>({
  149. data: config.data,
  150. requestCode: 'SpotPresalePointPriceReq',
  151. responseCode: 'SpotPresalePointPriceRsp',
  152. marketId: 64201
  153. })
  154. }
  155. /**
  156. * 挂牌撤单
  157. */
  158. export function cancelOrder(config: RequestConfig<Proto.CancelOrderReq>) {
  159. return http.mqRequest<Proto.CancelOrderRsp>({
  160. data: config.data,
  161. requestCode: 'CancelOrderReq',
  162. responseCode: 'CancelOrderRsp'
  163. })
  164. }
  165. /**
  166. * 交易下单
  167. */
  168. export function order(config: RequestConfig<Proto.OrderReq>) {
  169. console.log(config.data)
  170. return http.mqRequest<Proto.OrderRsp>({
  171. data: config.data,
  172. requestCode: 'OrderReq',
  173. responseCode: 'OrderRsp',
  174. marketId: config.data?.MarketID
  175. })
  176. }
  177. /**
  178. * 按单平仓
  179. */
  180. export function holderClose(config: RequestConfig<Proto.HolderCloseReq>) {
  181. return http.mqRequest<Proto.HolderCloseRsp>({
  182. data: config.data,
  183. requestCode: 'HolderCloseReq',
  184. responseCode: 'HolderCloseRsp',
  185. })
  186. }