def onchain_exchange(self, withdraw_crypto, withdraw_address, value, unit='<STR_LIT>'):
self.onchain_rate = get_onchain_exchange_rates(<EOL>self.crypto, withdraw_crypto, best=True, verbose=self.verbose<EOL>)<EOL>exchange_rate = float(self.onchain_rate['<STR_LIT>'])<EOL>result = self.onchain_rate['<STR_LIT>'].get_onchain_exchange_address(<EOL>self.crypto, withdraw_crypto, withdraw_address<EOL>)<EOL>address = result['<STR_LIT>']<EOL>value_satoshi = self.from_unit_to_satoshi(value, unit)<EOL>if self.verbose:<EOL><INDENT>print("<STR_LIT>" % (<EOL>value_satoshi, (value_satoshi / <NUM_LIT>),<EOL>exchange_rate * value_satoshi / <NUM_LIT>, withdraw_crypto.upper()<EOL>))<EOL><DEDENT>self.outs.append({<EOL>'<STR_LIT:address>': address,<EOL>'<STR_LIT:value>': value_satoshi<EOL>})<EOL>
This method is like `add_output` but it sends to another