$API_KEY
with your Streambird secret API key for backend. This will create a user with the provided details.
$API_KEY
with your Streambird access token and user_2Cu2uVhYy0OVgRcO913OsqIVaPI
with the user ID you created in Step 1. This will create a new wallet for the user with the specified token symbol and name.
POST /v1/transfers/create
API endpoint. This endpoint allows you to specify the source wallet, the destination wallet, the amount to transfer, and other details such as notes and whether the transfer amount includes fees.
Here’s an example cURL request to create a transfer:
unconfirmed
Transfer object that contains the source_amount
, dest_amount
, and total_fees
. The dest_amount
is the total amount that the recipient will receive after fees have been deducted.
POST /v1/transfers/{transfer_id}/confirm
API endpoint. You’ll need to replace {transfer_id}
with the ID of the transfer that you created in the previous step.
Here’s an example cURL request to confirm a transfer:
pending
from unconfirmed
. The funds will be transferred from the source wallet to the destination wallet.
Note that the user_id parameter is optional, but can be used to trigger a platform validation to ensure that the source wallet is owned by the specified user, which can help prevent usage errors. Once the transfer is confirmed, the specified amount will be moved from the source wallet to the destination wallet.
It’s important to note that before testing, the wallets must be funded with the appropriate amount of tokens. For testing purposes, you can go to an Ethereum faucet to get free testnet ETH, or if it’s a live app, you can use an on-ramp such as MoonPay to fund the wallets.