swagger.yaml 19 KB

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