Fund Transfers
Example context
import { createClientConfig, TradeClient } from '@tigeropenapi/tigeropen';
const config = createClientConfig();
const tradeClient = TradeClient.fromConfig(config, config.account, config.secretKey);placeForexOrder
placeForexOrderSignature
async placeForexOrder(req: ForexOrderRequest): Promise<ForexOrderResult | undefined>Purpose
Submits a forex order request.
Parameters, defaults, and constraints
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
req | ForexOrderRequest | Yes | None | No client-side validation is declared. |
req.account | string | undefined | No | TradeClient account when empty (client) | No client-side validation is declared. |
req.secretKey | string | undefined | No | None | Institution account secret key. Overrides the default set in ClientConfig; omit to use the config default. |
req.segType | string | undefined | No | None | No client-side validation is declared. |
req.sourceCurrency | string | Yes | None | No client-side validation is declared. |
req.targetCurrency | string | Yes | None | No client-side validation is declared. |
req.sourceAmount | number | undefined | No | None | No client-side validation is declared. |
req.targetAmount | number | undefined | No | None | No client-side validation is declared. |
req.orderType | string | undefined | No | None | No client-side validation is declared. |
req.lang | string | undefined | No | None | No client-side validation is declared. |
Returns
Promise<ForexOrderResult | undefined>
| Field | Type | Description |
|---|---|---|
| id | string | Order ID |
| status | string | Trading status |
| sourceCurrency | string | Source currency |
| targetCurrency | string | Target currency |
| sourceAmount | number | Source amount |
| targetAmount | number | Target amount |
| rate | number | Exchange rate |
| submitTime | number | Submit time |
Type-checked example
const result = await tradeClient.placeForexOrder({ sourceCurrency: 'USD', targetCurrency: 'HKD' });
console.log(result);Response example
{
"id": "string",
"status": "string",
"sourceCurrency": "string",
"targetCurrency": "string",
"sourceAmount": 0,
"targetAmount": 0,
"rate": 0,
"submitTime": 0
}getSegmentFundAvailable
getSegmentFundAvailableSignature
async getSegmentFundAvailable(req: SegmentFundRequest): Promise<SegmentFundAvailableItem[]>Purpose
Gets segment fund available.
Parameters, defaults, and constraints
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
req | SegmentFundRequest | Yes | None | No client-side validation is declared. |
req.account | string | undefined | No | TradeClient account when empty (client) | No client-side validation is declared. |
req.secretKey | string | undefined | No | None | Institution account secret key. Overrides the default set in ClientConfig; omit to use the config default. |
req.id | string | undefined | No | None | No client-side validation is declared. |
req.fromSegment | string | undefined | No | None | No client-side validation is declared. |
req.toSegment | string | undefined | No | None | No client-side validation is declared. |
req.currency | string | undefined | No | None | No client-side validation is declared. |
req.amount | number | undefined | No | None | No client-side validation is declared. |
req.limit | number | undefined | No | None | No client-side validation is declared. |
req.lang | string | undefined | No | None | No client-side validation is declared. |
Returns
Promise<SegmentFundAvailableItem[]>
| Field | Type | Description |
|---|---|---|
| fromSegment | string | Source segment |
| currency | string | Currency |
| amount | number | Trading amount |
Type-checked example
const result = await tradeClient.getSegmentFundAvailable({ fromSegment: 'SEC', toSegment: 'FUT', currency: 'USD' });
console.log(result);Response example
[
{
"fromSegment": "string",
"currency": "string",
"amount": 0
}
]getSegmentFundHistory
getSegmentFundHistorySignature
async getSegmentFundHistory(req: SegmentFundRequest): Promise<SegmentFundHistoryItem[]>Purpose
Gets segment fund history.
Parameters, defaults, and constraints
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
req | SegmentFundRequest | Yes | None | No client-side validation is declared. |
req.account | string | undefined | No | TradeClient account when empty (client) | No client-side validation is declared. |
req.secretKey | string | undefined | No | None | Institution account secret key. Overrides the default set in ClientConfig; omit to use the config default. |
req.id | string | undefined | No | None | No client-side validation is declared. |
req.fromSegment | string | undefined | No | None | No client-side validation is declared. |
req.toSegment | string | undefined | No | None | No client-side validation is declared. |
req.currency | string | undefined | No | None | No client-side validation is declared. |
req.amount | number | undefined | No | None | No client-side validation is declared. |
req.limit | number | undefined | No | None | No client-side validation is declared. |
req.lang | string | undefined | No | None | No client-side validation is declared. |
Returns
Promise<SegmentFundHistoryItem[]>
| Field | Type | Description |
|---|---|---|
| id | number | Order ID |
| fromSegment | string | Source segment |
| toSegment | string | Target segment |
| currency | string | Currency |
| amount | number | Trading amount |
| status | string | Trading status |
| statusDesc | string | Status description |
| settledAt | number | Settled at |
| createdAt | number | Created at |
| updatedAt | number | Updated at |
Type-checked example
const result = await tradeClient.getSegmentFundHistory({ limit: 10 });
console.log(result);Response example
[
{
"id": 10234,
"fromSegment": "S1",
"toSegment": "S2",
"currency": "USD",
"amount": 5000.0,
"status": "SUCCESS",
"statusDesc": "Transfer completed",
"settledAt": 1719216000000,
"createdAt": 1719212400000,
"updatedAt": 1719216000000
}
]transferSegmentFund
transferSegmentFundSignature
async transferSegmentFund(req: SegmentFundRequest): Promise<SegmentFund | undefined>Purpose
Transfers segment fund.
Parameters, defaults, and constraints
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
req | SegmentFundRequest | Yes | None | No client-side validation is declared. |
req.account | string | undefined | No | TradeClient account when empty (client) | No client-side validation is declared. |
req.secretKey | string | undefined | No | None | Institution account secret key. Overrides the default set in ClientConfig; omit to use the config default. |
req.id | string | undefined | No | None | No client-side validation is declared. |
req.fromSegment | string | undefined | No | None | No client-side validation is declared. |
req.toSegment | string | undefined | No | None | No client-side validation is declared. |
req.currency | string | undefined | No | None | No client-side validation is declared. |
req.amount | number | undefined | No | None | No client-side validation is declared. |
req.limit | number | undefined | No | None | No client-side validation is declared. |
req.lang | string | undefined | No | None | No client-side validation is declared. |
Returns
Promise<SegmentFund | undefined>
| Field | Type | Description |
|---|---|---|
| id | string | number |
| fromSegment | string | Source segment |
| toSegment | string | Target segment |
| currency | string | Currency |
| amount | number | Trading amount |
| status | string | Trading status |
| statusDesc | string | Status description |
| message | string | Message |
| settledAt | number | Settled at |
| createdAt | number | Created at |
| updatedAt | number | Updated at |
Type-checked example
const result = await tradeClient.transferSegmentFund({ fromSegment: 'SEC', toSegment: 'FUT', currency: 'USD', amount: 100 });
console.log(result);Response example
{
"id": "TX123",
"fromSegment": "string",
"toSegment": "string",
"currency": "string",
"amount": 0,
"status": "string",
"statusDesc": "string",
"message": "string",
"settledAt": 0,
"createdAt": 0,
"updatedAt": 0
}cancelSegmentFund
cancelSegmentFundSignature
async cancelSegmentFund(req: SegmentFundRequest): Promise<SegmentFund | undefined>Purpose
Cancels segment fund.
Parameters, defaults, and constraints
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
req | SegmentFundRequest | Yes | None | No client-side validation is declared. |
req.account | string | undefined | No | TradeClient account when empty (client) | No client-side validation is declared. |
req.secretKey | string | undefined | No | None | Institution account secret key. Overrides the default set in ClientConfig; omit to use the config default. |
req.id | string | undefined | No | None | No client-side validation is declared. |
req.fromSegment | string | undefined | No | None | No client-side validation is declared. |
req.toSegment | string | undefined | No | None | No client-side validation is declared. |
req.currency | string | undefined | No | None | No client-side validation is declared. |
req.amount | number | undefined | No | None | No client-side validation is declared. |
req.limit | number | undefined | No | None | No client-side validation is declared. |
req.lang | string | undefined | No | None | No client-side validation is declared. |
Returns
Promise<SegmentFund | undefined>
| Field | Type | Description |
|---|---|---|
| id | string | number |
| fromSegment | string | Source segment |
| toSegment | string | Target segment |
| currency | string | Currency |
| amount | number | Trading amount |
| status | string | Trading status |
| statusDesc | string | Status description |
| message | string | Message |
| settledAt | number | Settled at |
| createdAt | number | Created at |
| updatedAt | number | Updated at |
Type-checked example
const result = await tradeClient.cancelSegmentFund({ id: 'TX123' });
console.log(result);Response example
{
"id": "TX123",
"fromSegment": "string",
"toSegment": "string",
"currency": "string",
"amount": 0,
"status": "string",
"statusDesc": "string",
"message": "string",
"settledAt": 0,
"createdAt": 0,
"updatedAt": 0
}getFundDetails
getFundDetailsSignature
async getFundDetails(req: FundDetailsRequest): Promise<FundDetails[]>Purpose
Gets fund details.
Parameters, defaults, and constraints
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
req | FundDetailsRequest | Yes | None | No client-side validation is declared. |
req.account | string | undefined | No | TradeClient account when empty (client) | No client-side validation is declared. |
req.secretKey | string | undefined | No | None | Institution account secret key. Overrides the default set in ClientConfig; omit to use the config default. |
req.segTypes | string[] | undefined | No | None | No client-side validation is declared. |
req.fundType | string | undefined | No | None | No client-side validation is declared. |
req.currency | string | undefined | No | None | No client-side validation is declared. |
req.startDate | number | undefined | No | None | Unix timestamp in milliseconds |
req.endDate | number | undefined | No | None | Unix timestamp in milliseconds |
req.limit | number | undefined | No | None | No client-side validation is declared. |
req.pageToken | string | undefined | No | None | No client-side validation is declared. |
req.lang | string | undefined | No | None | No client-side validation is declared. |
Returns
Promise<FundDetails[]>
| Field | Type | Description |
|---|---|---|
| id | string | number |
| account | string | Account |
| segType | string | Segment type |
| fundType | string | Fund type |
| currency | string | Currency |
| amount | number | Trading amount |
| balance | number | Balance |
| occurTime | number | Occurrence time |
| remark | string | Remark |
| externalId | string | External ID |
Type-checked example
const result = await tradeClient.getFundDetails({ segTypes: ['SEC'], currency: 'USD', startDate: Date.UTC(2026, 0, 1), endDate: Date.UTC(2026, 0, 31), limit: 100 });
console.log(result);Response example
[
{
"id": 12345,
"account": "string",
"segType": "string",
"fundType": "string",
"currency": "string",
"amount": 0,
"balance": 0,
"occurTime": 0,
"remark": "string",
"externalId": "string"
}
]getFundingHistory
getFundingHistorySignature
async getFundingHistory(req: FundingHistoryRequest): Promise<FundingHistoryItem[]>Purpose
Gets funding history.
Parameters, defaults, and constraints
| Parameter | Type | Required | SDK default | Constraints |
|---|---|---|---|---|
req | FundingHistoryRequest | Yes | None | No client-side validation is declared. |
req.account | string | undefined | No | TradeClient account when empty (client) | No client-side validation is declared. |
req.secretKey | string | undefined | No | None | Institution account secret key. Overrides the default set in ClientConfig; omit to use the config default. |
req.segType | string | undefined | No | None | No client-side validation is declared. |
req.currency | string | undefined | No | None | No client-side validation is declared. |
req.startDate | number | undefined | No | None | Unix timestamp in milliseconds |
req.endDate | number | undefined | No | None | Unix timestamp in milliseconds |
req.limit | number | undefined | No | None | No client-side validation is declared. |
req.lang | string | undefined | No | None | No client-side validation is declared. |
Returns
Promise<FundingHistoryItem[]>
| Field | Type | Description |
|---|---|---|
| id | number | Order ID |
| refId | string | Reference ID |
| type | number | Contract type |
| typeDesc | string | Type description |
| currency | string | Currency |
| amount | number | Trading amount |
| businessDate | string | Business date |
| status | string | Trading status |
| statusDesc | string | Status description |
| completedStatus | boolean | Completion status |
| createdAt | number | Created at |
| updatedAt | number | Updated at |
Type-checked example
const result = await tradeClient.getFundingHistory({ segType: 'SEC', currency: 'USD', startDate: Date.UTC(2026, 0, 1), endDate: Date.UTC(2026, 0, 31), limit: 100 });
console.log(result);Response example
[
{
"id": 0,
"refId": "string",
"type": 0,
"typeDesc": "string",
"currency": "string",
"amount": 0,
"businessDate": "string",
"status": "string",
"statusDesc": "string",
"completedStatus": true,
"createdAt": 0,
"updatedAt": 0
}
]Updated about 17 hours ago
