|
主要功能:
支持自定义字段映射
用法:
1. 添加规则:
PUT http://localhost:8888/config/report-column-mappings
[
{
"brokerName": "模拟交易",
"clientType": "TDX",
"clientVersion": "V1",
"reportName": "股份",
"sourceName": "持仓量",
"targetName": "持仓数量"
},
{
"brokerName": "模拟交易",
"clientType": "TDX",
"clientVersion": "0",
"reportName": "股份",
"sourceName": "持仓量",
"targetName": "持股数量"
}
]
上面这个示例,定义了模拟交易的“资金股份”报表的 2 条映射规则:
由于第 1 条规则指定更为“具体化”,因此将会以第 1 条规则为准。
reportName 可选:撤单、资金、股份、当日委托、当日成交
其中,brokerName、reportName 可以选择通配符 *,使用通配符的规则,在其他自动相同的条件下,优先级较低。
2. 查询规则:
GET http://localhost:8888/config/report-column-mappings
支持按条件过滤,比如:
GET http://localhost:8888/config/report-column-mappings/1
GET http://localhost:8888/config/report-column-mappings/1,2
GET http://localhost:8888/config/report-column-mappings?id=1&id=2
GET http://localhost:8888/config/report-column-mappings?brokerName=模拟交易&brokerName=国泰君安
3. 删除规则:
DELETE http://localhost:8888/config/report-column-mappings?brokerName=模拟交易&reportName=股份
DELETE http://localhost:8888/config/report-column-mappings/1
DELETE http://localhost:8888/config/report-column-mappings/1,2
DELETE http://localhost:8888/config/report-column-mappings?id=1&id=2
删除操作使用的过滤条件,类似于查询。由于删除操作较为危险,因此限制了必须添加过滤条件。
正版发布后,如有调整,请删除目录 %LocalAppData%\爱股网\策略易\x.x,后安装正式版。
未来策略易会提供界面帮助您做好字段映射的配置。
|
|