This commit is contained in:
vipg
2025-12-19 16:58:33 +08:00
parent 2e9526edb2
commit d3da3f8bba
2 changed files with 1 additions and 2 deletions

View File

@@ -2,7 +2,6 @@ curl -X POST http://127.0.0.1:20001/cn_futures_trading_record/open \
-H "Content-Type: application/json" \
-H "X-TradingRecordsRequest-ID: $(uuidgen)" \
-d '{
"event_type": "futures_trade",
"payload": {
"open_year": 2025,
"open_month": 6,

View File

@@ -13,7 +13,7 @@ import (
// TradingRecordsCreateRequest 交易记录创建请求参数结构
type TradingRecordsCreateRequest struct {
EventType string `json:"event_type" binding:"required"` // 固定为 "futures_trade"
EventType string `json:"event_type"`
Payload struct {
OpenYear int `json:"open_year" binding:"required,min=1900,max=2200"` // 开仓时间1900-2200
OpenMonth int `json:"open_month" binding:"required,min=1,max=12"` // 开仓时间1-12