Skip to main content

Send BTC onchain

The GraphQL endpoint to connect to:
A valid authentication token is required in the header as a bearer token:

Get the wallet IDs and check the balances

Can run this query at any stage to confirm the change in the balances.
The "BTC" wallet balance is denominated in satoshis.
The "USD" wallet balance is in cents.

The body of the GraphQL request

query Me {
me {
defaultAccount {
wallets {
curl command to get the USD wallet ID


Estimate how many satoshis the transaction will cost.

The body of the GraphQL request

query onChainTxFee($walletId: WalletId!, $address: OnChainAddress!, $amount: SatAmount!) {
onChainTxFee(walletId: $walletId, address: $address, amount: $amount) {
Set the variables
curl command to estimate the transaction fee

Send a transaction

Send a transaction onchain from your BTC account.

The body of the GraphQL request

mutation onChainUsdPaymentSend($input: OnChainUsdPaymentSendInput!) {
onChainUsdPaymentSend(input: $input) {
errors {
Set the variables
curl command to send the transaction

To test the GraphQL requests further use the GraphQL playground at for mainnet or for staging.
Check out the Galoy API Postman collection to find examples in multiple programming languages.