Skip to main content
This topic is responsible for notifying the user when a fiat or cryptocurrency withdrawal occurs.
This is an authenticated stream. You must provide a valid ticket from authentication to subscribe.

Subscription Request

method
string
required
Subscribe method. Must be subscribe
topics
array
required
Array of topics to subscribe to. Must include withdrawalExample: ["withdrawal"]
ticket
string
required
Ticket created using the endpoint POST https://api.ripio.com/trade/ticket

Stream Response

id
integer
Each WebSocket message includes a sequential numeric id. Each topic has its own unique sequence, and for private topics, the sequence is unique to each topic and user. It’s important to note that some topics will send a “welcome message”, which will have an id value of -1. Additionally, this sequence may be reset between connections, so be sure to update this value locally whenever you reconnect.
topic
string
Topic name (always withdrawal)
timestamp
integer
Timestamp in milliseconds
body
object
Withdrawal details object

Subscription Example

{
  "method": "subscribe",
  "topics": [
    "withdrawal"
  ],
  "ticket": "97794B95-AFE7-454F-81B0-9109112548C2"
}

Stream Response Example - Cryptocurrency Withdrawal

{
  "id": 11,
  "topic": "withdrawal",
  "timestamp": 1673271591764,
  "body": {
    "id": "2B222F22-5235-45FA-97FC-E9DBFA2575EE",
    "user_id": "5B6A43AE-8012-402D-966F-87CF64689535",
    "amount": 100,
    "currency_code": "ETH",
    "status": "confirmed",
    "is_internal": false,
    "destination_address": "mpe8FKtvDktBN1FGToFpYN2pdktySxD8wg",
    "hash": "0x79704c92b31061b8f51e26486d6454aff3e3c58aa0d51f0f803d6fd063be8100",
    "network": "bitcoin",
    "fee": null,
    "miner_fee": null,
    "external_id": "08799ECC-F6B1-498E-B89C-2A05E6A181B9",
    "create_date": "2023-01-09T13:39:24.057Z",
    "update_date": "2023-01-09T13:39:24.057Z"
  }
}

Stream Response Example - Fiat Withdrawal

{
  "id": 12,
  "topic": "withdrawal",
  "timestamp": 1673271591764,
  "body": {
    "id": "2B222F22-5235-45FA-97FC-E9DBFA2575EE",
    "user_id": "5B6A43AE-8012-402D-966F-87CF64689535",
    "amount": 5000,
    "currency_code": "BRL",
    "status": "confirmed",
    "is_internal": true,
    "destination_address": null,
    "hash": null,
    "network": null,
    "fee": 0,
    "miner_fee": null,
    "external_id": "08799ECC-F6B1-498E-B89C-2A05E6A181B9",
    "create_date": "2023-01-09T13:39:24.057Z",
    "update_date": "2023-01-09T13:39:24.057Z"
  }
}

Withdrawal Status Lifecycle

pending → confirmed

  failed
  • pending: Withdrawal request created but not yet processed
  • confirmed: Withdrawal sent and confirmed
  • failed: Withdrawal failed and was not sent

Withdrawal Types

External Withdrawals

  • To external blockchain addresses
  • Requires blockchain confirmation
  • Include miner fees
  • Network dependent timing
  • Bitcoin: ~10 minutes (6 confirmations)
  • Ethereum: ~2 minutes (12 confirmations)

Internal Transfers

  • Between BitcoinTrade accounts
  • No blockchain involved
  • No miner fees
  • Confirm immediately
  • Marked with is_internal: true

Fee Structure

Platform Fee

  • BitcoinTrade withdrawal fee
  • Shown in fee field
  • May vary by currency
  • Deducted from withdrawal

Network Fee

  • Blockchain miner fee
  • Shown in miner_fee field
  • For external withdrawals only
  • Varies with network congestion

Total Cost

Total deducted = Platform fee + Miner fee

Key Fields

FieldDescription
amountWithdrawal amount
feeBitcoinTrade fee
miner_feeNetwork miner fee
statusCurrent state
hashBlockchain transaction ID
is_internalInternal transfer flag

Blockchain Networks

NetworkCodeCurrency
BitcoinbitcoinBTC
EthereumethereumETH
Bitcoin CashbitcoincashBCH
And others--

Timing by Currency

CurrencyTypeTypical Confirmation
BTCExternal10-30 minutes
ETHExternal2-5 minutes
BCHExternal3-10 minutes
BRLInternalImmediate
OthersVariableVariable

Calculation Examples

// Net amount after fees
const netAmount = withdrawal.amount - withdrawal.fee - (withdrawal.miner_fee || 0);

// Total deducted from balance
const totalDeducted = withdrawal.amount;

// Fee percentage
const feePercent = ((withdrawal.fee + (withdrawal.miner_fee || 0)) / withdrawal.amount) * 100;

Usage Notes

  • Authentication Required: Requires valid ticket from WebSocket authentication
  • Real-time Updates: Receive notification when withdrawal is processed
  • Multiple Notifications: Receive updates as status changes (pending → confirmed)
  • Network Variable: Confirmation time depends on blockchain network
  • Fee Information: Both platform and miner fees shown

Pending vs Confirmed

  • Pending: Withdrawal submitted but not yet on blockchain
  • Confirmed: Transaction sent to blockchain and confirmed
  • Recommended: Wait for confirmed status before considering funds received

Use Cases

  • Fund Tracking: Monitor outgoing funds
  • Balance Updates: Update balance when withdrawal completes
  • Withdrawal Confirmation: Confirm withdrawal success
  • Fee Accounting: Record fees paid
  • Transaction History: Build withdrawal history
  • Compliance: Track all withdrawals for reporting