Transfer Funds
This endpoint allows you to transfer funds from a specific wallet to your main balance. This is useful when you want to consolidate funds from multiple wallets or prepare them for withdrawal.
Request
POST /wallets/transfer
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
wallet_id | string | Yes | The ID of the wallet to transfer funds from |
currency | string | Yes | The currency code to transfer (e.g., "USDTTRC20", "BTC") |
amount | string/number | Yes | The amount to transfer. Use string for precise decimal values |
description | string | No | Optional description for the transfer |
Authentication
This endpoint requires authentication using one of the following methods:
- API Key:
X-API-Keyheader - OAuth 2.0:
Authorization: Bearer {access_token}header
Example Request
curl -X POST "https://api.cryptofuse.io/wallets/transfer" \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"wallet_id": "550e8400-e29b-41d4-a716-446655440000",
"currency": "USDTTRC20",
"amount": "500.75",
"description": "Moving funds to main balance"
}'
Response
A successful response returns the details of the completed transfer.
Example Response
{
"transfer": {
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"wallet_id": "550e8400-e29b-41d4-a716-446655440000",
"wallet_name": "Trading Wallet",
"currency": "USDTTRC20",
"amount": "500.75",
"description": "Moving funds to main balance",
"status": "completed",
"created_at": "2025-04-30T12:34:56.789Z"
},
"wallet_balance": {
"currency": "USDTTRC20",
"amount": "499.75",
"pendingAmount": "0.00"
},
"main_balance": {
"currency": "USDTTRC20",
"amount": "1500.75",
"pendingAmount": "0.00"
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
transfer.id | string | Unique identifier for the transfer |
transfer.wallet_id | string | ID of the source wallet |
transfer.wallet_name | string | Custom name of the source wallet |
transfer.currency | string | Currency code that was transferred |
transfer.amount | string | Amount that was transferred |
transfer.description | string | Description of the transfer (if provided) |
transfer.status | string | Status of the transfer (completed, failed) |
transfer.created_at | string | ISO 8601 timestamp of transfer |
wallet_balance | object | Updated balance in the source wallet |
main_balance | object | Updated balance in the main account |
Error Responses
| Status Code | Error Code | Description |
|---|---|---|
| 400 | invalid_request | Invalid request or missing parameters |
| 401 | unauthorized | Authentication failed |
| 403 | forbidden | User doesn't have required permissions |
| 404 | wallet_not_found | Wallet not found |
| 422 | insufficient_funds | Insufficient funds in the wallet |
| 422 | currency_invalid | Invalid or unsupported currency |
| 500 | server_error | Internal server error |
Notes
- The transfer is instant and doesn't require blockchain confirmation
- The amount being transferred must be available in the wallet (not in pending state)
- The wallet ID must be valid and previously obtained from creating a wallet or listing wallets
- There are no fees for transferring funds between your wallets and main balance
- Transfers cannot be reversed once completed
- If the main balance doesn't exist for the specified currency, it will be created automatically