Did I find the right examples for you? yes no

All Samples(15)  |  Call(15)  |  Derive(0)  |  Import(0)

src/b/o/BoottleXCP-HEAD/counterpartyws.py   BoottleXCP(Download)
            for balance in balances:
                asset = balance['asset']
                balance = D(util.devise(db, balance['amount'], balance['asset'], 'output'))
                if balance:
                    if asset in totals.keys(): totals[asset] += balance
            destination = getp('destination')
            asset = getp('asset')  
            quantity = util.devise(db, getp('quantity'), asset, 'input')
            tx_info = send.compose(db, source, destination, asset, quantity)
            unsigned_tx_hex = bitcoin.transaction(tx_info, config.MULTISIG)
            if give_asset == 'BTC':
                fee_required = 0
                fee_fraction_provided = util.devise(db, fee_fraction_provided, 'fraction', 'input')
                fee_provided = round(D(fee_fraction_provided) * D(give_quantity) * D(config.UNIT))
                if fee_provided < config.MIN_FEE:
                    raise Exception('Fee provided less than minimum necessary for acceptance in a block.')
            elif get_asset == 'BTC':
                fee_provided = config.MIN_FEE
                fee_fraction_required = util.devise(db, fee_fraction_required, 'fraction', 'input')
                fee_provided = config.MIN_FEE
 
            give_quantity = util.devise(db, D(give_quantity), give_asset, 'input')
            get_quantity = util.devise(db, D(get_quantity), get_asset, 'input') 
            tx_info = order.compose(db, source, give_asset,