# StockTradeStrategy **Repository Path**: Jing_jun_yang/stock-trade-strategy ## Basic Information - **Project Name**: StockTradeStrategy - **Description**: 股票交易策略系统-Java后台 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 21 - **Created**: 2022-10-16 - **Last Updated**: 2022-10-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #### 介绍 接口文档可视化界面见data/api.html [股票盯盘文章地址](https://www.snowballzz.com/2021/11/09/%E9%A1%B9%E7%9B%AE%E5%AE%9E%E6%88%98%E7%AF%87-%E8%82%A1%E7%A5%A8%E5%8C%BA%E9%97%B4%E4%BA%A4%E6%98%93%E7%9B%AF%E7%9B%98%E7%B3%BB%E7%BB%9F/) [股票盯盘线上体验地址](http://139.9.191.103:8068/#/login?redirect=%2Fdashboard)

股票盯盘系统

# 用户模块 ## 更新用户信息 ### 基本信息 **Path:** /user/update **Method:** POST **接口描述:** ### 请求参数 **Headers** | 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | ------------ | | Content-Type | application/json | 是 | | | **Body**
名称类型是否必须默认值备注其他信息
namestring必须名称
sexstring非必须性别 0男性 1女性
avatarstring非必须个性签名
emailstring必须邮箱,用来股票盯盘推送通知
## 用户信息详情 ### 基本信息 **Path:** /user/info **Method:** GET **接口描述:** ### 请求参数 ## 账密注册 ### 基本信息 **Path:** /user/register **Method:** POST **接口描述:** ### 请求参数 **Headers** | 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | ------------ | | Content-Type | application/x-www-form-urlencoded | 是 | | | **Body** | 参数名称 | 参数类型 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | ------------ | | username | text | 是 | | 用户名,4-16位 | | password | text | 是 | | 密码,6-20位 | ### 返回数据
名称类型是否必须默认值备注其他信息
## 账密登录 ### 基本信息 **Path:** /login **Method:** POST **接口描述:** ### 请求参数 **Headers** | 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | ------------ | | Content-Type | application/x-www-form-urlencoded | 是 | | | **Body** | 参数名称 | 参数类型 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | ------------ | | username | text | 是 | | 用户名 | | password | text | 是 | | 密码 | ### 返回数据
名称类型是否必须默认值备注其他信息
codenumber非必须
dataobject非必须
├─ passwordstring非必须
├─ sessionExpiresInnumber非必须
├─ sessionIdstring非必须
├─ usernamestring非必须
msgstring非必须
# 模拟组合模块 ## 模拟组合-创建 ### 基本信息 **Path:** /compose/add **Method:** POST **接口描述:** ### 请求参数 **Headers** | 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | ------------ | | Content-Type | application/json | 是 | | | **Body**
名称类型是否必须默认值备注其他信息
namestring必须组合名称
balanceTypenumber必须资金类型1-5,10W,20W,50W,100W,1000W
### 返回数据
名称类型是否必须默认值备注其他信息
## 模拟组合-删除 ### 基本信息 **Path:** /compose/delete/{id} **Method:** POST **接口描述:** ### 请求参数 **Headers** | 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | ------------ | | Content-Type | application/json | 是 | | | **路径参数** | 参数名称 | 示例 | 备注 | | ------------ | ------------ | ------------ | | id | | 组合ID | **Body**
名称类型是否必须默认值备注其他信息
### 返回数据
名称类型是否必须默认值备注其他信息
## 模拟组合-我的模拟组合列表 ### 基本信息 **Path:** /compose/list **Method:** GET **接口描述:** ### 请求参数 **Body**
名称类型是否必须默认值备注其他信息
namestring必须组合名称
### 返回数据
名称类型是否必须默认值备注其他信息
## 模拟组合-资金详情 ### 基本信息 **Path:** /compose/detail/{id} **Method:** GET **接口描述:** ### 请求参数 **路径参数** | 参数名称 | 示例 | 备注 | | ------------ | ------------ | ------------ | | id | 组合ID | | **Body**
名称类型是否必须默认值备注其他信息
namestring必须组合名称
### 返回数据
名称类型是否必须默认值备注其他信息
codenumber非必须
msgstring非必须
dataobject非必须
├─ idnumber非必须
├─ namestring非必须
├─ initBalancenumber非必须
├─ profitPercentnumber非必须
├─ profitMoneynumber非必须
├─ positionPercentnumber非必须
├─ cashnumber非必须
├─ capitalnumber非必须
├─ balancenumber非必须
├─ createTimestring非必须
├─ createIdnumber非必须
├─ balanceTypenull非必须
├─ updateTimestring非必须
├─ updateIdnumber非必须
├─ isDeletenull非必须
## 模拟组合-我的股票列表 ### 基本信息 **Path:** /compose/stock/item/list **Method:** GET **接口描述:** ### 请求参数 **Query** | 参数名称 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | | composeId | 是 | | 组合ID | ### 返回数据
名称类型是否必须默认值备注其他信息
codenumber非必须
msgstring非必须
dataobject []非必须

item 类型: object

├─ idnumber非必须
├─ composeIdnumber非必须
├─ stockCodestring非必须
├─ stockNamestring非必须
├─ costPricenumber非必须
├─ curPricenumber非必须
├─ capitalnumber非必须
├─ profitPercentnumber非必须
├─ profitMoneynumber非必须
├─ updownnumber非必须
├─ percentnumber非必须
├─ stockNumbernumber非必须
├─ createTimestring非必须
├─ createIdnumber非必须
├─ updateTimenull非必须
├─ updateIdnull非必须
├─ isDeletenull非必须
## 模拟组合-买入卖出股票 ### 基本信息 **Path:** /compose/stock/action/trade **Method:** POST **接口描述:** ### 请求参数 **Headers** | 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | ------------ | | Content-Type | application/json | 是 | | | **Body**
名称类型是否必须默认值备注其他信息
composeIdnumber必须组合ID
stockCodestring必须股票代码
stockNamestring必须股票名称
actionPricestring必须交易价格
actionNumbernumber必须交易数量,股
actionnumber必须0 买入 1 卖出
### 返回数据
名称类型是否必须默认值备注其他信息
codenumber非必须
msgstring非必须
dataobject非必须
├─ idnumber非必须
├─ composeIdnumber非必须
├─ stockCodestring非必须
├─ stockNamestring非必须
├─ actionPricenumber非必须
├─ totalMoneynumber非必须
├─ actionNumbernumber非必须
├─ createTimestring非必须
├─ createIdnumber非必须
├─ updateTimenull非必须
├─ updateIdnull非必须
├─ isDeletenull非必须
├─ commissionPernull非必须
├─ remarknull非必须
├─ taxPernull非必须
├─ actionnumber非必须
## 模拟组合-股票交易记录查询 ### 基本信息 **Path:** /compose/stock/action/queryByPage **Method:** POST **接口描述:** ### 请求参数 **Headers** | 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | ------------ | | Content-Type | application/json | 是 | | | **Body**
名称类型是否必须默认值备注其他信息
startDatestring非必须交易开始日期
endDatestring非必须交易结束日期
codestring非必须交易股票代码
pageNumberstring非必须页码
pageSizestring非必须每页数量
### 返回数据
名称类型是否必须默认值备注其他信息
codenumber非必须
msgstring非必须
dataobject非必须
├─ contentobject []非必须

item 类型: object

├─ idnumber非必须
├─ composeIdnumber非必须
├─ stockCodestring非必须
├─ stockNamestring非必须
├─ actionPricenumber非必须
├─ totalMoneynumber非必须
├─ actionNumbernumber非必须
├─ createTimestring非必须
├─ createIdnumber非必须
├─ updateTimenull非必须
├─ updateIdnull非必须
├─ isDeletenull非必须
├─ commissionPernull非必须
├─ remarknull非必须
├─ taxPernull非必须
├─ actionnumber非必须
├─ pageableobject非必须
├─ sortobject非必须
├─ sortedboolean非必须
├─ unsortedboolean非必须
├─ emptyboolean非必须
├─ offsetnumber非必须
├─ pageSizenumber非必须
├─ pageNumbernumber非必须
├─ pagedboolean非必须
├─ unpagedboolean非必须
├─ totalElementsnumber非必须
├─ totalPagesnumber非必须
├─ lastboolean非必须
├─ sizenumber非必须
├─ numbernumber非必须
├─ sortobject非必须
├─ sortedboolean非必须
├─ unsortedboolean非必须
├─ emptyboolean非必须
├─ numberOfElementsnumber非必须
├─ firstboolean非必须
├─ emptyboolean非必须
# 套利策略模块 ## 日内T0-我的计划列表 ### 基本信息 **Path:** /stock/tradePlan/t0/list **Method:** GET **接口描述:** ### 请求参数 **Query** | 参数名称 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | | composeId | 是 | | 组合ID | ### 返回数据
名称类型是否必须默认值备注其他信息
## 日内T0-创建/更新计划 ### 基本信息 **Path:** /stock/tradePlan/t0/save **Method:** POST **接口描述:** ### 请求参数 **Headers** | 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | ------------ | | Content-Type | application/json | 是 | | | **Body**
名称类型是否必须默认值备注其他信息
### 返回数据
名称类型是否必须默认值备注其他信息
## 日内T0-计划详情 ### 基本信息 **Path:** /stock/tradePlan/t0/detail/{id} **Method:** GET **接口描述:** ### 请求参数 **路径参数** | 参数名称 | 示例 | 备注 | | ------------ | ------------ | ------------ | | id | | 计划ID | ## 日内T0-启动计划 ### 基本信息 **Path:** /stock/tradePlan/t0/start/{id} **Method:** POST **接口描述:** ### 请求参数 **Headers** | 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | ------------ | | Content-Type | application/json | 是 | | | **路径参数** | 参数名称 | 示例 | 备注 | | ------------ | ------------ | ------------ | | id | | 计划ID | ## 日内T0-停止计划 ### 基本信息 **Path:** /stock/tradePlan/t0/stop/{id} **Method:** POST **接口描述:** ### 请求参数 **Headers** | 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | ------------ | | Content-Type | application/json | 是 | | | **路径参数** | 参数名称 | 示例 | 备注 | | ------------ | ------------ | ------------ | | id | | | ## 日内T0-删除计划 ### 基本信息 **Path:** /stock/tradePlan/t0/delete/{id} **Method:** POST **接口描述:** ### 请求参数 **Headers** | 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | ------------ | | Content-Type | application/json | 是 | | | **路径参数** | 参数名称 | 示例 | 备注 | | ------------ | ------------ | ------------ | | id | | | ## 网格交易-我的计划列表 ### 基本信息 **Path:** /stock/tradePlan/grid/list **Method:** GET **接口描述:** ### 请求参数 **Query** | 参数名称 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | | composeId | 是 | | 组合ID | **Body**
名称类型是否必须默认值备注其他信息
composeIdstring必须组合ID
stockCodestring必须代码
stockNamestring必须名称
basePricestring必须基准价
tradeStockNumstring必须每笔交易数量
increasePerstring必须上涨抛出幅度
decreasePerstring必须下跌买入幅度
statusstring非必须计划状态.未启动0,交易中1,已停止2
trustPricestring非必须成交价类型,对手1-5,默认对手1
sellLockTypestring非必须卖出锁定筹码类型0,1
lockStockNumstring非必须锁定剩余最低数量
sellTotalStockNumstring非必须锁定连续卖出笔数
buyLockTypestring非必须买入锁定筹码类型0,1
buyTotalPricestring非必须连续买入最大金额
buyTotalStockNumstring非必须连续买入最大笔数
highPriceValstring非必须交易区间最高价格
lowPriceValstring非必须交易区间最低价格
### 返回数据
名称类型是否必须默认值备注其他信息
codenumber非必须
msgstring非必须
dataobject非必须
├─ contentobject []非必须

item 类型: object

├─ idnumber非必须
├─ composeIdnumber非必须
├─ stockCodestring非必须
├─ stockNamestring非必须
├─ basePricenumber非必须
├─ increasePernumber非必须
├─ decreasePernumber非必须
├─ createIdnumber非必须
├─ createTimestring非必须
├─ updateIdnull非必须
├─ updateTimenull非必须
├─ statusnumber非必须
├─ profitMoneynull非必须
├─ profitNumbernull非必须
├─ summaryProfitstring非必须
## 网格交易-创建/更新计划 ### 基本信息 **Path:** /stock/tradePlan/grid/save **Method:** POST **接口描述:** ### 请求参数 **Headers** | 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | ------------ | | Content-Type | application/json | 是 | | | **Body**
名称类型是否必须默认值备注其他信息
composeIdstring必须组合ID
stockCodestring必须代码
stockNamestring必须名称
basePricestring必须基准价
tradeStockNumstring必须每笔交易数量
increasePerstring必须上涨抛出幅度
decreasePerstring必须下跌买入幅度
statusstring非必须计划状态.未启动0,交易中1,已停止2
trustPricestring非必须成交价类型,对手1-5,默认对手1
sellLockTypestring非必须卖出锁定筹码类型0,1
lockStockNumstring非必须锁定剩余最低数量
sellTotalStockNumstring非必须锁定连续卖出笔数
buyLockTypestring非必须买入锁定筹码类型0,1
buyTotalPricestring非必须连续买入最大金额
buyTotalStockNumstring非必须连续买入最大笔数
highPriceValstring非必须交易区间最高价格
lowPriceValstring非必须交易区间最低价格
## 网格交易-计划详情 ### 基本信息 **Path:** /stock/tradePlan/grid/detail/{id} **Method:** GET **接口描述:** ### 请求参数 **路径参数** | 参数名称 | 示例 | 备注 | | ------------ | ------------ | ------------ | | id | | 计划ID | ### 返回数据
名称类型是否必须默认值备注其他信息
codenumber非必须
msgstring非必须
dataobject非必须
├─ planDataobject非必须
├─ idnumber非必须
├─ composeIdnumber非必须
├─ stockCodestring非必须
├─ stockNamestring非必须
├─ basePricenumber非必须
├─ tradeStockNumnumber非必须
├─ increasePernumber非必须
├─ decreasePernumber非必须
├─ sellLockTypenull非必须
├─ lockStockNumnull非必须
├─ sellTotalStockNumnull非必须
├─ buyLockTypenull非必须
├─ buyTotalPricenull非必须
├─ buyTotalStockNumnull非必须
├─ trustPricenull非必须
├─ highPriceValnull非必须
├─ lowPriceValnull非必须
├─ highBreakpointnull非必须
├─ lowBreakpointnull非必须
├─ createIdnumber非必须
├─ createTimestring非必须
├─ updateIdnumber非必须
├─ updateTimestring非必须
├─ statusnumber非必须
├─ isCancelOrdernull非必须
├─ nextSellPricenumber非必须
├─ nextBuyPricenumber非必须
├─ stockNumbernumber非必须
├─ buyNumbernumber非必须
├─ sellNumbernumber非必须
├─ pricenumber非必须
├─ updownnumber非必须
├─ percentnumber非必须
├─ stockCodestring非必须
├─ stockNamestring非必须
├─ tradeRecordListstring []非必须

item 类型: string

├─ 非必须
├─ tradeProfitListstring []非必须

item 类型: string

├─ 非必须
## 网格交易-启动计划 ### 基本信息 **Path:** /stock/tradePlan/grid/start/{id} **Method:** POST **接口描述:** ### 请求参数 **Headers** | 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | ------------ | | Content-Type | application/json | 是 | | | **路径参数** | 参数名称 | 示例 | 备注 | | ------------ | ------------ | ------------ | | id | | 计划ID | ### 返回数据
名称类型是否必须默认值备注其他信息
codenumber非必须
msgstring非必须
datastring非必须
## 网格交易-停止计划 ### 基本信息 **Path:** /stock/tradePlan/grid/stop/{id} **Method:** POST **接口描述:** ### 请求参数 **Headers** | 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | ------------ | | Content-Type | application/json | 是 | | | **路径参数** | 参数名称 | 示例 | 备注 | | ------------ | ------------ | ------------ | | id | | 计划ID | ### 返回数据
名称类型是否必须默认值备注其他信息
## 网格交易-删除计划 ### 基本信息 **Path:** /stock/tradePlan/grid/delete/{id} **Method:** POST **接口描述:** ### 请求参数 **Headers** | 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | ------------ | | Content-Type | application/json | 是 | | | **路径参数** | 参数名称 | 示例 | 备注 | | ------------ | ------------ | ------------ | | id | | 计划ID | # 股票通用模块 ## 搜索股票信息 ### 基本信息 **Path:** /stock/common/queryByPage **Method:** GET **接口描述:** ### 请求参数 **Query** | 参数名称 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | | key | 是 | 60003 | code或name | ### 返回数据
名称类型是否必须默认值备注其他信息
codenumber非必须
msgstring非必须
dataobject非必须
├─ contentobject []非必须

item 类型: object

├─ idnumber必须
├─ codestring必须
├─ namestring必须
├─ marketstring必须
├─ pageableobject非必须
├─ sortobject非必须
├─ sortedboolean非必须
├─ unsortedboolean非必须
├─ emptyboolean非必须
├─ offsetnumber非必须
├─ pageNumbernumber非必须
├─ pageSizenumber非必须
├─ pagedboolean非必须
├─ unpagedboolean非必须
├─ totalElementsnumber非必须
├─ lastboolean非必须
├─ totalPagesnumber非必须
├─ numbernumber非必须
├─ sizenumber非必须
├─ sortobject非必须
├─ sortedboolean非必须
├─ unsortedboolean非必须
├─ emptyboolean非必须
├─ numberOfElementsnumber非必须
├─ firstboolean非必须
├─ emptyboolean非必须
## 获取股票最新价格信息 ### 基本信息 **Path:** /stock/realtime/data **Method:** GET **接口描述:** ### 请求参数 **Query** | 参数名称 | 是否必须 | 示例 | 备注 | | ------------ | ------------ | ------------ | ------------ | | code | 是 | 600036 | | ### 返回数据
名称类型是否必须默认值备注其他信息
codenumber非必须
msgstring非必须
dataobject非必须
├─ codestring非必须
├─ typestring非必须
├─ symbolstring非必须
├─ statusnumber非必须
├─ namestring非必须
├─ askvol1number非必须
├─ askvol2number非必须
├─ askvol3number非必须
├─ askvol4number非必须
├─ askvol5number非必须
├─ ask1number非必须
├─ ask2number非必须
├─ ask3number非必须
├─ ask4number非必须
├─ ask5number非必须
├─ bidvol5number非必须
├─ bidvol4number非必须
├─ bidvol3number非必须
├─ bidvol2number非必须
├─ bidvol1number非必须
├─ bid5number非必须
├─ bid4number非必须
├─ bid3number非必须
├─ bid2number非必须
├─ bid1number非必须
├─ yestclosenumber非必须
├─ opennumber非必须
├─ highnumber非必须
├─ lownumber非必须
├─ pricenumber非必须
├─ updownnumber非必须
├─ percentnumber非必须
├─ volumenumber非必须
├─ turnovernumber非必须
├─ arrowstring非必须
├─ timestring非必须
├─ updatestring非必须