Transfers
Transfers are Transactions that move funds from one Wallet to another. The source and destination balance currencyCodes must be identical. To transfer between balances in the same Wallet, use an Exchange.
The Transfer Object
id string
amount string
The transferred amount
createdAt string
ISO 8601
destinationTransaction Transaction
The Transaction object created on the destination Wallet and Balance
Transfer Funds
- TypeScript / JavaScript
let transfer = await solidtx.wallets.transfer({
sourceWalletId: 'wallet_yxeh6q5mmpik8w6cyvc9zcnn',
sourceBalanceId: 'gems',
destinationWalletId: 'wallet_cm8ozy99j00000cl7es122svt',
destinationBalanceId: 'gems',
amount: '10'
})
Parameters
amount stringRequired
The amount of the transfer. Must be a positive number.
Returns
Creates and returns a new Transfer object.
{
"id": "transfer_cm8p6laci00050cl6631a4l7t",
"sourceWalletId": "wallet_yxeh6q5mmpik8w6cyvc9zcnn",
"destinationWalletId": "wallet_cm8ozy99j00000cl7es122svt",
"amount": "10",
"createdAt": "2025-01-01T12:00:00Z",
"sourceTransaction": {
"id": "transaction_cm8p6lhob00060cl6duzk7kxt",
"walletId": "wallet_yxeh6q5mmpik8w6cyvc9zcnn",
"balanceId": "gems",
"type": "TRANSFER",
"amount": "-10"
},
"destinationTransaction": {
"id": "transaction_cm8p6lq2e00070cl63sac8lbk",
"walletId": "wallet_cm8ozy99j00000cl7es122svt",
"balanceId": "gems",
"type": "Transfer",
"amount": "10"
}
}
Get a Transfer
- TypeScript / JavaScript
let transfer = await solidtx.transfers.get('transfer_cm8p6laci00050cl6631a4l7t')
Parameters
No Parameters
Returns
Returns the Transfer object.
{
"id": "transfer_cm8p6laci00050cl6631a4l7t",
"sourceWalletId": "wallet_yxeh6q5mmpik8w6cyvc9zcnn",
"destinationWalletId": "wallet_cm8ozy99j00000cl7es122svt",
"amount": "10",
"createdAt": "2025-01-01T12:00:00Z",
"sourceTransaction": {
"id": "transaction_cm8p6lhob00060cl6duzk7kxt",
"walletId": "wallet_yxeh6q5mmpik8w6cyvc9zcnn",
"balanceId": "gems",
"type": "TRANSFER",
"amount": "-10"
},
"destinationTransaction": {
"id": "transaction_cm8p6lq2e00070cl63sac8lbk",
"walletId": "wallet_cm8ozy99j00000cl7es122svt",
"balanceId": "gems",
"type": "Transfer",
"amount": "10"
}
}
Search Transfers
- TypeScript / JavaScript
// Search all Transfers in a Wallet
let transfers = await solidtx.transfers.search({
walletId: 'wallet_yxeh6q5mmpik8w6cyvc9zcnn'
})
Parameters
walletId stringRequired
Returns
Returns a list of Transfer objects with Pagination information.
{
"pageInfo": {
"endCursor": "...",
"totalCount": 17
},
"data": [
// Transfer objects
]
}