Funds and Transfers
get_fund_details
get_fund_detailsSignature
pub async fn get_fund_details( &self, req: FundDetailsRequest, ) -> Result<Vec<FundDetails>, TigerError>
Description
Filter segments/type/currency/millisecond range/limit/token.
Parameters
| Parameter | Rust type | Requirement | SDK default |
|---|---|---|---|
| req.account | Option<String> | Optional; most TradeClient methods inject the default account when None | None (omitted) |
| req.seg_types | Option<Vec<String>> | Optional | None (omitted) |
| req.fund_type | Option<String> | Optional | None (omitted) |
| req.currency | Option<String> | Optional | None (omitted) |
| req.start_date | Option<i64> | Optional | None (omitted) |
| req.end_date | Option<i64> | Optional | None (omitted) |
| req.limit | Option<i32> | Optional | None (omitted) |
| req.page_token | Option<String> | Optional | None (omitted) |
| req.lang | Option<String> | Optional | None (omitted) |
Return
Result<Vec<FundDetails>, TigerError>
| Field | Type | Description |
|---|---|---|
| id | String | ID |
| account | String | Account |
| seg_type | String | Segment type |
| fund_type | String | Fund type |
| currency | String | Currency |
| amount | f64 | Turnover amount |
| balance | f64 | Balance |
| occur_time | i64 | Occur time |
| remark | String | Remark |
| external_id | String | External ID |
Example
use std::sync::Arc;
use tigeropen::client::http_client::HttpClient;
use tigeropen::config::ClientConfig;
use tigeropen::error::TigerError;
use tigeropen::model::order::*;
use tigeropen::model::quote::*;
use tigeropen::model::quote_requests::*;
use tigeropen::model::trade_requests::*;
use tigeropen::push::*;
use tigeropen::quote::QuoteClient;
use tigeropen::trade::TradeClient;
async fn example_get_fund_details(config: ClientConfig, quote: &QuoteClient, trade: &TradeClient, push: &Arc<PushClient>) -> Result<(), TigerError> {
let result_0 = trade.get_fund_details(FundDetailsRequest { ..Default::default() }).await?;
Ok(())
}
Response example
[
{
"id": "",
"account": "",
"seg_type": "",
"fund_type": "",
"currency": "",
"amount": 0,
"balance": 0,
"occur_time": 0
}
]get_funding_history
get_funding_historySignature
pub async fn get_funding_history( &self, req: FundingHistoryRequest, ) -> Result<Vec<FundingHistoryItem>, TigerError>
Description
Segment/currency/range/limit optional.
Parameters
| Parameter | Rust type | Requirement | SDK default |
|---|---|---|---|
| req.account | Option<String> | Optional; most TradeClient methods inject the default account when None | None (omitted) |
| req.seg_type | Option<String> | Optional | None (omitted) |
| req.currency | Option<String> | Optional | None (omitted) |
| req.start_date | Option<i64> | Optional | None (omitted) |
| req.end_date | Option<i64> | Optional | None (omitted) |
| req.limit | Option<i32> | Optional | None (omitted) |
| req.lang | Option<String> | Optional | None (omitted) |
Return
Result<Vec<FundingHistoryItem>, TigerError>
| Field | Type | Description |
|---|---|---|
| id | i64 | ID |
| ref_id | String | Reference ID |
| fund_type | i32 | Fund type |
| type_desc | String | Type description |
| currency | String | Currency |
| amount | f64 | Turnover amount |
| business_date | String | Business date |
| status | String | Trading status |
| status_desc | String | Status description |
| completed_status | bool | Completed status |
| created_at | i64 | Created at |
| updated_at | i64 | Updated at |
Example
use std::sync::Arc;
use tigeropen::client::http_client::HttpClient;
use tigeropen::config::ClientConfig;
use tigeropen::error::TigerError;
use tigeropen::model::order::*;
use tigeropen::model::quote::*;
use tigeropen::model::quote_requests::*;
use tigeropen::model::trade_requests::*;
use tigeropen::push::*;
use tigeropen::quote::QuoteClient;
use tigeropen::trade::TradeClient;
async fn example_get_funding_history(config: ClientConfig, quote: &QuoteClient, trade: &TradeClient, push: &Arc<PushClient>) -> Result<(), TigerError> {
let result_0 = trade.get_funding_history(FundingHistoryRequest { ..Default::default() }).await?;
Ok(())
}
Response example
[
{
"id": 0,
"ref_id": "",
"fund_type": 0,
"type_desc": "",
"currency": "",
"amount": 0,
"business_date": "",
"status": ""
}
]get_segment_fund_available
get_segment_fund_availableSignature
pub async fn get_segment_fund_available( &self, req: SegmentFundRequest, ) -> Result<Vec<SegmentFundAvailableItem>, TigerError>
Description
Segments/currency according to account.
Parameters
| Parameter | Rust type | Requirement | SDK default |
|---|---|---|---|
| req.account | Option<String> | Optional; most TradeClient methods inject the default account when None | None (omitted) |
| req.id | Option<String> | Optional | None (omitted) |
| req.from_segment | Option<String> | Optional | None (omitted) |
| req.to_segment | Option<String> | Optional | None (omitted) |
| req.currency | Option<String> | Optional | None (omitted) |
| req.amount | Option<f64> | Optional | None (omitted) |
| req.limit | Option<i32> | Optional | None (omitted) |
| req.lang | Option<String> | Optional | None (omitted) |
Return
Result<Vec<SegmentFundAvailableItem>, TigerError>
| Field | Type | Description |
|---|---|---|
| from_segment | String | From segment |
| currency | String | Currency |
| amount | f64 | Turnover amount |
Example
use std::sync::Arc;
use tigeropen::client::http_client::HttpClient;
use tigeropen::config::ClientConfig;
use tigeropen::error::TigerError;
use tigeropen::model::order::*;
use tigeropen::model::quote::*;
use tigeropen::model::quote_requests::*;
use tigeropen::model::trade_requests::*;
use tigeropen::push::*;
use tigeropen::quote::QuoteClient;
use tigeropen::trade::TradeClient;
async fn example_get_segment_fund_available(config: ClientConfig, quote: &QuoteClient, trade: &TradeClient, push: &Arc<PushClient>) -> Result<(), TigerError> {
let result_0 = trade.get_segment_fund_available(SegmentFundRequest { ..Default::default() }).await?;
Ok(())
}
Response example
[
{
"from_segment": "",
"currency": "",
"amount": 0
}
]get_segment_fund_history
get_segment_fund_historySignature
pub async fn get_segment_fund_history( &self, req: SegmentFundRequest, ) -> Result<Vec<SegmentFundHistoryItem>, TigerError>
Description
Segment/currency/limit optional.
Parameters
| Parameter | Rust type | Requirement | SDK default |
|---|---|---|---|
| req.account | Option<String> | Optional; most TradeClient methods inject the default account when None | None (omitted) |
| req.id | Option<String> | Optional | None (omitted) |
| req.from_segment | Option<String> | Optional | None (omitted) |
| req.to_segment | Option<String> | Optional | None (omitted) |
| req.currency | Option<String> | Optional | None (omitted) |
| req.amount | Option<f64> | Optional | None (omitted) |
| req.limit | Option<i32> | Optional | None (omitted) |
| req.lang | Option<String> | Optional | None (omitted) |
Return
Result<Vec<SegmentFundHistoryItem>, TigerError>
| Field | Type | Description |
|---|---|---|
| id | i64 | ID |
| from_segment | String | From segment |
| to_segment | String | To segment |
| currency | String | Currency |
| amount | f64 | Turnover amount |
| status | String | Trading status |
| status_desc | String | Status description |
| settled_at | i64 | Settled at |
| created_at | i64 | Created at |
| updated_at | i64 | Updated at |
Example
use std::sync::Arc;
use tigeropen::client::http_client::HttpClient;
use tigeropen::config::ClientConfig;
use tigeropen::error::TigerError;
use tigeropen::model::order::*;
use tigeropen::model::quote::*;
use tigeropen::model::quote_requests::*;
use tigeropen::model::trade_requests::*;
use tigeropen::push::*;
use tigeropen::quote::QuoteClient;
use tigeropen::trade::TradeClient;
async fn example_get_segment_fund_history(config: ClientConfig, quote: &QuoteClient, trade: &TradeClient, push: &Arc<PushClient>) -> Result<(), TigerError> {
let result_0 = trade.get_segment_fund_history(SegmentFundRequest { ..Default::default() }).await?;
Ok(())
}
Response example
[
{
"id": 0,
"from_segment": "",
"to_segment": "",
"currency": "",
"amount": 0,
"status": "",
"status_desc": "",
"settled_at": 0
}
]transfer_segment_fund
transfer_segment_fundSignature
pub async fn transfer_segment_fund( &self, req: SegmentFundRequest, ) -> Result<Option<SegmentFund>, TigerError>
Description
From/to/currency/positive amount required; changes funds.
Parameters
| Parameter | Rust type | Requirement | SDK default |
|---|---|---|---|
| req.account | Option<String> | Optional; most TradeClient methods inject the default account when None | None (omitted) |
| req.id | Option<String> | Optional | None (omitted) |
| req.from_segment | Option<String> | Required by server; SDK does not pre-validate | None (omitted) |
| req.to_segment | Option<String> | Required by server; SDK does not pre-validate | None (omitted) |
| req.currency | Option<String> | Required by server; SDK does not pre-validate | None (omitted) |
| req.amount | Option<f64> | Required by server; SDK does not pre-validate | None (omitted) |
| req.limit | Option<i32> | Optional | None (omitted) |
| req.lang | Option<String> | Optional | None (omitted) |
Return
Result<Option<SegmentFund>, TigerError>
| Field | Type | Description |
|---|---|---|
| id | Value | ID |
| from_segment | String | From segment |
| to_segment | String | To segment |
| currency | String | Currency |
| amount | f64 | Turnover amount |
| status | String | Trading status |
| status_desc | String | Status description |
| message | String | Message |
| settled_at | i64 | Settled at |
| created_at | i64 | Created at |
| updated_at | i64 | Updated at |
Example
use std::sync::Arc;
use tigeropen::client::http_client::HttpClient;
use tigeropen::config::ClientConfig;
use tigeropen::error::TigerError;
use tigeropen::model::order::*;
use tigeropen::model::quote::*;
use tigeropen::model::quote_requests::*;
use tigeropen::model::trade_requests::*;
use tigeropen::push::*;
use tigeropen::quote::QuoteClient;
use tigeropen::trade::TradeClient;
async fn example_transfer_segment_fund(config: ClientConfig, quote: &QuoteClient, trade: &TradeClient, push: &Arc<PushClient>) -> Result<(), TigerError> {
let result_0 = trade.transfer_segment_fund(SegmentFundRequest { from_segment: Some("S".into()), to_segment: Some("C".into()), currency: Some("USD".into()), amount: Some(1.0), ..Default::default() }).await?;
Ok(())
}
Response example
{
"id": "",
"from_segment": "",
"to_segment": "",
"currency": "",
"amount": 0,
"status": "",
"status_desc": "",
"message": ""
}cancel_segment_fund
cancel_segment_fundSignature
pub async fn cancel_segment_fund( &self, req: SegmentFundRequest, ) -> Result<Option<SegmentFund>, TigerError>
Description
String id required; pending requests only.
Parameters
| Parameter | Rust type | Requirement | SDK default |
|---|---|---|---|
| req.account | Option<String> | Optional; most TradeClient methods inject the default account when None | None (omitted) |
| req.id | Option<String> | Required by server; SDK does not pre-validate | None (omitted) |
| req.from_segment | Option<String> | Optional | None (omitted) |
| req.to_segment | Option<String> | Optional | None (omitted) |
| req.currency | Option<String> | Optional | None (omitted) |
| req.amount | Option<f64> | Optional | None (omitted) |
| req.limit | Option<i32> | Optional | None (omitted) |
| req.lang | Option<String> | Optional | None (omitted) |
Return
Result<Option<SegmentFund>, TigerError>
| Field | Type | Description |
|---|---|---|
| id | Value | ID |
| from_segment | String | From segment |
| to_segment | String | To segment |
| currency | String | Currency |
| amount | f64 | Turnover amount |
| status | String | Trading status |
| status_desc | String | Status description |
| message | String | Message |
| settled_at | i64 | Settled at |
| created_at | i64 | Created at |
| updated_at | i64 | Updated at |
Example
use std::sync::Arc;
use tigeropen::client::http_client::HttpClient;
use tigeropen::config::ClientConfig;
use tigeropen::error::TigerError;
use tigeropen::model::order::*;
use tigeropen::model::quote::*;
use tigeropen::model::quote_requests::*;
use tigeropen::model::trade_requests::*;
use tigeropen::push::*;
use tigeropen::quote::QuoteClient;
use tigeropen::trade::TradeClient;
async fn example_cancel_segment_fund(config: ClientConfig, quote: &QuoteClient, trade: &TradeClient, push: &Arc<PushClient>) -> Result<(), TigerError> {
let result_0 = trade.cancel_segment_fund(SegmentFundRequest { id: Some("TRANSFER_ID".into()), ..Default::default() }).await?;
Ok(())
}
Response example
{
"id": "",
"from_segment": "",
"to_segment": "",
"currency": "",
"amount": 0,
"status": "",
"status_desc": "",
"message": ""
}place_forex_order
place_forex_orderSignature
pub async fn place_forex_order( &self, req: ForexOrderRequest, ) -> Result<Option<ForexOrderResult>, TigerError>
Description
Source/target currencies required; choose source or target amount according to server rules; submits conversion.
Parameters
| Parameter | Rust type | Requirement | SDK default |
|---|---|---|---|
| req.account | Option<String> | Optional; most TradeClient methods inject the default account when None | None (omitted) |
| req.seg_type | Option<String> | Optional | None (omitted) |
| req.source_currency | Option<String> | Optional | None (omitted) |
| req.target_currency | Option<String> | Optional | None (omitted) |
| req.source_amount | Option<f64> | Conditional: at least one of source_amount / target_amount | None (omitted) |
| req.target_amount | Option<f64> | Conditional: at least one of source_amount / target_amount | None (omitted) |
| req.order_type | Option<String> | Optional | None (omitted) |
| req.lang | Option<String> | Optional | None (omitted) |
Return
Result<Option<ForexOrderResult>, TigerError>
| Field | Type | Description |
|---|---|---|
| id | String | ID |
| status | String | Trading status |
| source_currency | String | Source currency |
| target_currency | String | Target currency |
| source_amount | f64 | Source amount |
| target_amount | f64 | Target amount |
| rate | f64 | Exchange rate |
| submit_time | i64 | Submit time |
Example
use std::sync::Arc;
use tigeropen::client::http_client::HttpClient;
use tigeropen::config::ClientConfig;
use tigeropen::error::TigerError;
use tigeropen::model::order::*;
use tigeropen::model::quote::*;
use tigeropen::model::quote_requests::*;
use tigeropen::model::trade_requests::*;
use tigeropen::push::*;
use tigeropen::quote::QuoteClient;
use tigeropen::trade::TradeClient;
async fn example_place_forex_order(config: ClientConfig, quote: &QuoteClient, trade: &TradeClient, push: &Arc<PushClient>) -> Result<(), TigerError> {
let result_0 = trade.place_forex_order(ForexOrderRequest { source_currency: Some("USD".into()), target_currency: Some("HKD".into()), source_amount: Some(1.0), ..Default::default() }).await?;
Ok(())
}
Response example
{
"id": "",
"status": "",
"source_currency": "",
"target_currency": "",
"source_amount": 0,
"target_amount": 0,
"rate": 0,
"submit_time": 0
}Updated 1 day ago
