Contents

GET /withdrawals/$WITHDRAWAL_ID#

Retrieve public information about WITHDRAWAL_ID withdrawal operation. Does not require further authentication as knowledge of WITHDRAWAL_ID serves as an authenticator.

Request:

Query Parameters:
  • old_stateOptional. Defaults to “pending”.

  • timeout_msOptional. Timeout in milliseconds, for long-polling, to wait for the operation state to be different from old_state. Since v5.

  • long_poll_msOptional. Deprecated since v5. Use timeout_ms instead.

Response:

200 Ok:

The bank responds with an WithdrawalPublicInfo object.

404 Not found:

The operation was not found.

Details:

interface WithdrawalPublicInfo {
  // Current status of the operation
  // pending: the operation is pending parameters selection (exchange and reserve public key)
  // selected: the operations has been selected and is pending confirmation
  // aborted: the operation has been aborted
  // confirmed: the transfer has been confirmed and registered by the bank
  status: "pending" | "selected" | "aborted" | "confirmed";

  // Amount that will be withdrawn with this operation
  // (raw amount without fee considerations).  Only
  // given once the amount is fixed and cannot be changed.
  // Optional since **v6**.
  amount?: Amount;

  // Suggestion for the amount to be withdrawn with this
  // operation.  Given if a suggestion was made but the
  // user may still change the amount.
  // Optional since **v6**.
  suggested_amount?: Amount;

  // If true, the wallet must not allow the user to
  // specify an amount to withdraw and to not provide
  // any amount when registering with the withdrawal
  // operation. The amount to withdraw will be set
  // by the final /withdrawals/$WITHDRAWAL_ID/confirm step.
  // @since **v8**
  no_amount_to_wallet?: boolean;

  // Account username
  username: string;

  // Reserve public key selected by the exchange,
  // only non-null if status is selected or confirmed.
  selected_reserve_pub?: string;

  // Exchange account selected by the wallet
  // only non-null if status is selected or confirmed.
  selected_exchange_account?: string;
}