MCPcopy Create free account
hub / github.com/danpaquin/coinbasepro-python / withdraw

Method withdraw

cbpro/authenticated_client.py:855–880  ·  view source on GitHub ↗

Withdraw funds to a payment method. See AuthenticatedClient.get_payment_methods() to receive information regarding payment methods. Args: amount (Decimal): The amount to withdraw. currency (str): Currency type (eg. 'BTC') payment_method_

(self, amount, currency, payment_method_id)

Source from the content-addressed store, hash-verified

853 data=json.dumps(params))
854
855 def withdraw(self, amount, currency, payment_method_id):
856 """ Withdraw funds to a payment method.
857
858 See AuthenticatedClient.get_payment_methods() to receive
859 information regarding payment methods.
860
861 Args:
862 amount (Decimal): The amount to withdraw.
863 currency (str): Currency type (eg. 'BTC')
864 payment_method_id (str): ID of the payment method.
865
866 Returns:
867 dict: Withdraw details. Example::
868 {
869 "id":"593533d2-ff31-46e0-b22e-ca754147a96a",
870 "amount": "10.00",
871 "currency": "USD",
872 "payout_at": "2016-08-20T00:31:09Z"
873 }
874
875 """
876 params = {'amount': amount,
877 'currency': currency,
878 'payment_method_id': payment_method_id}
879 return self._send_message('post', '/withdrawals/payment-method',
880 data=json.dumps(params))
881
882 def coinbase_withdraw(self, amount, currency, coinbase_account_id):
883 """ Withdraw funds to a coinbase account.

Callers

nothing calls this directly

Calls 1

_send_messageMethod · 0.80

Tested by

no test coverage detected