The Transfer API has the flexibility to accept various intents. There are two key parameters for transferring funds:

Source and Destination:

The source is the wallet from which the funds are being pulled, while the destination is where the funds will end up. The Transfer will be initiated from the wallet ID, with the destination being the wallet address of the same wallet type as the origin.

Calculating Totals

You can express the numeric totals involved in your transfer in one of the following common ways:

  1. Specify the amount to process, which will include fees on top of the subtotal and withdraw/request the resulting final total from the source.

    • In this use case, only the source_amount parameter is required and amount_includes_fees will default to false.
    • Let’s say you want to process a transaction of 5 ETH with a fee of 0.1 ETH on top of the subtotal. To specify the source amount, you would set source_amount to 5.0 ETH. Since amount_includes_fees defaults to false in this use case, we will calculate the fees and auto increment the source_amount that gets returned in the response. We recommend that you show both the returned source_amount, dest_amount (how much recipient will receive), and also the total_fees to your user. Source amount stored with a transfer object will always be an all inclusive amount containing any fees calculated by the platform.
    • Here’s an example of how you could make this request in JSON:
    Request JSON
    {
        "source_amount": "5.0",
        "source_currency": "ETH",
        "dest_currency": "ETH",
        "amount_includes_fees": false // it will default to false regardless in API
    }
    
    Response JSON
    {
        "source_amount": "5.1",
        "total_fees": "0.1",
        "dest_amount": "5",
        "source_currency": "ETH",
        "dest_currency": "ETH"
    }
    
  2. Indicate the total amount that will be withdrawn/requested from the source, inclusive of fees.

    • For this particular scenario, please indicate the value for source_amount and ensure that amount_includes_fees is set to true.
    • Let’s say you want to withdraw a total of 5 ETH from your source account, which includes a fee of 0.1 ETH. To specify the total amount including fees, you would set source_amount to 5 ETH and amount_includes_fees to true. The recipient will receive 4.9 ETH in this case assuming the fee is exactly 0.1.
    • Here’s an example of how you could make this request using JSON:
    Request JSON
    {
        "source_amount": "5.0",
        "source_currency": "ETH",
        "dest_currency": "ETH",
        "amount_includes_fees": true
    }
    
    Response JSON
    {
        "source_amount": "5",
        "total_fees": "0.1",
        "dest_amount": "4.9",
        "source_currency": "ETH",
        "dest_currency": "ETH"
    }
    

The Transfer object returned by a successful API response includes

source_amount - The total amount withdrawn from the source wallet.

dest_amount - The total amount the recipient will receive.

total_fees - An estimate of the maximum blockchain network fees charged for performing the transfer.

When making a transfer, you must specify the wallet ID of the source and any wallet address of the same wallet type as the source.

The dest_currency parameter must also be specified and can be any of BTC, ETH, SOL, AVAX, MATIC, DOT, XLM (more coming soon).

It’s important to note that delays in the blockchain network could cause balance discrepancies between the actual balance and the balance claimed by the network. This could result in insufficient balance when confirming a transfer.

Wallet compatibility is determined by wallet type. For example, ETH wallet type is compatible with ETH, MATIC, and AVAX currencies. SOL wallet type is only compatible with SOL currency.

Chain Specific Transfer Parameters

Stellar (XLM)

For XLM, transfers from Streambird wallet to an external address require a memo attached to the end of the address separated by a colon as the dest parameter.

You can construct the dest to include a memo by attaching it to the end of the address separated by :.

For example:

json
{
    "dest": "GDQP2KPQGKIHYJGXNUIYOMHARUARCA7DJT5FO2FFOOKY3B2WSQHG4W37:3652667947"
}

In this example, the destination address is GDQP2KPQGKIHYJGXNUIYOMHARUARCA7DJT5FO2FFOOKY3B2WSQHG4W37 and stellar memo is 3652667947.