Trade a received deposit
In this use case, you have Automation set to Disabled and Withdrawal Frequency to On-demand, so you will need to initiate the trade when you need cryptocurrency to pay out.
You can poll Get Wallets for the balance of your fiat wallet and use the Create Trade endpoint to initiate the trade once your deposit has processed:
- Authentication is done through a Bearer token with your API key (see Introduction > Configure API Access)
Endpoint
Example
curl --request POST
--url <https://api.getbeam.cash/smb/transactions/trade>
--header 'Authorization: Bearer beam_sandbox_abc123'
--header 'accept: application/json'
--header 'content-type: application/json'
--header 'idempotency-key: YOUR_INTERNAL_PAYMENT_ID'
--data '
{
"source": {
"symbol": "USD",
"amount": "100.00"
},
"destination": {
"symbol": "USDC",
"network": "ethereum"
}
}'
Updated 1 day ago