账户与持仓
获取账户列表
操作名
TradeApiService.ACCOUNTS = accounts. 使用服务端方法 accounts。这是 *ApiService 常量,不是客户端成员方法。
请求
TigerRequest<AccountsResponse>ModelValue: ApiModel.
参数
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | None (omitted if not set) | no | — |
Account | string (nullable) | account | null | no | Not auto-filled for this operation |
返回
AccountsResponse inherits TigerResponse; its data property is 字典,键为 string,值为 列表,元素为 AccountItem. Key SDK fields: 动态字段.
示例
TigerRequest<AccountsResponse> request = new()
{
ApiMethodName = TradeApiService.ACCOUNTS,
ModelValue = new ApiModel()
};
AccountsResponse? response = await tradeClient.ExecuteAsync(request);响应类型
Dictionary<string, List<AccountItem>>? data = response?.Data; // response 或 data 缺失时为 null返回示例
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{
"account": "DU12345678",
"capability": "RegTMargin",
"status": "Active"
}
]
}获取环球账户资产
操作名
TradeApiService.ASSETS = assets. 使用服务端方法 assets。这是 *ApiService 常量,不是客户端成员方法。
请求
TigerRequest<TigerDictResponse>ModelValue: GlobalAssetsModel.
参数
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | None (omitted if not set) | no | — |
Account | string (nullable) | account | null | Auto-filled if empty | TradeClient uses DefaultAccount when empty |
SecretKey | string | secret_key | null | no | — |
Segment | Boolean | segment | None (omitted if not set) | Optional | — |
MarketValue | Boolean | market_value | None (omitted if not set) | Optional | — |
返回
TigerDictResponse inherits TigerResponse; its data property is 字典,键为 string,值为 object. Key SDK fields: 动态字段.
示例
TigerRequest<TigerDictResponse> request = new()
{
ApiMethodName = TradeApiService.ASSETS,
ModelValue = new GlobalAssetsModel { Account = tradeClient.GetDefaultAccount }
};
TigerDictResponse? response = await tradeClient.ExecuteAsync(request);响应类型
Dictionary<string, object>? data = response?.Data; // response 或 data 缺失时为 null返回示例
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{
"account": "DU12345678",
"summary": {
"netLiquidation": 125000.0,
"totalCashValue": 50000.0,
"grossPositionValue": 75000.0,
"initMarginReq": 25000.0,
"maintMarginReq": 20000.0,
"buyingPower": 100000.0,
"unrealizedPnl": 15866.0,
"realizedPnl": 3200.0
}
}
]
}获取综合/模拟账户资产
操作名
TradeApiService.PRIME_ASSETS = prime_assets. 使用服务端方法 prime_assets。这是 *ApiService 常量,不是客户端成员方法。
请求
TigerRequest<PrimeAssetResponse>ModelValue: PrimeAssetsModel.
参数
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | None (omitted if not set) | no | — |
Account | string (nullable) | account | null | Auto-filled if empty | TradeClient uses DefaultAccount when empty |
SecretKey | string | secret_key | null | no | — |
BaseCurrency | string | base_currency | null | Optional | — |
Consolidated | Boolean | consolidated | None (omitted if not set) | Optional | — |
返回
PrimeAssetResponse inherits TigerResponse; its data property is PrimeAssetItem. Key SDK fields: Account: string, UpdateTimestamp: long, Segments: list of Segment.
示例
TigerRequest<PrimeAssetResponse> request = new()
{
ApiMethodName = TradeApiService.PRIME_ASSETS,
ModelValue = new PrimeAssetsModel { Account = tradeClient.GetDefaultAccount }
};
PrimeAssetResponse? response = await tradeClient.ExecuteAsync(request);响应类型
PrimeAssetItem? data = response?.Data; // response 或 data 缺失时为 null返回示例
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{
"account": "DU12345678",
"segments": [
{"category": "S", "currency": "USD", "cashBalance": 50000.0, "grossPositionValue": 75000.0, "netLiquidation": 125000.0}
]
}
]
}获取历史资产分析
操作名
TradeApiService.ANALYTICS_ASSET = analytics_asset. 使用服务端方法 analytics_asset。这是 *ApiService 常量,不是客户端成员方法。
请求
TigerRequest<PrimeAnalyticsAssetResponse>ModelValue: PrimeAnalyticsAssetModel.
参数
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | None (omitted if not set) | no | — |
Account | string (nullable) | account | null | Auto-filled if empty | TradeClient uses DefaultAccount when empty |
SecretKey | string | secret_key | null | no | — |
SegType | SegmentType | seg_type | None (omitted if not set) | Optional | — |
Currency | Currency | currency | None (omitted if not set) | Optional | — |
SubAccount | string | sub_account | 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 |
返回
PrimeAnalyticsAssetResponse inherits TigerResponse; its data property is PrimeAnalyticsAssetItem. Key SDK fields: Summary: Summary, History: list of HistoryItem.
示例
TigerRequest<PrimeAnalyticsAssetResponse> request = new()
{
ApiMethodName = TradeApiService.ANALYTICS_ASSET,
ModelValue = new PrimeAnalyticsAssetModel { Account = tradeClient.GetDefaultAccount, SegType = SegmentType.SEC, Currency = Currency.USD, StartDate = "2026-01-01", EndDate = "2026-01-31" }
};
PrimeAnalyticsAssetResponse? response = await tradeClient.ExecuteAsync(request);响应类型
PrimeAnalyticsAssetItem? data = response?.Data; // response 或 data 缺失时为 null获取聚合资产
操作名
TradeApiService.AGGREGATE_ASSETS = aggregate_assets. 使用服务端方法 aggregate_assets。这是 *ApiService 常量,不是客户端成员方法。
请求
TigerRequest<AggregateAssetResponse>ModelValue: AggregateAssetModel.
参数
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | None (omitted if not set) | no | — |
Account | string (nullable) | account | null | Auto-filled if empty | TradeClient uses DefaultAccount when empty |
SecretKey | string | secret_key | null | no | — |
SegType | string | seg_type | null | Optional | — |
BaseCurrency | string | base_currency | null | Optional | — |
返回
AggregateAssetResponse inherits TigerResponse; its data property is AggregateAssetItem. Key SDK fields: Currency: string, CashBalance: double, CashBalanceWithInTransit: double, EquityWithLoan: double, NetLiquidation: double, InitMargin: double, MaintainMargin: double, TradeCurrencyMargin: double.
示例
TigerRequest<AggregateAssetResponse> request = new()
{
ApiMethodName = TradeApiService.AGGREGATE_ASSETS,
ModelValue = new AggregateAssetModel { Account = tradeClient.GetDefaultAccount, SegType = "SEC" }
};
AggregateAssetResponse? response = await tradeClient.ExecuteAsync(request);响应类型
AggregateAssetItem? data = response?.Data; // response 或 data 缺失时为 null获取持仓
操作名
TradeApiService.POSITIONS = positions. 使用服务端方法 positions。这是 *ApiService 常量,不是客户端成员方法。
请求
TigerRequest<PositionsResponse>ModelValue: PositionsModel.
参数
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | None (omitted if not set) | no | — |
Account | string (nullable) | account | null | Auto-filled if empty | TradeClient uses DefaultAccount when empty |
SecretKey | string | secret_key | null | no | — |
SecType | SecType | sec_type | None (omitted if not set) | Optional | — |
Market | Market | market | None (omitted if not set) | Optional | Enum value |
Currency | Currency | currency | None (omitted if not set) | Optional | — |
Symbol | string | symbol | null | Required | — |
Right | string | right | null | Optional | — |
Strike | Double | strike | None (omitted if not set) | Optional | — |
Expiry | string | expiry | null | Optional | — |
AssetQuoteType | AssetQuoteType | asset_quote_type | None (omitted if not set) | Optional | — |
返回
PositionsResponse inherits TigerResponse; its data property is PositionsItem. Key SDK fields: Items: list of PositionDetail.
示例
TigerRequest<PositionsResponse> request = new()
{
ApiMethodName = TradeApiService.POSITIONS,
ModelValue = new PositionsModel { Account = tradeClient.GetDefaultAccount, SecType = SecType.STK, Market = Market.US, Currency = Currency.USD, Symbol = "AAPL" }
};
PositionsResponse? response = await tradeClient.ExecuteAsync(request);响应类型
PositionsItem? data = response?.Data; // response 或 data 缺失时为 null返回示例
{
"code": 0,
"message": "success",
"timestamp": 1785528000000,
"data": [
{
"account": "DU12345678",
"symbol": "AAPL",
"position": 100,
"averageCost": 150.25,
"latestPrice": 308.91,
"marketValue": 30891.0,
"unrealizedPnl": 15866.0,
"secType": "STK",
"currency": "USD"
}
]
}预估可交易数量
操作名
TradeApiService.ESTIMATE_TRADABLE_QUANTITY = estimate_tradable_quantity. 使用服务端方法 estimate_tradable_quantity。这是 *ApiService 常量,不是客户端成员方法。
请求
TigerRequest<EstimateTradableQuantityResponse>ModelValue: EstimateTradableQuantityModel.
参数
| SDK property | C# type | API field | SDK default | Required | Constraints |
|---|---|---|---|---|---|
Lang | Language | lang | None (omitted if not set) | no | — |
Account | string (nullable) | account | null | Auto-filled if empty | TradeClient uses DefaultAccount when empty |
SecretKey | string | secret_key | null | no | — |
Symbol | string | symbol | null | Required | — |
Right | string (nullable) | right | null | Optional | — |
Strike | string (nullable) | strike | null | Optional | — |
Expiry | string (nullable) | expiry | null | Optional | — |
SegType | SegmentType | seg_type | None (omitted if not set) | Optional | — |
SecType | SecType | sec_type | None (omitted if not set) | Optional | — |
Action | ActionType | action | None (omitted if not set) | Optional | — |
OrderType | OrderType | order_type | None (omitted if not set) | Optional | price fields are conditionally required by order type |
LimitPrice | Double | limit_price | None (omitted if not set) | Optional | conditional order-price field |
StopPrice | Double | stop_price | None (omitted if not set) | Optional | — |
返回
EstimateTradableQuantityResponse inherits TigerResponse; its data property is TradableQuantityItem. Key SDK fields: TradableQuantity: Double, FinancingQuantity: Double, PositionQuantity: Double, TradablePositionQuantity: Double.
示例
TigerRequest<EstimateTradableQuantityResponse> request = new()
{
ApiMethodName = TradeApiService.ESTIMATE_TRADABLE_QUANTITY,
ModelValue = new EstimateTradableQuantityModel { Account = tradeClient.GetDefaultAccount, Symbol = "AAPL", Strike = "200", SegType = SegmentType.SEC, SecType = SecType.STK }
};
EstimateTradableQuantityResponse? response = await tradeClient.ExecuteAsync(request);响应类型
TradableQuantityItem? data = response?.Data; // response 或 data 缺失时为 nullUpdated 9 days ago
