make a withdrawal to coins_ph account https://docs.coins.ph/rest-api/#withdrawuser_data :param str code: unified currency code :param float amount: the amount to withdraw :param str address: not used by coinsph withdraw() :param str tag: :pa
(self, code: str, amount: float, address: str, tag: Str = None, params={})
| 1805 | } |
| 1806 | |
| 1807 | def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction: |
| 1808 | """ |
| 1809 | make a withdrawal to coins_ph account |
| 1810 | |
| 1811 | https://docs.coins.ph/rest-api/#withdrawuser_data |
| 1812 | |
| 1813 | :param str code: unified currency code |
| 1814 | :param float amount: the amount to withdraw |
| 1815 | :param str address: not used by coinsph withdraw() |
| 1816 | :param str tag: |
| 1817 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 1818 | :returns dict: a `transaction structure <https://docs.ccxt.com/?id=transaction-structure>` |
| 1819 | """ |
| 1820 | options = self.safe_value(self.options, 'withdraw') |
| 1821 | warning = self.safe_bool(options, 'warning', True) |
| 1822 | if warning: |
| 1823 | raise InvalidAddress(self.id + " withdraw() makes a withdrawals only to coins_ph account, add .options['withdraw']['warning'] = False to make a withdrawal to your coins_ph account") |
| 1824 | networkCode = self.safe_string(params, 'network') |
| 1825 | networkId = self.network_code_to_id(networkCode, code) |
| 1826 | if networkId is None: |
| 1827 | raise BadRequest(self.id + ' withdraw() require network parameter') |
| 1828 | self.load_markets() |
| 1829 | currency = self.currency(code) |
| 1830 | request = { |
| 1831 | 'coin': currency['id'], |
| 1832 | 'amount': self.number_to_string(amount), |
| 1833 | 'network': networkId, |
| 1834 | 'address': address, |
| 1835 | } |
| 1836 | if tag is not None: |
| 1837 | request['withdrawOrderId'] = tag |
| 1838 | params = self.omit(params, 'network') |
| 1839 | response = self.privatePostOpenapiWalletV1WithdrawApply(self.extend(request, params)) |
| 1840 | return self.parse_transaction(response, currency) |
| 1841 | |
| 1842 | def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]: |
| 1843 | """ |
nothing calls this directly
no test coverage detected