swagger.yaml 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534
  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. common.QuotePrimaryMenu:
  13. properties:
  14. index:
  15. description: 序号
  16. type: integer
  17. key:
  18. description: 键名
  19. type: string
  20. name:
  21. description: 菜单名称
  22. type: string
  23. submenus:
  24. description: 子菜单
  25. items:
  26. $ref: '#/definitions/common.QuoteSecondaryMenu'
  27. type: array
  28. titletype:
  29. description: 子菜单标题模式:0-市场名称;1-外部交易所名称
  30. type: integer
  31. trademodes:
  32. description: 包含市场交易类型
  33. type: string
  34. type: object
  35. common.QuoteSecondaryMenu:
  36. properties:
  37. exexchangecode:
  38. description: 外部交易所代码
  39. type: string
  40. exexchangeid:
  41. description: 外部交易所ID
  42. type: integer
  43. goodsgroupids:
  44. description: 商品组ID列表
  45. items:
  46. type: integer
  47. type: array
  48. index:
  49. description: 序号
  50. type: integer
  51. marketid:
  52. description: 市场ID
  53. type: integer
  54. menutitle:
  55. description: 菜单标题(市场名称或外部交易所名称)
  56. type: string
  57. trademode:
  58. description: 交易模式
  59. type: integer
  60. type: object
  61. cptrade.Cptradepositioncancel:
  62. properties:
  63. accountid:
  64. description: 申请人账户ID
  65. type: integer
  66. applystatus:
  67. description: 申请状态 - 1:已提交 2:初审通过 3:初审拒绝 4:初审失败 5复审通过 6:复审拒绝 7:复审失败 8:已撤销
  68. type: integer
  69. applytime:
  70. description: 申请时间
  71. type: string
  72. cancelid:
  73. description: 注销ID(SEQ_CPTRADE_POSITIONCANCEL)
  74. type: integer
  75. cancelqty:
  76. description: 注销数量
  77. type: integer
  78. createtime:
  79. description: 创建时间
  80. type: string
  81. creatorid:
  82. description: 创建人ID
  83. type: integer
  84. creatorname:
  85. description: 创建人
  86. type: string
  87. goodscode:
  88. description: 订单商品代码
  89. type: string
  90. goodsid:
  91. description: 商品ID
  92. type: integer
  93. goodsname:
  94. description: 订单商品名称
  95. type: string
  96. goodunit:
  97. description: 报价单位
  98. type: string
  99. handlestatus:
  100. description: 处理状态
  101. type: integer
  102. marketid:
  103. description: 市场ID
  104. type: integer
  105. marketname:
  106. description: 市场名称
  107. type: string
  108. tradedate:
  109. description: 交易日(yyyyMMdd)
  110. type: string
  111. userid:
  112. description: 申请人ID
  113. type: integer
  114. required:
  115. - cancelid
  116. type: object
  117. cptrade.Cptradepresaleapply:
  118. properties:
  119. accountid:
  120. description: 申请人账户ID
  121. type: integer
  122. applyid:
  123. description: 申请ID(181+Unix秒时间戳(10位)+xxxxxx)
  124. type: integer
  125. applyremark:
  126. description: 申请备注
  127. type: string
  128. applystatus:
  129. description: 申请状态 - 1:已提交 2:初审通过 3:初审拒绝 4:初审失败 5复审通过 6:复审拒绝 7:复审失败 8:已撤销
  130. type: integer
  131. applytime:
  132. description: 申请时间
  133. type: string
  134. attachmenturl:
  135. description: 附件地址
  136. type: string
  137. endtime:
  138. description: 预售结束时间
  139. type: string
  140. goodscode:
  141. description: 商品代码
  142. type: string
  143. goodsid:
  144. description: 商品ID
  145. type: integer
  146. goodsname:
  147. description: 商品名称
  148. type: string
  149. goodunit:
  150. description: 报价单位
  151. type: string
  152. handlestatus:
  153. description: 处理状态
  154. type: integer
  155. marketid:
  156. description: 预售市场ID
  157. type: integer
  158. marketname:
  159. description: 预售市场名称
  160. type: string
  161. presaleqty:
  162. description: 预售数量
  163. type: integer
  164. relatedgoodscode:
  165. description: 关联交易合约代码
  166. type: string
  167. relatedgoodsid:
  168. description: 关联交易合约ID
  169. type: integer
  170. relatedgoodsname:
  171. description: 关联交易合约名称
  172. type: string
  173. starttime:
  174. description: 预售开始时间
  175. type: string
  176. tradedate:
  177. description: 交易日(yyyyMMdd)
  178. type: string
  179. trademode:
  180. description: 交易模式 - 16:挂牌点选 21:大宗竞拍
  181. type: integer
  182. userid:
  183. description: 申请人ID
  184. type: integer
  185. required:
  186. - applyid
  187. type: object
  188. cptrade.Cptradeusergoodsdata:
  189. properties:
  190. EnabledQty:
  191. description: 可用量
  192. type: integer
  193. GoodsCode:
  194. description: 订单商品代码
  195. type: string
  196. GoodsName:
  197. description: 订单商品名称
  198. type: string
  199. WRStandardCode:
  200. description: 仓单标准代码
  201. type: string
  202. WRStandardName:
  203. description: 仓单标准名称
  204. type: string
  205. accountid:
  206. description: 账户ID
  207. type: integer
  208. cancelqty:
  209. description: 注销量
  210. type: integer
  211. curpresaleqty:
  212. description: 当前预售量
  213. type: integer
  214. deliveryqty:
  215. description: 交割量
  216. type: integer
  217. freezeamount:
  218. description: 冻结金额
  219. type: number
  220. goodsid:
  221. description: 商品ID
  222. type: integer
  223. goodunit:
  224. description: 报价单位
  225. type: string
  226. hasspotfreeze:
  227. description: 是否有现货冻结 - 0:否 1:有
  228. type: integer
  229. inqty:
  230. description: 转入量(总数量)
  231. type: integer
  232. marketid:
  233. description: 市场ID
  234. type: integer
  235. presaledamount:
  236. description: 已预售总金额
  237. type: integer
  238. presaledqty:
  239. description: 已预售量
  240. type: integer
  241. userid:
  242. description: 用户ID
  243. type: integer
  244. wrstandardid:
  245. description: 仓单标准ID
  246. type: integer
  247. required:
  248. - accountid
  249. - goodsid
  250. type: object
  251. cptrade.QueryCPTradeMyBidRsp:
  252. properties:
  253. accountid:
  254. description: 账户ID[报价币种]
  255. type: integer
  256. goodsid:
  257. description: 商品ID
  258. type: integer
  259. goodunit:
  260. description: 报价单位
  261. type: string
  262. marketid:
  263. description: 市场ID
  264. type: integer
  265. orderid:
  266. description: 委托单号(100+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
  267. type: integer
  268. orderprice:
  269. description: 委托价格
  270. type: number
  271. orderqty:
  272. description: 委托数量
  273. type: integer
  274. ordertime:
  275. description: 委托时间
  276. type: string
  277. ordertotalprice:
  278. description: 货款金额(委托总价格=委托价格*委托数量*合约单位)
  279. type: number
  280. ordertotalweight:
  281. description: 竞拍总重量(委托总重量=委托数量*合约单位)
  282. type: integer
  283. totaltotalprice:
  284. description: 成交货款金额(成交总价格=成交价格*成交数量*合约单位)
  285. type: number
  286. tradeprice:
  287. description: 成交价格
  288. type: number
  289. tradeqty:
  290. description: 成交数量
  291. type: integer
  292. required:
  293. - accountid
  294. - goodsid
  295. - marketid
  296. - orderid
  297. - orderqty
  298. - ordertime
  299. - tradeprice
  300. - tradeqty
  301. type: object
  302. cptrade.QueryCPTradeOrderDetailRsq:
  303. properties:
  304. accountid:
  305. description: 账户ID[报价币种]
  306. type: integer
  307. buildtype:
  308. description: 委托单据类型 - 1:建仓 2:平仓 3:先平后建
  309. type: integer
  310. buyorsell:
  311. description: 买卖 - 0:买 1:卖
  312. type: integer
  313. cancelorderid:
  314. description: 撤单单号(撤单时填写)
  315. type: integer
  316. cancelqty:
  317. description: 撤单数量
  318. type: integer
  319. clientordertime:
  320. description: 客户端委托时间
  321. type: string
  322. clientticket:
  323. description: 客户端流水号
  324. type: string
  325. clienttype:
  326. description: 客户端类型 - 0:保留为未填终端类型 1:PC管理端 2:PC交易端 3:手机客户端_安卓 4:网页客户端 5:微信客户端 6:手机客户端_苹果 7:网上开户客户端 8:无效终端编号 9:报价终端(中江)
  327. type: integer
  328. closeexchagechargevalue:
  329. description: 平仓交易所手续费设置值
  330. type: number
  331. closefeealgorithm:
  332. description: 平仓手续费收取方式 1:比率 2:固定
  333. type: integer
  334. closefreezecharge:
  335. description: 平仓冻结手续费(先建后平操作,需要记录)
  336. type: number
  337. closememberchargevalue:
  338. description: 平仓会员手续费设置值
  339. type: number
  340. closeqty:
  341. description: 平仓数量(先建后平操作 需要记录)
  342. type: integer
  343. closetradeqty:
  344. description: 平仓成交数量(先建后平操作,需要记录)
  345. type: integer
  346. closeunfreezecharge:
  347. description: 平仓解冻手续费(先建后平操作,需要记录)
  348. type: number
  349. delistingtype:
  350. description: 摘牌类型 - 1:价格最优 2:点选成交
  351. type: integer
  352. freezecharge:
  353. description: 冻结手续费
  354. type: number
  355. freezemargin:
  356. description: 冻结保证金(冻结交易金额)
  357. type: number
  358. gcaccountid:
  359. description: 账户ID[合约币种]
  360. type: integer
  361. goodsid:
  362. description: 商品ID
  363. type: integer
  364. isconfirmexercise:
  365. description: 是否确认行权- 0:否 1:是
  366. type: integer
  367. ispreexercise:
  368. description: 是否预申报- 0:否 1:是
  369. type: integer
  370. listingselecttype:
  371. description: 挂牌点选类型 - 1:挂牌 2:摘牌 3:先摘后挂
  372. type: integer
  373. marginalgorithm:
  374. description: 保证金收取方式 1:比率 2:固定
  375. type: integer
  376. marginvalue:
  377. description: 即市保证金设置值
  378. type: number
  379. marketid:
  380. description: 市场ID
  381. type: integer
  382. marketmaxsub:
  383. description: 市价最大偏移范围
  384. type: number
  385. memberuserid:
  386. description: 所属会员UserID
  387. type: integer
  388. openexchagechargevalue:
  389. description: 建仓交易所手续费设置值
  390. type: number
  391. openfeealgorithm:
  392. description: 建仓手续费收取方式 1:比率 2:固定
  393. type: integer
  394. openfreezecharge:
  395. description: 开仓冻结手续费(先建后平操作,需要记录)
  396. type: number
  397. openmemberchargevalue:
  398. description: 建仓会员手续费设置值
  399. type: number
  400. openqty:
  401. description: 开仓数量(先建后平操作,需要记录)
  402. type: integer
  403. opentradeqty:
  404. description: 开仓成交数量(先建后平操作,需要记录)
  405. type: integer
  406. openunfreezecharge:
  407. description: 开仓解冻手续费(先建后平操作,需要记录)
  408. type: number
  409. operatetype:
  410. description: 操作类型 - 1:正常下单 2:斩仓 3:转单 4:结算撤单 5:系统卖出(适用于先平后建的卖出) 6:行情源报价 7:(结算)到期强平 8:(结算)协议转让 9:系统对冲单 10:(结算)到期无效 11:交割协议转让 12:交割协议平仓 13:交割成交(所有权) 14:管理端强行平仓 15:管理端协议转让
  411. type: integer
  412. operatorid:
  413. description: 登录账号(LoginID)
  414. type: integer
  415. optiontype:
  416. description: 期权类型 - 1:认购(看涨) 2:认沽(看跌)
  417. type: integer
  418. orderprice:
  419. description: 委托价格
  420. type: number
  421. orderqty:
  422. description: 委托数量
  423. type: integer
  424. ordersrc:
  425. description: 委托来源 - 1:客户端 2:管理端 3:风控服务 4:交割服务 5:交易服务 6:交易日结 7:商品强平 8:管理端商品退市强平 9:交易接口 10:交割服务商被动(受托竞价) 11:预埋触发
  426. type: integer
  427. orderstatus:
  428. description: 委托状态 - 1: 委托请求 2:待冻结 3:委托成功 4: 委托失败 5:配对成功 6: 已撤销 7:部分成交 8:已成交 9:部成部撤 10:成交失败 11:已拒绝 12:经过摘牌(先摘后挂专用-先摘后挂已摘过) 13:冻结成功(通道交易专用) 14:通道已撤 15:通道部成部撤 16:成交失败违约(荷兰式竞拍专用)
  429. type: integer
  430. ordertime:
  431. description: 委托时间
  432. type: string
  433. preexerciseprice:
  434. description: 预申报价格
  435. type: number
  436. premium:
  437. description: 权利金
  438. type: number
  439. preorderid:
  440. description: 关联预埋单号(止盈止损单时填写)
  441. type: integer
  442. pricemode:
  443. description: '取价方式 - 1:市价 2: 限价'
  444. type: integer
  445. quoteid:
  446. description: 报价单ID
  447. type: integer
  448. relatedid:
  449. description: 关联单号(交割单)
  450. type: integer
  451. retcode:
  452. description: 错误代码
  453. type: integer
  454. sessionid:
  455. description: 会话ID
  456. type: integer
  457. strorderid:
  458. description: 委托单号
  459. type: string
  460. tradedate:
  461. description: 交易日(yyyyMMdd)
  462. type: string
  463. tradeproperty:
  464. description: 交易属性
  465. type: integer
  466. tradeqty:
  467. description: 成交数量
  468. type: integer
  469. unfreezecharge:
  470. description: 解冻手续费
  471. type: number
  472. unfreezemargin:
  473. description: 解冻保证金
  474. type: number
  475. updatetime:
  476. description: 更新时间
  477. type: string
  478. uuid:
  479. description: 发起端唯一id
  480. type: string
  481. validtime:
  482. description: 有效期限
  483. type: string
  484. validtype:
  485. description: 有效类型 - 1当日有效 2本周有效 3指定日期有效 4一直有效 5指定时间有效
  486. type: integer
  487. volumetype:
  488. description: 当时间有效类型为 “立即执行否则取消 IOC” 时,需要此项 - 0:任意量 1:最小量(暂时不支持) 2:全部量
  489. type: integer
  490. required:
  491. - accountid
  492. - buildtype
  493. - buyorsell
  494. - goodsid
  495. - marketid
  496. - memberuserid
  497. - operatetype
  498. - orderqty
  499. - ordertime
  500. - pricemode
  501. - strorderid
  502. - tradedate
  503. - validtype
  504. type: object
  505. cptrade.QueryMyCPTradeGoodsRsp:
  506. properties:
  507. accountid:
  508. description: 卖方账户ID
  509. type: integer
  510. agreeunit:
  511. description: 合约单位
  512. type: number
  513. applyid:
  514. description: 关联申请ID
  515. type: integer
  516. attachmenturl:
  517. description: 附件地址
  518. type: string
  519. createtime:
  520. description: 创建时间
  521. type: string
  522. currencyid:
  523. description: 报价货币ID
  524. type: integer
  525. decimalplace:
  526. description: 报价小数位
  527. type: integer
  528. endtime:
  529. description: 预售结束时间
  530. type: string
  531. floorprice:
  532. description: 底价[大宗式竞拍]
  533. type: number
  534. goodscode:
  535. description: 商品代码(预售)
  536. type: string
  537. goodsdetail:
  538. description: 详情[大宗]
  539. type: string
  540. goodsid:
  541. description: 商品ID(自增ID SEQ_GOODS)
  542. type: integer
  543. goodsname:
  544. description: 商品名称(预售)
  545. type: string
  546. goodunit:
  547. description: 报价单位
  548. type: string
  549. goodunitid:
  550. description: 报价单位ID
  551. type: integer
  552. marketid:
  553. description: 所属市场ID
  554. type: integer
  555. marketname:
  556. description: 预售市场名称
  557. type: string
  558. presaledamount:
  559. description: 已预售总金额(预售结束时更新)
  560. type: number
  561. presaledqty:
  562. description: 已预售量(预售结束时更新)
  563. type: integer
  564. presalemode:
  565. description: 预售模式 - 1:一口价 2:大宗式竞拍
  566. type: integer
  567. presaleqty:
  568. description: 预售数量
  569. type: integer
  570. refprice:
  571. description: 参考价格[一口价]
  572. type: number
  573. relatedgoodscode:
  574. description: 商品代码(订单)
  575. type: string
  576. relatedgoodsid:
  577. description: 关联交易合约ID
  578. type: integer
  579. relatedgoodsname:
  580. description: 商品名称(订单)
  581. type: string
  582. relatedmarketid:
  583. description: 关联交易合约市场ID
  584. type: integer
  585. sellstatus:
  586. description: 卖方处理状态 - 1:卖方头寸未处理 2:卖方头寸已处理
  587. type: integer
  588. startprice:
  589. description: 起拍价[大宗式竞拍]
  590. type: number
  591. starttime:
  592. description: 预售开始时间
  593. type: string
  594. tradedate:
  595. description: 交易日(yyyyMMdd)
  596. type: string
  597. tradeprice:
  598. description: 成交价[大宗]
  599. type: number
  600. userid:
  601. description: 卖方用户ID
  602. type: integer
  603. required:
  604. - goodscode
  605. - goodsid
  606. - goodsname
  607. - marketid
  608. - relatedgoodscode
  609. - relatedgoodsname
  610. type: object
  611. cptrade.QueryPresaleGoodsExRsp:
  612. properties:
  613. attachmenturl:
  614. description: 附件地址
  615. type: string
  616. createtime:
  617. description: 创建时间
  618. type: string
  619. endtime:
  620. description: 预售结束时间
  621. type: string
  622. floorprice:
  623. description: 底价[大宗式竞拍]
  624. type: number
  625. goodsdetail:
  626. description: 详情[大宗]
  627. type: string
  628. goodsid:
  629. description: 商品ID(预售)
  630. type: integer
  631. goodunit:
  632. description: 报价单位
  633. type: string
  634. marketid:
  635. description: 预售市场ID - 根据预售模式选择市场
  636. type: integer
  637. presaledamount:
  638. description: 已预售总金额(预售结束时更新)
  639. type: number
  640. presaledqty:
  641. description: 已预售量(预售结束时更新)
  642. type: integer
  643. presalemode:
  644. description: 预售模式 - 1:一口价 2:大宗式竞拍
  645. type: integer
  646. presaleqty:
  647. description: 预售数量
  648. type: integer
  649. refprice:
  650. description: 参考价格[一口价]
  651. type: number
  652. relatedgoodsid:
  653. description: 关联交易合约ID
  654. type: integer
  655. relatedmarketid:
  656. description: 关联交易合约市场ID
  657. type: integer
  658. sellstatus:
  659. description: 卖方处理状态 - 1:卖方头寸未处理 2:卖方头寸已处理
  660. type: integer
  661. startprice:
  662. description: 起拍价[大宗式竞拍]
  663. type: number
  664. starttime:
  665. description: 预售开始时间
  666. type: string
  667. tradedate:
  668. description: 交易日(yyyyMMdd)
  669. type: string
  670. tradeprice:
  671. description: 成交价[大宗]
  672. type: number
  673. required:
  674. - goodsid
  675. type: object
  676. delivery.QueryDeliveryRelationRsp:
  677. properties:
  678. begindate:
  679. description: 起始日期(yyyyMMdd)
  680. type: string
  681. buytemplateid:
  682. description: 买履约计划模板ID
  683. type: integer
  684. deliverygoodscode:
  685. description: 品种代码
  686. type: string
  687. deliverygoodsid:
  688. description: 交割商品
  689. type: integer
  690. deliverygoodsname:
  691. description: 品种名称
  692. type: string
  693. deliverymode:
  694. description: 交割方式 - 1:点选式 2:申报式
  695. type: integer
  696. deliverypricerule:
  697. description: 交割价规则- 1:行情价 2:建仓价
  698. type: integer
  699. deliverytype:
  700. description: 交割模式 - 1:X交割 2:X+P交割 3:X+C交割 4:X+P+C交割
  701. type: integer
  702. enddate:
  703. description: 结束日期(yyyyMMdd)
  704. type: string
  705. goodscode:
  706. description: 商品代码
  707. type: string
  708. goodsid:
  709. description: 交易合约ID
  710. type: integer
  711. goodsname:
  712. description: 商品名称
  713. type: string
  714. marketid:
  715. description: 市场ID
  716. type: integer
  717. mindeliveryqty:
  718. description: 最小交割系数(K)
  719. type: integer
  720. p2deliveryprice:
  721. description: P2合约价格(商品价时填写0,固定值时填写固定值)
  722. type: number
  723. p2deliveryratio:
  724. description: P2合约系数(p)
  725. type: integer
  726. p2goodsid:
  727. description: P2合约ID
  728. type: integer
  729. p2pricemode:
  730. description: P2合约价格方式 - 1:商品价 2:固定值
  731. type: integer
  732. pdeliveryprice:
  733. description: P合约价格(商品价时填写0,固定值时填写固定值)
  734. type: number
  735. pdeliveryratio:
  736. description: P合约系数(n)
  737. type: integer
  738. pgoodsid:
  739. description: P合约ID
  740. type: integer
  741. ppricemode:
  742. description: P合约价格方式 - 1:商品价 2:固定值
  743. type: integer
  744. rratio:
  745. description: 兑换系数(R)
  746. type: integer
  747. rratio1:
  748. description: 兑换系数(交易合约)(R1)
  749. type: integer
  750. rratio2:
  751. description: 兑换系数(仓单标准)(R2)
  752. type: integer
  753. selltemplateid:
  754. description: 卖履约计划模板ID
  755. type: integer
  756. wrstandardid:
  757. description: 仓单标准ID
  758. type: integer
  759. xdeliveryratio:
  760. description: 交易合约系数(m)
  761. type: integer
  762. required:
  763. - begindate
  764. - enddate
  765. - goodsid
  766. - mindeliveryqty
  767. - xdeliveryratio
  768. type: object
  769. erms2.QueryArbitrageStrategyRsp:
  770. properties:
  771. applybasis:
  772. description: 申请基差
  773. type: number
  774. asapplyid:
  775. description: 策略申请ID(702+Unix秒时间戳(10位)+xxxxxx)
  776. type: string
  777. asname:
  778. description: 策略名称
  779. type: string
  780. asno:
  781. description: 策略编号
  782. type: string
  783. basischangepl:
  784. description: 基差变动损益[结算更新]
  785. type: number
  786. biztype:
  787. description: 业务类型 - 1:正向套利 -1:反向套利
  788. type: integer
  789. closetradedate:
  790. description: 完结交易日(yyyyMMdd)
  791. type: string
  792. curbasis:
  793. description: 当前基差[结算更新]
  794. type: number
  795. deliverygoodsid:
  796. description: 现货品种ID
  797. type: integer
  798. futureavgprice:
  799. description: 期货建仓均价
  800. type: number
  801. futurecloseamount:
  802. description: 期货平仓金额
  803. type: number
  804. futurecloseqty:
  805. description: 期货平仓数量
  806. type: number
  807. futureopenamount:
  808. description: 期货开仓金额
  809. type: number
  810. futureopenqty:
  811. description: 期货开仓数量
  812. type: number
  813. futurepl:
  814. description: 期货总盈亏[结算更新]
  815. type: number
  816. futureqty:
  817. description: 期货持仓数量
  818. type: number
  819. futurequote:
  820. description: 期货额度
  821. type: number
  822. goodsgroupid:
  823. description: 期货品种ID
  824. type: integer
  825. marketid:
  826. description: 市场ID
  827. type: integer
  828. netexposure:
  829. description: 单笔业务头寸净敞口 = 期货持仓数量 + 已定价现货不含税数量
  830. type: number
  831. netexposurepl:
  832. description: 净敞口损益 = TotalPL - BasisChangePL[结算更新]
  833. type: number
  834. netexposurerate:
  835. description: 净敞口比例 - 0:未结束 = (NetExposure/PriceSpotQtyNoTax) ; 已结束为0
  836. type: number
  837. openbasis:
  838. description: 建仓基差
  839. type: number
  840. pricedspotqty:
  841. description: 已定价现货数量
  842. type: number
  843. pricedspotqtynotax:
  844. description: 已定价现货不含税数量
  845. type: number
  846. remark:
  847. description: 备注
  848. type: string
  849. spotavgprice:
  850. description: 现货均价
  851. type: number
  852. spotbuyamount:
  853. description: 现货采购金额
  854. type: number
  855. spotbuyqty:
  856. description: 现货采购数量
  857. type: number
  858. spotpl:
  859. description: 现货总盈亏[结算更新]
  860. type: number
  861. spotquota:
  862. description: 现货额度
  863. type: number
  864. spotsellamount:
  865. description: 现货销售金额
  866. type: number
  867. spotsellqty:
  868. description: 现货销售数量
  869. type: number
  870. spotusedquota:
  871. description: 现货占用资金
  872. type: number
  873. strategystatus:
  874. description: 策略状态 - 0:未结束 1:已结束
  875. type: integer
  876. totalpl:
  877. description: 业务合计损益 = FuturePL + SpotPL [结算更新]
  878. type: number
  879. tradedate:
  880. description: 交易日(yyyyMMdd)
  881. type: string
  882. updatetime:
  883. description: 更新时间
  884. type: string
  885. usedquota:
  886. description: 已占用资金
  887. type: number
  888. userid:
  889. description: 所属机构
  890. type: integer
  891. required:
  892. - asapplyid
  893. type: object
  894. erms2.QueryInnerTradeDetailRsp:
  895. properties:
  896. accountid:
  897. description: 账号ID
  898. type: integer
  899. agreeunit:
  900. description: 合约单位
  901. type: number
  902. asapplyid:
  903. description: 策略申请ID
  904. type: integer
  905. asname:
  906. description: 策略名称
  907. type: string
  908. asno:
  909. description: 策略编号
  910. type: string
  911. buyorsell:
  912. description: 方向 - 0:买 1:卖
  913. type: integer
  914. channelbuildtype:
  915. description: 委托单据类型 0:无 1:建仓 2:平仓
  916. type: integer
  917. closetype:
  918. description: 平仓方式 - 0:无 1:平今 2:平昨
  919. type: integer
  920. decimalplace:
  921. description: 报价小数位
  922. type: integer
  923. detailtype:
  924. description: 明细类型 - 1:套利对冲 2:期货换月 3:期货仓位调整
  925. type: integer
  926. exexchangecode:
  927. description: 外部交易所代码
  928. type: string
  929. exexchangename:
  930. description: 外部交易所名称
  931. type: string
  932. goodscode:
  933. description: 商品代码(合约)
  934. type: string
  935. goodsgroupid:
  936. description: 商品组ID(品种ID)
  937. type: integer
  938. goodsgroupname:
  939. description: 商品组名称(品种)
  940. type: string
  941. goodsid:
  942. description: 商品ID
  943. type: integer
  944. goodsname:
  945. description: 商品名称(合约)
  946. type: string
  947. goodunit:
  948. description: 报价单位
  949. type: string
  950. marketid:
  951. description: 市场ID
  952. type: integer
  953. orderid:
  954. description: 委托单号
  955. type: string
  956. outgoodscode:
  957. description: 商品代码(外部)
  958. type: string
  959. relatedouttradeid:
  960. description: 关联外部成交单ID
  961. type: string
  962. remark:
  963. description: 备注
  964. type: string
  965. spotcontractid:
  966. description: 现货合同ID [1:套利对冲 为合同ID,2:期货换月\3:期货仓位调整时为0]
  967. type: integer
  968. spotcontractno:
  969. description: 现货合同编号
  970. type: string
  971. tradeid:
  972. description: 成交单号(108+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
  973. type: string
  974. tradeprice:
  975. description: 成交价格
  976. type: number
  977. tradeqty:
  978. description: 成交数量
  979. type: integer
  980. tradetime:
  981. description: 成交时间
  982. type: string
  983. updatetime:
  984. description: 更新时间
  985. type: string
  986. required:
  987. - asapplyid
  988. - buyorsell
  989. - goodscode
  990. - goodsgroupid
  991. - goodsgroupname
  992. - goodsname
  993. - tradeid
  994. type: object
  995. erms2.QuerySpotContractRsp:
  996. properties:
  997. accountid:
  998. description: 资金账户ID
  999. type: integer
  1000. areauserid:
  1001. description: 所属机构
  1002. type: integer
  1003. closedate:
  1004. description: 终止日期
  1005. type: string
  1006. closeremark:
  1007. description: 结束备注
  1008. type: string
  1009. closetradedate:
  1010. description: 完结交易日(yyyyMMdd)
  1011. type: string
  1012. closetype:
  1013. description: 终止类型 - 1:违约 2:提前终止
  1014. type: integer
  1015. contractamount:
  1016. description: 合同金额
  1017. type: number
  1018. contractattachment:
  1019. description: 合同附件
  1020. type: string
  1021. contractno:
  1022. description: 现货合同编号
  1023. type: string
  1024. contractqty:
  1025. description: 合同数量(数值) (用于计算)
  1026. type: number
  1027. contractqtychar:
  1028. description: 合同数量\已订价数量 (用于显示)
  1029. type: string
  1030. contractstatus:
  1031. description: 合同状态 - 0:未结束 1:已结束
  1032. type: integer
  1033. contracttype:
  1034. description: 现货合同类型 - 1:采购合同 -1:销售合同
  1035. type: integer
  1036. customeraccountid:
  1037. description: 客户资金账户ID
  1038. type: integer
  1039. customeruserid:
  1040. description: 客户ID
  1041. type: integer
  1042. deliverygoodsdesc:
  1043. description: 品种说明
  1044. type: string
  1045. deliverygoodsid:
  1046. description: 现货品种ID
  1047. type: integer
  1048. handlestatus:
  1049. description: 处理状态
  1050. type: integer
  1051. invoiceatt:
  1052. description: 发票附件
  1053. type: string
  1054. invoicedatetime:
  1055. description: 开收票更新时间
  1056. type: string
  1057. invoiceopentime:
  1058. description: 开票时间
  1059. type: string
  1060. invoiceremark:
  1061. description: 发票备注
  1062. type: string
  1063. invoicestatus:
  1064. description: 开收票状态 - 0:未开票 1:已开票
  1065. type: integer
  1066. lastdate:
  1067. description: 交货时间
  1068. type: string
  1069. marketid:
  1070. description: 市场ID
  1071. type: integer
  1072. paydatetime:
  1073. description: 收付款更新时间
  1074. type: string
  1075. payremark:
  1076. description: 收付款备注
  1077. type: string
  1078. paystatus:
  1079. description: 收付款状态 - 0:未支付 1:已收款 2:已付款
  1080. type: integer
  1081. positionqty:
  1082. description: 头寸数量 - 合同数量去小数部分
  1083. type: integer
  1084. producttype:
  1085. description: 产品类型 - 1:标准仓单 2:等标 3:非标
  1086. type: integer
  1087. relatedqty:
  1088. description: 已关联数量
  1089. type: number
  1090. relatedstatus:
  1091. description: 关联完结状态 - 0:未结束 1:已结束
  1092. type: integer
  1093. remark:
  1094. description: 备注
  1095. type: string
  1096. signdate:
  1097. description: 签订日期
  1098. type: string
  1099. spotcontractid:
  1100. description: 现货合同ID(701+Unix秒时间戳(10位)+xxxxxx)
  1101. type: string
  1102. spotdatetime:
  1103. description: 收发货更新时间
  1104. type: string
  1105. spotprice:
  1106. description: 价格
  1107. type: number
  1108. spotremark:
  1109. description: 收发货备注
  1110. type: string
  1111. spotstatus:
  1112. description: 收发货状态 - 0:未交收 1:已发货 2:已发货
  1113. type: integer
  1114. tradedate:
  1115. description: 交易日(yyyyMMdd)
  1116. type: string
  1117. userid:
  1118. description: 业务员用户ID
  1119. type: integer
  1120. warehouseid:
  1121. description: 仓库ID
  1122. type: integer
  1123. wrfactortypeid:
  1124. description: 仓单要素类型ID
  1125. type: integer
  1126. wrstandardid:
  1127. description: 仓单标准ID(SEQ_WRSTANDARD)
  1128. type: integer
  1129. required:
  1130. - spotcontractid
  1131. type: object
  1132. info:
  1133. contact: {}
  1134. description: 新的查询服务,替代原通用查询服务。
  1135. license: {}
  1136. termsOfService: http://muchinfo.cn
  1137. title: MTP2.0 查询服务 API
  1138. version: "1.0"
  1139. paths:
  1140. /CPTrade/QueryCPTradeMyBidInfos:
  1141. get:
  1142. parameters:
  1143. - description: 资金账户
  1144. in: query
  1145. name: accountid
  1146. required: true
  1147. type: integer
  1148. - description: 预售市场ID
  1149. in: query
  1150. name: marketid
  1151. type: integer
  1152. - description: 预售商品ID
  1153. in: query
  1154. name: goodsid
  1155. type: integer
  1156. produces:
  1157. - application/json
  1158. responses:
  1159. "200":
  1160. description: OK
  1161. schema:
  1162. $ref: '#/definitions/cptrade.QueryCPTradeMyBidRsp'
  1163. "500":
  1164. description: Internal Server Error
  1165. schema:
  1166. $ref: '#/definitions/app.Response'
  1167. security:
  1168. - ApiKeyAuth: []
  1169. summary: 查询产能预售我的出价信息
  1170. tags:
  1171. - 产能预售
  1172. /CPTrade/QueryCPTradeOrderDetail:
  1173. get:
  1174. parameters:
  1175. - description: 预售商品ID
  1176. in: query
  1177. name: goodsid
  1178. type: integer
  1179. - description: 预售市场ID
  1180. in: query
  1181. name: marketid
  1182. type: integer
  1183. - description: 预售商品ID列表 - 格式:1,2,3
  1184. in: query
  1185. name: goodsids
  1186. type: string
  1187. produces:
  1188. - application/json
  1189. responses:
  1190. "200":
  1191. description: OK
  1192. schema:
  1193. $ref: '#/definitions/cptrade.QueryCPTradeOrderDetailRsq'
  1194. "500":
  1195. description: Internal Server Error
  1196. schema:
  1197. $ref: '#/definitions/app.Response'
  1198. security:
  1199. - ApiKeyAuth: []
  1200. summary: 查询产能预售委托单信息
  1201. tags:
  1202. - 产能预售
  1203. /CPTrade/QueryMyCPTradeGoods:
  1204. get:
  1205. parameters:
  1206. - description: 资金账户
  1207. in: query
  1208. name: accountid
  1209. required: true
  1210. type: integer
  1211. produces:
  1212. - application/json
  1213. responses:
  1214. "200":
  1215. description: OK
  1216. schema:
  1217. $ref: '#/definitions/cptrade.QueryMyCPTradeGoodsRsp'
  1218. "500":
  1219. description: Internal Server Error
  1220. schema:
  1221. $ref: '#/definitions/app.Response'
  1222. security:
  1223. - ApiKeyAuth: []
  1224. summary: 查询我的预售信息
  1225. tags:
  1226. - 产能预售
  1227. /CPTrade/QueryPositionCancel:
  1228. get:
  1229. parameters:
  1230. - description: 账户ID
  1231. in: query
  1232. name: userid
  1233. required: true
  1234. type: integer
  1235. - description: 注销ID
  1236. in: query
  1237. name: cancelid
  1238. type: integer
  1239. - description: 资金账户ID
  1240. in: query
  1241. name: accountid
  1242. type: integer
  1243. produces:
  1244. - application/json
  1245. responses:
  1246. "200":
  1247. description: OK
  1248. schema:
  1249. $ref: '#/definitions/cptrade.Cptradepositioncancel'
  1250. "500":
  1251. description: Internal Server Error
  1252. schema:
  1253. $ref: '#/definitions/app.Response'
  1254. security:
  1255. - ApiKeyAuth: []
  1256. summary: 查询远期订单注销申请信息
  1257. tags:
  1258. - 产能预售
  1259. /CPTrade/QueryPreasleApply:
  1260. get:
  1261. parameters:
  1262. - description: 账户ID
  1263. in: query
  1264. name: userid
  1265. required: true
  1266. type: integer
  1267. - description: 申请ID
  1268. in: query
  1269. name: applyid
  1270. type: integer
  1271. - description: 资金账户ID
  1272. in: query
  1273. name: accountid
  1274. type: integer
  1275. produces:
  1276. - application/json
  1277. responses:
  1278. "200":
  1279. description: OK
  1280. schema:
  1281. $ref: '#/definitions/cptrade.Cptradepresaleapply'
  1282. "500":
  1283. description: Internal Server Error
  1284. schema:
  1285. $ref: '#/definitions/app.Response'
  1286. security:
  1287. - ApiKeyAuth: []
  1288. summary: 查询产能预售申请信息
  1289. tags:
  1290. - 产能预售
  1291. /CPTrade/QueryPresaleGoodsEx:
  1292. get:
  1293. parameters:
  1294. - description: 预售商品ID
  1295. in: query
  1296. name: goodsid
  1297. type: integer
  1298. - description: 预售市场ID
  1299. in: query
  1300. name: marketid
  1301. type: integer
  1302. - description: 预售模式 - 1:一口价 2:大宗式竞拍
  1303. in: query
  1304. name: presalemode
  1305. type: integer
  1306. - description: 预售商品ID列表 - 格式:1,2,3
  1307. in: query
  1308. name: goodsids
  1309. type: string
  1310. - description: 预售商品代码
  1311. in: query
  1312. name: goodscode
  1313. type: string
  1314. produces:
  1315. - application/json
  1316. responses:
  1317. "200":
  1318. description: OK
  1319. schema:
  1320. $ref: '#/definitions/cptrade.QueryPresaleGoodsExRsp'
  1321. "500":
  1322. description: Internal Server Error
  1323. schema:
  1324. $ref: '#/definitions/app.Response'
  1325. security:
  1326. - ApiKeyAuth: []
  1327. summary: 查询产能预售商品扩展信息
  1328. tags:
  1329. - 产能预售
  1330. /CPTrade/QueryUserGoodsData:
  1331. get:
  1332. parameters:
  1333. - description: 资金账户ID
  1334. in: query
  1335. name: accountid
  1336. required: true
  1337. type: integer
  1338. produces:
  1339. - application/json
  1340. responses:
  1341. "200":
  1342. description: OK
  1343. schema:
  1344. $ref: '#/definitions/cptrade.Cptradeusergoodsdata'
  1345. "500":
  1346. description: Internal Server Error
  1347. schema:
  1348. $ref: '#/definitions/app.Response'
  1349. security:
  1350. - ApiKeyAuth: []
  1351. summary: 查询远期订单信息
  1352. tags:
  1353. - 产能预售
  1354. /Common/QueryTraderMenu:
  1355. get:
  1356. parameters:
  1357. - description: 登录账号
  1358. in: query
  1359. name: loginid
  1360. required: true
  1361. type: integer
  1362. produces:
  1363. - application/json
  1364. responses:
  1365. "200":
  1366. description: OK
  1367. schema:
  1368. $ref: '#/definitions/common.QuotePrimaryMenu'
  1369. "500":
  1370. description: Internal Server Error
  1371. schema:
  1372. $ref: '#/definitions/app.Response'
  1373. security:
  1374. - ApiKeyAuth: []
  1375. summary: 查询交易端菜单
  1376. tags:
  1377. - 通用
  1378. /Delivery/QueryDeliveryRelation:
  1379. get:
  1380. parameters:
  1381. - description: 商品ID
  1382. in: query
  1383. name: goodsid
  1384. type: integer
  1385. - description: 品种ID
  1386. in: query
  1387. name: deliverygoodsid
  1388. type: integer
  1389. - description: 市场ID
  1390. in: query
  1391. name: marketid
  1392. type: integer
  1393. produces:
  1394. - application/json
  1395. responses:
  1396. "200":
  1397. description: OK
  1398. schema:
  1399. $ref: '#/definitions/delivery.QueryDeliveryRelationRsp'
  1400. "500":
  1401. description: Internal Server Error
  1402. schema:
  1403. $ref: '#/definitions/app.Response'
  1404. security:
  1405. - ApiKeyAuth: []
  1406. summary: 查询商品交割关系表
  1407. tags:
  1408. - 交割服务
  1409. /Erms2/QueryArbitrageStrategy:
  1410. get:
  1411. parameters:
  1412. - description: 账户ID
  1413. in: query
  1414. name: userid
  1415. required: true
  1416. type: integer
  1417. - description: 商品组ID(品种ID)
  1418. in: query
  1419. name: goodsgroupid
  1420. type: string
  1421. produces:
  1422. - application/json
  1423. responses:
  1424. "200":
  1425. description: OK
  1426. schema:
  1427. $ref: '#/definitions/erms2.QueryArbitrageStrategyRsp'
  1428. "500":
  1429. description: Internal Server Error
  1430. schema:
  1431. $ref: '#/definitions/app.Response'
  1432. security:
  1433. - ApiKeyAuth: []
  1434. summary: 查询期现套利策略表信息(指定资金账户、未结束的)
  1435. tags:
  1436. - 风险管理
  1437. /Erms2/QueryInnerTradeDetail:
  1438. get:
  1439. parameters:
  1440. - description: 资金账户
  1441. in: query
  1442. name: accountid
  1443. required: true
  1444. type: integer
  1445. produces:
  1446. - application/json
  1447. responses:
  1448. "200":
  1449. description: OK
  1450. schema:
  1451. $ref: '#/definitions/erms2.QueryInnerTradeDetailRsp'
  1452. "500":
  1453. description: Internal Server Error
  1454. schema:
  1455. $ref: '#/definitions/app.Response'
  1456. security:
  1457. - ApiKeyAuth: []
  1458. summary: 查询内部成交单信息
  1459. tags:
  1460. - 风险管理
  1461. /Erms2/QuerySpotContract:
  1462. get:
  1463. parameters:
  1464. - description: 策略申请ID
  1465. in: query
  1466. name: asapplyid
  1467. required: true
  1468. type: integer
  1469. - description: 现货合同ID
  1470. in: query
  1471. name: spotcontractid
  1472. type: integer
  1473. produces:
  1474. - application/json
  1475. responses:
  1476. "200":
  1477. description: OK
  1478. schema:
  1479. $ref: '#/definitions/erms2.QuerySpotContractRsp'
  1480. "500":
  1481. description: Internal Server Error
  1482. schema:
  1483. $ref: '#/definitions/app.Response'
  1484. security:
  1485. - ApiKeyAuth: []
  1486. summary: 查询现货合同表信息(指定策略ID、未结束的)
  1487. tags:
  1488. - 风险管理
  1489. /Login/GetLoginID:
  1490. get:
  1491. parameters:
  1492. - description: 登录代码
  1493. in: query
  1494. name: username
  1495. required: true
  1496. type: string
  1497. produces:
  1498. - application/json
  1499. responses:
  1500. "200":
  1501. description: OK
  1502. schema:
  1503. $ref: '#/definitions/app.Response'
  1504. "500":
  1505. description: Internal Server Error
  1506. schema:
  1507. $ref: '#/definitions/app.Response'
  1508. summary: 获取登录ID
  1509. tags:
  1510. - 登录
  1511. /WRTrade/GetAllDeliveryGoods:
  1512. get:
  1513. produces:
  1514. - application/json
  1515. responses:
  1516. "200":
  1517. description: OK
  1518. schema:
  1519. $ref: '#/definitions/app.Response'
  1520. "500":
  1521. description: Internal Server Error
  1522. schema:
  1523. $ref: '#/definitions/app.Response'
  1524. security:
  1525. - ApiKeyAuth: []
  1526. summary: 获取带仓单分类的种类信息
  1527. tags:
  1528. - 仓单贸易
  1529. securityDefinitions:
  1530. ApiKeyAuth:
  1531. in: header
  1532. name: Authorization
  1533. type: apiKey
  1534. swagger: "2.0"