swagger.json 26 KB

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