Orangepill Docs
  • Getting Started
    • Introduction
  • Orangepill API
    • Overview
    • Realms and Admins
    • Identities and Users
    • Persons and Companies
    • Messaging Channels
    • Digital Assets
    • Custom Digital Assets
    • Virtual Currencies
    • Ramp Accounts
    • Deposit Accounts
    • Virtual Accounts
    • Aliases
    • Withdrawal
    • Transactions
    • Payment gateways
    • Payouts
    • KYC
  • SmartApps
    • Payment Request
      • Payment Request v1.0
    • Forwarding Transactions
    • Blockchain Deposits
    • Accept Blockchain Payments
    • Orderbook
    • Exchange Rates
  • WebSocket Subscriptions
  • Extensions
    • Infobip People CDP
  • On Ramps and Off Ramps
  • Integrations
    • Infobip Exchange
  • Tutorials
    • Conversational Wallet
    • Crypto Payments Processor
      • Project Setup
      • Merchants Onboarding
      • Process Payment
      • Withdraw Revenue
      • Build Reports
      • Automatic Revenue Fees
    • Cryptocurrency Exchange
    • Simple ETH Wallet
  • Orangepill API Reference
Powered by GitBook
On this page
  • Withdrawal
  • Estimate fees
  • Create Withdrawal

Was this helpful?

  1. Orangepill API

Withdrawal

On-chain withdrawal to any blockchain address.

Withdrawal

Withdrawal will move assets from DeFi Account address to target address. If withdrawal has source in Virtual Account, liabilities balance is first moved from Virtual Account to DeFi Account, and then assets are moved on-chain.

Estimate fees

You can estimate blockchain transaction fee.

echo 'calculate blockchain fees'

curl --location --request GET 'https://api.orangepill.cloud/v1/withdrawals/estimate \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'Content-Type: application/json' \
--data-raw '{
    "account": "634b56217f6a7b0be52dffca",
    "address": "bc1qxyvqcwepfwsxstemz626uc73n0w6nxh3swgh68",
    "amount": 0.15,
    "speed": "fast"
}'

In response you will get fee values for slow, medium or fast processing speed.

"0.000684"

Create Withdrawal

Withdrawal will create on-chain transaction from account to address.

Blockchain fee can be charged to sender or receiver. If it is charged to sender, fee is added to transaction value. If it is charged to receiver, fee is deducted from transaction value.


echo 'create withdrawal from virtual account 634b56217f6a7b0be52dffca to Bitcoin address bc1qxyvqcwepfwsxstemz626uc73n0w6nxh3swgh68'

curl --location --request POST 'https://api.orangepill.cloud/v1/withdrawals \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffff' \
--header 'Content-Type: application/json' \
--data-raw '{
    "source": {
        "account": "634b56217f6a7b0be52dffca"
    },
    "destination": {
        "address": "bc1qxyvqcwepfwsxstemz626uc73n0w6nxh3swgh68"
    },
    "asset": "BTC",
    "value": 0.15,
    "fee": {
        "paid_by": "receiver",
        "speed": "fast"
    },
    "data": {
        "my_field_1": "Salary 11/2022",
        "my_field_2": "I1234",        
    }
}'

In response you will get processing withdrawal.

{
    "id": "634b56217f6a7b0be52dffac",
    "source": {
        "account": "634b56217f6a7b0be52dffca",
        "ramp": "637176640b45bd060bdced17",
        "address": "637176640b45bd060bdced17"
    },
    "destination": {
        "address": "bc1qxyvqcwepfwsxstemz626uc73n0w6nxh3swgh68"
    },
    "asset": "BTC",
    "value": 0.15,
    "fee": {
        "paid_by": "receiver",
        "speed": "fast",
        "value": 0.0005
    },
    "data": {
        "my_field_1": "Salary 11/2022",
        "my_field_2": "I1234",        
    },
    "amount": 0.1495,
    "status": "PROCESSING",
    "created_at": "1519211809934",
    "error": null
}
PreviousAliasesNextTransactions

Last updated 11 months ago

Was this helpful?