mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 22:04:21 +01:00
20 lines
400 B
C#
20 lines
400 B
C#
using Breez.Sdk;
|
|
|
|
public class BuyBtcSnippets
|
|
{
|
|
public void BuyBtc(BlockingBreezServices sdk)
|
|
{
|
|
// ANCHOR: buy-btc
|
|
try
|
|
{
|
|
var buyBitcoinResponse = sdk.BuyBitcoin(
|
|
new BuyBitcoinRequest(BuyBitcoinProvider.MOONPAY));
|
|
}
|
|
catch (Exception)
|
|
{
|
|
// Handle error
|
|
}
|
|
// ANCHOR_END: buy-btc
|
|
}
|
|
}
|