资金与划转
划转记录
操作名
TradeApiService.SEGMENT_FUND_HISTORY = segment_fund_history。该常量用于设置 TigerRequest.ApiMethodName。
请求
TigerRequest<SegmentFundsResponse>ModelValue: SegmentFundModel.
参数
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | CLR 默认值;序列化时省略 | no | — |
Account | string (nullable) | account | null | Auto-filled if empty | 为空时 TradeClient 从 TigerConfig.DefaultAccount 注入;若仍为空则验证失败 |
SecretKey | string | secret_key | null | no | — |
FromSegment | SegmentType | from_segment | CLR 默认值;序列化时省略 | Optional | — |
ToSegment | SegmentType | to_segment | CLR 默认值;序列化时省略 | Optional | — |
Currency | Currency | currency | CLR 默认值;序列化时省略 | Optional | — |
Amount | Double | amount | CLR 默认值;序列化时省略 | Optional | — |
返回
SegmentFundsResponse 继承 TigerResponse;其 Data 为 List<SegmentFundItem>。
示例
TigerRequest<SegmentFundsResponse> request = new()
{
ApiMethodName = TradeApiService.SEGMENT_FUND_HISTORY,
ModelValue = new SegmentFundModel { Account = tradeClient.GetDefaultAccount, FromSegment = SegmentType.SEC, ToSegment = SegmentType.FUT, Currency = Currency.USD, Amount = 1 }
};
SegmentFundsResponse? response = await tradeClient.ExecuteAsync(request);响应类型
List<SegmentFundItem>? data = response?.Data; // response 或 data 缺失时为 nullData 字段(每个 SegmentFundItem)
| 字段 | API 字段 | C# 类型 | 说明 |
|---|---|---|---|
Id | id | Int64 | 划转记录标识 |
FromSegment | fromSegment | string | 转出账户分区 |
ToSegment | toSegment | string | 转入账户分区 |
Currency | currency | string | 划转币种 |
Amount | amount | Double | 划转金额 |
Status | status | SegmentFundStatus | 划转状态 |
StatusDesc | statusDesc | string | 划转状态说明 |
Message | message | string | 划转结果消息 |
SettledTime | settledAt | Int64 | 结算时间戳 |
UpdatedTime | updatedAt | Int64 | 更新时间戳 |
CreatedTime | createdAt | Int64 | 创建时间戳 |
返回示例
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{
"id": 10001,
"fromSegment": "SEC",
"toSegment": "FUT",
"currency": "USD",
"amount": 5000.0,
"status": "SUCCESS",
"statusDesc": "Success"
}
]
}频率限制
基础额度:每分钟 60 次。
可划转资金查询
操作名
TradeApiService.SEGMENT_FUND_AVAILABLE = segment_fund_available。该常量用于设置 TigerRequest.ApiMethodName。
请求
TigerRequest<SegmentFundAvailableResponse>ModelValue: SegmentFundModel.
参数
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | CLR 默认值;序列化时省略 | no | — |
Account | string (nullable) | account | null | Auto-filled if empty | 为空时 TradeClient 从 TigerConfig.DefaultAccount 注入;若仍为空则验证失败 |
SecretKey | string | secret_key | null | no | — |
FromSegment | SegmentType | from_segment | CLR 默认值;序列化时省略 | Optional | — |
ToSegment | SegmentType | to_segment | CLR 默认值;序列化时省略 | Optional | — |
Currency | Currency | currency | CLR 默认值;序列化时省略 | Optional | — |
Amount | Double | amount | CLR 默认值;序列化时省略 | Optional | — |
返回
SegmentFundAvailableResponse 继承 TigerResponse;其 Data 为 List<SegmentFundAvailableItem>。
示例
TigerRequest<SegmentFundAvailableResponse> request = new()
{
ApiMethodName = TradeApiService.SEGMENT_FUND_AVAILABLE,
ModelValue = new SegmentFundModel { Account = tradeClient.GetDefaultAccount, FromSegment = SegmentType.SEC, ToSegment = SegmentType.FUT, Currency = Currency.USD, Amount = 1 }
};
SegmentFundAvailableResponse? response = await tradeClient.ExecuteAsync(request);响应类型
List<SegmentFundAvailableItem>? data = response?.Data; // response 或 data 缺失时为 nullData 字段(每个 SegmentFundAvailableItem)
| 字段 | API 字段 | C# 类型 | 说明 |
|---|---|---|---|
FromSegment | fromSegment | string | 资金所在账户分区 |
Currency | currency | string | 币种 |
Amount | amount | Double | 可划转金额 |
返回示例
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{"segment": "SEC", "currency": "USD", "availableFunds": 50000.0},
{"segment": "FUT", "currency": "USD", "availableFunds": 20000.0}
]
}频率限制
基础额度:每分钟 60 次。
资金划转
操作名
TradeApiService.TRANSFER_FUND = transfer_fund。该常量用于设置 TigerRequest.ApiMethodName。
请求
TigerRequest<DepositWithdrawResponse>ModelValue: DepositWithdrawModel.
参数
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | CLR 默认值;序列化时省略 | no | — |
Account | string (nullable) | account | null | Auto-filled if empty | 为空时 TradeClient 从 TigerConfig.DefaultAccount 注入;若仍为空则验证失败 |
SecretKey | string | secret_key | null | no | — |
SegType | SegmentType (nullable) | seg_type | null | Optional | — |
StartDate | string | start_date | null | Optional | Timestamp or date format; maintain chronological order |
EndDate | string | end_date | null | Optional | Timestamp or date format; maintain chronological order |
Currency | string | currency | null | Optional | — |
Limit | int (nullable) | limit | null | Optional | Positive integer |
Page | int (nullable) | page | null | Optional | Positive integer |
返回
DepositWithdrawResponse 继承 TigerResponse;其 Data 为 List<DepositWithdrawItem>。
示例
TigerRequest<DepositWithdrawResponse> request = new()
{
ApiMethodName = TradeApiService.TRANSFER_FUND,
ModelValue = new DepositWithdrawModel { Account = tradeClient.GetDefaultAccount, SegType = SegmentType.SEC, StartDate = "2026-01-01", EndDate = "2026-01-31", Currency = "USD" }
};
DepositWithdrawResponse? response = await tradeClient.ExecuteAsync(request);响应类型
List<DepositWithdrawItem>? data = response?.Data; // response 或 data 缺失时为 nullData 字段(每个 DepositWithdrawItem)
| 字段 | API 字段 | C# 类型 | 说明 |
|---|---|---|---|
Id | id | string | 资金记录标识 |
RefId | refId | string | 关联记录标识 |
Type | type | string | 资金变动类型 |
TypeDesc | typeDesc | string | 资金变动类型说明 |
Currency | currency | string | 币种 |
Amount | amount | double | 变动金额 |
BusinessDate | businessDate | string | 业务日期 |
CompletedStatus | completedStatus | string | 完成状态 |
UpdatedAt | updatedAt | long | 更新时间戳 |
CreatedAt | createdAt | long | 创建时间戳 |
返回示例
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": {
"id": 10002
}
}频率限制
基础额度:每分钟 60 次。
资金明细
操作名
TradeApiService.FUND_DETAILS = fund_details。该常量用于设置 TigerRequest.ApiMethodName。
请求
TigerRequest<FundDetailsResponse>ModelValue: FundDetailsModel.
参数
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | CLR 默认值;序列化时省略 | no | — |
Account | string (nullable) | account | null | Auto-filled if empty | 为空时 TradeClient 从 TigerConfig.DefaultAccount 注入;若仍为空则验证失败 |
SecretKey | string | secret_key | null | no | — |
SegTypes | 列表,元素为 string | seg_types | null | Optional | — |
FundType | string | fund_type | null | Optional | — |
Currency | string | currency | null | Optional | — |
StartDate | string | start_date | null | Optional | Timestamp or date format; maintain chronological order |
EndDate | string | end_date | null | Optional | Timestamp or date format; maintain chronological order |
Start | long (nullable) | start | null | Optional | — |
Limit | long (nullable) | limit | null | Optional | Positive integer |
返回
FundDetailsResponse 继承 TigerResponse;其 Data 为 FundDetailsPageItem。
示例
TigerRequest<FundDetailsResponse> request = new()
{
ApiMethodName = TradeApiService.FUND_DETAILS,
ModelValue = new FundDetailsModel { Account = tradeClient.GetDefaultAccount, SegTypes = new List<string> { "SEC" }, Currency = "USD", StartDate = "2026-01-01", EndDate = "2026-01-31" }
};
FundDetailsResponse? response = await tradeClient.ExecuteAsync(request);响应类型
FundDetailsPageItem? data = response?.Data; // response 或 data 缺失时为 nullData 字段(FundDetailsPageItem)
| 字段 | API 字段 | C# 类型 | 说明 |
|---|---|---|---|
Page | page | int | 当前页码 |
Limit | limit | int | 每页数量 |
ItemCount | itemCount | int | 总记录数 |
PageCount | pageCount | int | 总页数 |
Timestamp | timestamp | long | 查询时间戳 |
Items | items | List<FundDetailsItem> | 资金明细列表 |
FundDetailsItem 字段 | API 字段 | C# 类型 | 说明 |
|---|---|---|---|
Id | id | long | 资金明细标识 |
Currency | currency | string | 币种 |
Type | type | string | 资金变动类型 |
Desc | desc | string | 资金变动说明 |
ContractName | contractName | string | 关联合约名称 |
SegType | segType | string | 账户分区类型 |
Amount | amount | double | 变动金额 |
BusinessDate | businessDate | string | 业务日期 |
UpdatedAt | updatedAt | long | 更新时间戳 |
返回示例
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": {
"netLiquidation": 125000.0,
"totalCashValue": 50000.0,
"settledCash": 48000.0,
"buyingPower": 100000.0
}
}频率限制
基础额度:每分钟 10 次。
划转分部资金
操作名
TradeApiService.TRANSFER_SEGMENT_FUND = transfer_segment_fund。该常量用于设置 TigerRequest.ApiMethodName。
请求
TigerRequest<SegmentFundResponse>ModelValue: SegmentFundModel.
参数
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | CLR 默认值;序列化时省略 | no | — |
Account | string (nullable) | account | null | Auto-filled if empty | 为空时 TradeClient 从 TigerConfig.DefaultAccount 注入;若仍为空则验证失败 |
SecretKey | string | secret_key | null | no | — |
FromSegment | SegmentType | from_segment | CLR 默认值;序列化时省略 | Optional | — |
ToSegment | SegmentType | to_segment | CLR 默认值;序列化时省略 | Optional | — |
Currency | Currency | currency | CLR 默认值;序列化时省略 | Optional | — |
Amount | Double | amount | CLR 默认值;序列化时省略 | Optional | — |
返回
SegmentFundResponse 继承 TigerResponse;其 Data 为 SegmentFundItem。
示例
TigerRequest<SegmentFundResponse> request = new()
{
ApiMethodName = TradeApiService.TRANSFER_SEGMENT_FUND,
ModelValue = new SegmentFundModel { Account = tradeClient.GetDefaultAccount, FromSegment = SegmentType.SEC, ToSegment = SegmentType.FUT, Currency = Currency.USD, Amount = 1 }
};
SegmentFundResponse? response = await tradeClient.ExecuteAsync(request);响应类型
SegmentFundItem? data = response?.Data; // response 或 data 缺失时为 nullData 字段
| 响应数据结构 | 说明 |
|---|---|
SegmentFundItem | 完整字段见划转记录的 Data 字段。 |
返回示例
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": {
"id": 10003
}
}频率限制
基础额度:每分钟 60 次。
取消划转
操作名
TradeApiService.CANCEL_SEGMENT_FUND = cancel_segment_fund。该常量用于设置 TigerRequest.ApiMethodName。
请求
TigerRequest<SegmentFundResponse>ModelValue: SegmentFundModel.
参数
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | CLR 默认值;序列化时省略 | no | — |
Account | string (nullable) | account | null | Auto-filled if empty | 为空时 TradeClient 从 TigerConfig.DefaultAccount 注入;若仍为空则验证失败 |
SecretKey | string | secret_key | null | no | — |
FromSegment | SegmentType | from_segment | CLR 默认值;序列化时省略 | Optional | — |
ToSegment | SegmentType | to_segment | CLR 默认值;序列化时省略 | Optional | — |
Currency | Currency | currency | CLR 默认值;序列化时省略 | Optional | — |
Amount | Double | amount | CLR 默认值;序列化时省略 | Optional | — |
返回
SegmentFundResponse 继承 TigerResponse;其 Data 为 SegmentFundItem。
示例
TigerRequest<SegmentFundResponse> request = new()
{
ApiMethodName = TradeApiService.CANCEL_SEGMENT_FUND,
ModelValue = new SegmentFundModel { Account = tradeClient.GetDefaultAccount, FromSegment = SegmentType.SEC, ToSegment = SegmentType.FUT, Currency = Currency.USD, Amount = 1 }
};
SegmentFundResponse? response = await tradeClient.ExecuteAsync(request);响应类型
SegmentFundItem? data = response?.Data; // response 或 data 缺失时为 nullData 字段
| 响应数据结构 | 说明 |
|---|---|
SegmentFundItem | 完整字段见划转记录的 Data 字段。 |
返回示例
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": {
"id": 10003,
"status": "CANCELLED"
}
}频率限制
基础额度:每分钟 60 次。
外汇下单
操作名
TradeApiService.PLACE_FOREX_ORDER = place_forex_order。该常量用于设置 TigerRequest.ApiMethodName。
请求
TigerRequest<ForexTradeOrderResponse>ModelValue: ForexTradeOrderModel.
参数
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | CLR 默认值;序列化时省略 | no | — |
Account | string (nullable) | account | null | Auto-filled if empty | 为空时 TradeClient 从 TigerConfig.DefaultAccount 注入;若仍为空则验证失败 |
SecretKey | string | secret_key | null | no | — |
SourceCurrency | Currency | source_currency | CLR 默认值;序列化时省略 | Optional | — |
SourceAmount | Double | source_amount | CLR 默认值;序列化时省略 | Optional | — |
TargetCurrency | Currency | target_currency | CLR 默认值;序列化时省略 | Optional | — |
SegType | SegmentType | seg_type | CLR 默认值;序列化时省略 | Optional | — |
TimeInForce | TimeInForce | time_in_force | TimeInForce.DAY | Optional | — |
返回
ForexTradeOrderResponse 继承 TigerResponse;其 Data 为 TradeOrder。
示例
TigerRequest<ForexTradeOrderResponse> request = new()
{
ApiMethodName = TradeApiService.PLACE_FOREX_ORDER,
ModelValue = new ForexTradeOrderModel { Account = tradeClient.GetDefaultAccount, SourceCurrency = Currency.USD, SourceAmount = 1, TargetCurrency = Currency.HKD, SegType = SegmentType.SEC }
};
ForexTradeOrderResponse? response = await tradeClient.ExecuteAsync(request);响应类型
TradeOrder? data = response?.Data; // response 或 data 缺失时为 nullData 字段
Data 为 TradeOrder:
| 字段 | API 字段 | C# 类型 | 说明 |
|---|---|---|---|
Symbol | symbol | string | 合约代码 |
Market | market | string | 所属市场 |
SecType | secType | string | 证券类型 |
Currency | currency | string | 计价币种 |
Expiry | expiry | string | 到期日 |
Strike | strike | string | 行权价 |
Right | right | string | 期权方向 |
Multiplier | multiplier | double | 合约乘数 |
Identifier | identifier | string | 合约标识 |
Id | id | Int64 | 订单标识 |
OrderId | orderId | int | 订单号 |
ExternalId | externalId | string | 外部订单标识 |
ParentId | parentId | Int64 | 父订单标识 |
Account | account | string | 账户号 |
Action | action | string | 买卖方向 |
OrderType | orderType | string | 订单类型 |
LimitPrice | limitPrice | Double | 限价 |
AuxPrice | auxPrice | Double | 辅助价格 |
TrailingPercent | trailingPercent | Double | 跟踪百分比 |
TotalQuantity | totalQuantity | Int64 | 委托总数量 |
TotalQuantityScale | totalQuantityScale | Int32 | 委托数量小数位数 |
FilledQuantity | filledQuantity | Int64 | 已成交数量 |
FilledQuantityScale | filledQuantityScale | Int32 | 成交数量小数位数 |
TotalCashAmount | totalCashAmount | Double | 委托总金额 |
FilledCashAmount | filledCashAmount | Double | 已成交金额 |
RefundCashAmount | refundCashAmount | Double | 已退回金额 |
LastFillPrice | lastFillPrice | Double | 最近成交价 |
AvgFillPrice | avgFillPrice | Double | 平均成交价 |
TimeInForce | timeInForce | string | 有效期类型 |
ExpireTime | expireTime | Int64 | 到期时间戳 |
GoodTillDate | goodTillDate | string | 有效截止日期 |
OutsideRth | outsideRth | Boolean | 是否允许常规交易时段外交易 |
TradingSessionType | tradingSessionType | string | 交易时段类型 |
Commission | commission | Double | 佣金 |
Gst | gst | Double | 商品及服务税 |
RealizedPnl | realizedPnl | Double | 已实现盈亏 |
Remark | remark | string | 订单备注 |
Liquidation | liquidation | Boolean | 是否为强制平仓订单 |
TriggerStatus | triggerStatus | string | 条件单触发状态 |
OpenTime | openTime | Int64 | 订单创建时间戳 |
UpdateTime | updateTime | Int64 | 订单更新时间戳 |
LatestTime | latestTime | Int64 | 最近状态更新时间戳 |
Name | name | string | 合约名称 |
LatestPrice | latestPrice | Double | 最新价 |
AttrDesc | attrDesc | string | 订单属性说明 |
UserMark | userMark | string | 用户标记 |
AttrList | attrList | List<string> | 订单属性列表 |
OcaGroupId | ocaGroupId | int | OCA 订单组标识 |
ComboLegs | comboLegs | string | 组合订单腿信息 |
AllocAccounts | allocAccounts | List<string> | 分配账户列表 |
AllocShares | allocShares | List<Double> | 账户分配数量列表 |
AlgoStrategy | algoStrategy | string | 算法策略 |
AlgoParameters | algoParameters | List<TagValue> | 算法参数列表 |
Status | status | OrderStatus | 订单状态 |
ReplaceStatus | replaceStatus | string | 改单状态 |
CancelStatus | cancelStatus | string | 撤单状态 |
Source | source | string | 订单来源 |
Discount | discount | Int32 | 折扣 |
CanModify | canModify | Boolean | 是否可改单 |
CanCancel | canCancel | Boolean | 是否可撤单 |
IsOpen | isOpen | Boolean | 是否为未完成订单 |
ComboType | comboType | string | 组合订单类型 |
ComboTypeDesc | comboTypeDesc | string | 组合订单类型说明 |
Legs | legs | List<OrderLeg> | 订单腿列表 |
每个 TagValue:
| 字段 | API 字段 | C# 类型 | 说明 |
|---|---|---|---|
Tag | tag | string | 参数名称 |
Value | value | string? | 参数值 |
每个 OrderLeg:
| 字段 | API 字段 | C# 类型 | 说明 |
|---|---|---|---|
Market | market | string | 所属市场 |
Currency | currency | string | 计价币种 |
Multiplier | multiplier | Double | 合约乘数 |
TotalQuantity | totalQuantity | Double | 委托总数量 |
FilledQuantity | filledQuantity | Double | 已成交数量 |
AvgFilledPrice | avgFilledPrice | Double | 平均成交价 |
CreatedAt | createdAt | Int64 | 创建时间戳 |
UpdatedAt | updatedAt | Int64 | 更新时间戳 |
返回示例
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": {
"id": 10004,
"orderId": 890001
}
}Updated about 1 month ago
