swagger.yaml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629
  1. basePath: /api
  2. definitions:
  3. app.Response:
  4. properties:
  5. code:
  6. type: integer
  7. data:
  8. type: object
  9. msg:
  10. type: string
  11. type: object
  12. cptrade.Cptradepositioncancel:
  13. properties:
  14. accountid:
  15. description: 申请人账户ID
  16. type: integer
  17. applystatus:
  18. description: 申请状态 - 1:已提交 2:初审通过 3:初审拒绝 4:初审失败 5复审通过 6:复审拒绝 7:复审失败 8:已撤销
  19. type: integer
  20. applytime:
  21. description: 申请时间
  22. type: string
  23. cancelid:
  24. description: 注销ID(SEQ_CPTRADE_POSITIONCANCEL)
  25. type: integer
  26. cancelqty:
  27. description: 注销数量
  28. type: integer
  29. createtime:
  30. description: 创建时间
  31. type: string
  32. creatorid:
  33. description: 创建人ID
  34. type: integer
  35. creatorname:
  36. description: 创建人
  37. type: string
  38. goodscode:
  39. description: 订单商品代码
  40. type: string
  41. goodsid:
  42. description: 商品ID
  43. type: integer
  44. goodsname:
  45. description: 订单商品名称
  46. type: string
  47. goodunit:
  48. description: 报价单位
  49. type: string
  50. handlestatus:
  51. description: 处理状态
  52. type: integer
  53. marketid:
  54. description: 市场ID
  55. type: integer
  56. marketname:
  57. description: 市场名称
  58. type: string
  59. tradedate:
  60. description: 交易日(yyyyMMdd)
  61. type: string
  62. userid:
  63. description: 申请人ID
  64. type: integer
  65. required:
  66. - cancelid
  67. type: object
  68. cptrade.Cptradepresaleapply:
  69. properties:
  70. accountid:
  71. description: 申请人账户ID
  72. type: integer
  73. applyid:
  74. description: 申请ID(181+Unix秒时间戳(10位)+xxxxxx)
  75. type: integer
  76. applystatus:
  77. description: 申请状态 - 1:已提交 2:初审通过 3:初审拒绝 4:初审失败 5复审通过 6:复审拒绝 7:复审失败 8:已撤销
  78. type: integer
  79. applytime:
  80. description: 申请时间
  81. type: string
  82. attachmenturl:
  83. description: 附件地址
  84. type: string
  85. endtime:
  86. description: 预售结束时间
  87. type: string
  88. goodscode:
  89. description: 商品代码
  90. type: string
  91. goodsid:
  92. description: 商品ID
  93. type: integer
  94. goodsname:
  95. description: 商品名称
  96. type: string
  97. goodunit:
  98. description: 报价单位
  99. type: string
  100. handlestatus:
  101. description: 处理状态
  102. type: integer
  103. marketid:
  104. description: 预售市场ID
  105. type: integer
  106. marketname:
  107. description: 预售市场名称
  108. type: string
  109. presaleqty:
  110. description: 预售数量
  111. type: integer
  112. relatedgoodscode:
  113. description: 关联交易合约代码
  114. type: string
  115. relatedgoodsid:
  116. description: 关联交易合约ID
  117. type: integer
  118. relatedgoodsname:
  119. description: 关联交易合约名称
  120. type: string
  121. starttime:
  122. description: 预售开始时间
  123. type: string
  124. tradedate:
  125. description: 交易日(yyyyMMdd)
  126. type: string
  127. trademode:
  128. description: 交易模式 - 16:挂牌点选 21:大宗竞拍
  129. type: integer
  130. userid:
  131. description: 申请人ID
  132. type: integer
  133. required:
  134. - applyid
  135. type: object
  136. cptrade.Cptradeusergoodsdata:
  137. properties:
  138. EnabledQty:
  139. description: 可用量
  140. type: integer
  141. GoodsCode:
  142. description: 订单商品代码
  143. type: string
  144. GoodsName:
  145. description: 订单商品名称
  146. type: string
  147. WRStandardCode:
  148. description: 仓单标准代码
  149. type: string
  150. WRStandardName:
  151. description: 仓单标准名称
  152. type: string
  153. accountid:
  154. description: 账户ID
  155. type: integer
  156. cancelqty:
  157. description: 注销量
  158. type: integer
  159. curpresaleqty:
  160. description: 当前预售量
  161. type: integer
  162. deliveryqty:
  163. description: 交割量
  164. type: integer
  165. freezeamount:
  166. description: 冻结金额
  167. type: number
  168. goodsid:
  169. description: 商品ID
  170. type: integer
  171. goodunit:
  172. description: 报价单位
  173. type: string
  174. hasspotfreeze:
  175. description: 是否有现货冻结 - 0:否 1:有
  176. type: integer
  177. inqty:
  178. description: 转入量(总数量)
  179. type: integer
  180. marketid:
  181. description: 市场ID
  182. type: integer
  183. presaledamount:
  184. description: 已预售总金额
  185. type: integer
  186. presaledqty:
  187. description: 已预售量
  188. type: integer
  189. userid:
  190. description: 用户ID
  191. type: integer
  192. wrstandardid:
  193. description: 仓单标准ID
  194. type: integer
  195. required:
  196. - accountid
  197. - goodsid
  198. type: object
  199. cptrade.QueryCPTradeMyBidRsp:
  200. properties:
  201. accountid:
  202. description: 账户ID[报价币种]
  203. type: integer
  204. goodsid:
  205. description: 商品ID
  206. type: integer
  207. goodunit:
  208. description: 报价单位
  209. type: string
  210. marketid:
  211. description: 市场ID
  212. type: integer
  213. orderid:
  214. description: 委托单号(100+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
  215. type: integer
  216. orderprice:
  217. description: 委托价格
  218. type: number
  219. orderqty:
  220. description: 委托数量
  221. type: integer
  222. ordertime:
  223. description: 委托时间
  224. type: string
  225. ordertotalprice:
  226. description: 货款金额(委托总价格=委托价格*委托数量*合约单位)
  227. type: number
  228. ordertotalweight:
  229. description: 竞拍总重量(委托总重量=委托数量*合约单位)
  230. type: integer
  231. totaltotalprice:
  232. description: 成交货款金额(成交总价格=成交价格*成交数量*合约单位)
  233. type: number
  234. tradeprice:
  235. description: 成交价格
  236. type: number
  237. tradeqty:
  238. description: 成交数量
  239. type: integer
  240. required:
  241. - accountid
  242. - goodsid
  243. - marketid
  244. - orderid
  245. - orderqty
  246. - ordertime
  247. - tradeprice
  248. - tradeqty
  249. type: object
  250. cptrade.QueryPresaleGoodsExRsp:
  251. properties:
  252. attachmenturl:
  253. description: 附件地址
  254. type: string
  255. createtime:
  256. description: 创建时间
  257. type: string
  258. endtime:
  259. description: 预售结束时间
  260. type: string
  261. floorprice:
  262. description: 底价[大宗式竞拍]
  263. type: number
  264. goodsdetail:
  265. description: 详情[大宗]
  266. type: string
  267. goodsid:
  268. description: 商品ID(预售)
  269. type: integer
  270. goodunit:
  271. description: 报价单位
  272. type: string
  273. marketid:
  274. description: 预售市场ID - 根据预售模式选择市场
  275. type: integer
  276. presaledamount:
  277. description: 已预售总金额(预售结束时更新)
  278. type: number
  279. presaledqty:
  280. description: 已预售量(预售结束时更新)
  281. type: integer
  282. presalemode:
  283. description: 预售模式 - 1:一口价 2:大宗式竞拍
  284. type: integer
  285. presaleqty:
  286. description: 预售数量
  287. type: integer
  288. refprice:
  289. description: 参考价格[一口价]
  290. type: number
  291. relatedgoodsid:
  292. description: 关联交易合约ID
  293. type: integer
  294. relatedmarketid:
  295. description: 关联交易合约市场ID
  296. type: integer
  297. sellstatus:
  298. description: 卖方处理状态 - 1:卖方头寸未处理 2:卖方头寸已处理
  299. type: integer
  300. startprice:
  301. description: 起拍价[大宗式竞拍]
  302. type: number
  303. starttime:
  304. description: 预售开始时间
  305. type: string
  306. tradedate:
  307. description: 交易日(yyyyMMdd)
  308. type: string
  309. tradeprice:
  310. description: 成交价[大宗]
  311. type: number
  312. required:
  313. - goodsid
  314. type: object
  315. delivery.QueryDeliveryRelationRsp:
  316. properties:
  317. begindate:
  318. description: 起始日期(yyyyMMdd)
  319. type: string
  320. buytemplateid:
  321. description: 买履约计划模板ID
  322. type: integer
  323. deliverygoodscode:
  324. description: 品种代码
  325. type: string
  326. deliverygoodsid:
  327. description: 交割商品
  328. type: integer
  329. deliverygoodsname:
  330. description: 品种名称
  331. type: string
  332. deliverymode:
  333. description: 交割方式 - 1:点选式 2:申报式
  334. type: integer
  335. deliverypricerule:
  336. description: 交割价规则- 1:行情价 2:建仓价
  337. type: integer
  338. deliverytype:
  339. description: 交割模式 - 1:X交割 2:X+P交割 3:X+C交割 4:X+P+C交割
  340. type: integer
  341. enddate:
  342. description: 结束日期(yyyyMMdd)
  343. type: string
  344. goodscode:
  345. description: 商品代码
  346. type: string
  347. goodsid:
  348. description: 交易合约ID
  349. type: integer
  350. goodsname:
  351. description: 商品名称
  352. type: string
  353. marketid:
  354. description: 市场ID
  355. type: integer
  356. mindeliveryqty:
  357. description: 最小交割系数(K)
  358. type: integer
  359. p2deliveryprice:
  360. description: P2合约价格(商品价时填写0,固定值时填写固定值)
  361. type: number
  362. p2deliveryratio:
  363. description: P2合约系数(p)
  364. type: integer
  365. p2goodsid:
  366. description: P2合约ID
  367. type: integer
  368. p2pricemode:
  369. description: P2合约价格方式 - 1:商品价 2:固定值
  370. type: integer
  371. pdeliveryprice:
  372. description: P合约价格(商品价时填写0,固定值时填写固定值)
  373. type: number
  374. pdeliveryratio:
  375. description: P合约系数(n)
  376. type: integer
  377. pgoodsid:
  378. description: P合约ID
  379. type: integer
  380. ppricemode:
  381. description: P合约价格方式 - 1:商品价 2:固定值
  382. type: integer
  383. rratio:
  384. description: 兑换系数(R)
  385. type: integer
  386. rratio1:
  387. description: 兑换系数(交易合约)(R1)
  388. type: integer
  389. rratio2:
  390. description: 兑换系数(仓单标准)(R2)
  391. type: integer
  392. selltemplateid:
  393. description: 卖履约计划模板ID
  394. type: integer
  395. wrstandardid:
  396. description: 仓单标准ID
  397. type: integer
  398. xdeliveryratio:
  399. description: 交易合约系数(m)
  400. type: integer
  401. required:
  402. - begindate
  403. - enddate
  404. - goodsid
  405. - mindeliveryqty
  406. - xdeliveryratio
  407. type: object
  408. info:
  409. contact: {}
  410. description: 新的查询服务,替代原通用查询服务。
  411. license: {}
  412. termsOfService: http://muchinfo.cn
  413. title: MTP2.0 查询服务 API
  414. version: "1.0"
  415. paths:
  416. /CPTrade/QueryCPTradeMyBidInfos:
  417. get:
  418. parameters:
  419. - description: 资金账户
  420. in: query
  421. name: accountid
  422. required: true
  423. type: integer
  424. - description: 预售市场ID
  425. in: query
  426. name: marketid
  427. type: integer
  428. - description: 预售商品ID
  429. in: query
  430. name: goodsid
  431. type: integer
  432. produces:
  433. - application/json
  434. responses:
  435. "200":
  436. description: OK
  437. schema:
  438. $ref: '#/definitions/cptrade.QueryCPTradeMyBidRsp'
  439. "500":
  440. description: Internal Server Error
  441. schema:
  442. $ref: '#/definitions/app.Response'
  443. security:
  444. - ApiKeyAuth: []
  445. summary: 查询产能预售我的出价信息
  446. tags:
  447. - 产能预售
  448. /CPTrade/QueryPositionCancel:
  449. get:
  450. parameters:
  451. - description: 账户ID
  452. in: query
  453. name: userid
  454. required: true
  455. type: integer
  456. - description: 注销ID
  457. in: query
  458. name: cancelid
  459. type: integer
  460. - description: 资金账户ID
  461. in: query
  462. name: accountid
  463. type: integer
  464. produces:
  465. - application/json
  466. responses:
  467. "200":
  468. description: OK
  469. schema:
  470. $ref: '#/definitions/cptrade.Cptradepositioncancel'
  471. "500":
  472. description: Internal Server Error
  473. schema:
  474. $ref: '#/definitions/app.Response'
  475. security:
  476. - ApiKeyAuth: []
  477. summary: 查询远期订单注销申请信息
  478. tags:
  479. - 产能预售
  480. /CPTrade/QueryPreasleApply:
  481. get:
  482. parameters:
  483. - description: 账户ID
  484. in: query
  485. name: userid
  486. required: true
  487. type: integer
  488. - description: 申请ID
  489. in: query
  490. name: applyid
  491. type: integer
  492. - description: 资金账户ID
  493. in: query
  494. name: accountid
  495. type: integer
  496. produces:
  497. - application/json
  498. responses:
  499. "200":
  500. description: OK
  501. schema:
  502. $ref: '#/definitions/cptrade.Cptradepresaleapply'
  503. "500":
  504. description: Internal Server Error
  505. schema:
  506. $ref: '#/definitions/app.Response'
  507. security:
  508. - ApiKeyAuth: []
  509. summary: 查询产能预售申请信息
  510. tags:
  511. - 产能预售
  512. /CPTrade/QueryPresaleGoodsEx:
  513. get:
  514. parameters:
  515. - description: 预售商品ID
  516. in: query
  517. name: goodsid
  518. type: integer
  519. - description: 预售市场ID
  520. in: query
  521. name: marketid
  522. type: integer
  523. - description: 预售模式 - 1:一口价 2:大宗式竞拍
  524. in: query
  525. name: presalemode
  526. type: integer
  527. - description: 预售商品ID列表 - 格式:1,2,3
  528. in: query
  529. name: goodsids
  530. type: string
  531. - description: 预售商品代码
  532. in: query
  533. name: goodscode
  534. type: string
  535. produces:
  536. - application/json
  537. responses:
  538. "200":
  539. description: OK
  540. schema:
  541. $ref: '#/definitions/cptrade.QueryPresaleGoodsExRsp'
  542. "500":
  543. description: Internal Server Error
  544. schema:
  545. $ref: '#/definitions/app.Response'
  546. security:
  547. - ApiKeyAuth: []
  548. summary: 查询产能预售商品扩展信息
  549. tags:
  550. - 产能预售
  551. /CPTrade/QueryUserGoodsData:
  552. get:
  553. parameters:
  554. - description: 资金账户ID
  555. in: query
  556. name: accountid
  557. required: true
  558. type: integer
  559. produces:
  560. - application/json
  561. responses:
  562. "200":
  563. description: OK
  564. schema:
  565. $ref: '#/definitions/cptrade.Cptradeusergoodsdata'
  566. "500":
  567. description: Internal Server Error
  568. schema:
  569. $ref: '#/definitions/app.Response'
  570. security:
  571. - ApiKeyAuth: []
  572. summary: 查询远期订单信息
  573. tags:
  574. - 产能预售
  575. /Delivery/QueryDeliveryRelation:
  576. get:
  577. parameters:
  578. - description: 商品ID
  579. in: query
  580. name: goodsid
  581. type: integer
  582. - description: 品种ID
  583. in: query
  584. name: deliverygoodsid
  585. type: integer
  586. - description: 市场ID
  587. in: query
  588. name: marketid
  589. type: integer
  590. produces:
  591. - application/json
  592. responses:
  593. "200":
  594. description: OK
  595. schema:
  596. $ref: '#/definitions/delivery.QueryDeliveryRelationRsp'
  597. "500":
  598. description: Internal Server Error
  599. schema:
  600. $ref: '#/definitions/app.Response'
  601. security:
  602. - ApiKeyAuth: []
  603. summary: 查询商品交割关系表
  604. tags:
  605. - 交割服务
  606. /WRTrade/GetAllDeliveryGoods:
  607. get:
  608. produces:
  609. - application/json
  610. responses:
  611. "200":
  612. description: OK
  613. schema:
  614. $ref: '#/definitions/app.Response'
  615. "500":
  616. description: Internal Server Error
  617. schema:
  618. $ref: '#/definitions/app.Response'
  619. security:
  620. - ApiKeyAuth: []
  621. summary: 获取带仓单分类的种类信息
  622. tags:
  623. - 仓单贸易
  624. securityDefinitions:
  625. ApiKeyAuth:
  626. in: header
  627. name: Authorization
  628. type: apiKey
  629. swagger: "2.0"