How does a Bitcoin wallet app find unspent transaction outputs? - bitcoin

Can we say the Bitcoin wallet applications (at least some) behave as Simplified Payment Verification(SPV) nodes?
How does the wallet application find the corresponding user's unspent transaction outputs, while creating a new transaction (to be included into the new transaction)?

The SPV will query full nodes using a Bloom filter to retrieve those transactions: https://bitcoin.org/en/developer-guide#bloom-filters

Related

How users currency accounts address are updated during currency trading on Exchanges like Coinbase and Binance?

My naive understanding behind how currency trading works on Exchanges like Binance and Coinbase is each users are provided with unique address and when the respective currencies trade happens on exchanges like Binance or Coinbase, both the parties accounts get's updated live on blockchain.
To elaborate more, In case of ETH/BTC trading, let's say, Mr Foo wants to trade his ETH with Mr Bar's BTC on Binance exchange. Binance will provide both of them with unique address respectively to their currency. So when the ETH/BTC trade take place, Mr Foo will receive the BTC on his newly generated unique BTC address and Mr Foo's ETH account will be deducted . On the other side, Mr Bar's BTC account will be deducted and Ether account is updated with newly received ether.
I'm really confuse regarding whether these currency trading on exchanges execute live on Blockchain? Recently during Bitcoin and Ethereum network congestion, I did BTC/ETH trading on HITBTC, the process happened instantaneously, but I've to wait for hours during withdrawal process. Also Hitbtc seems to be using same Ethereum account (0x65e2c5175e2e618f48e70343b14c31b280e42d90) to transfer fund during withdraw request for multiple users. It seems that these exchanges are using the same address for serving multiple users.
Could somebody explain how users accounts are updated during currency trading on exchanges like Coinbase and Binance? Does trading immediately happens live on blockchain? Or Exchanges only shows the users with fake trading balances until it's withdrawn? Do the Exchanges use same address to accept deposits from multiple users?
Thank you for your time.
Check out this thread for a brief explanation of Coinbase's order management.
Answer on the reddit thread, supposedly from a coinbase insider.
In addition, my comment above was just based on intuition and my general knowledge of the way brokers work.
Brokers
Brokers tend to match orders first since they are in the business of exchanging, not investing. Meaning they make their most consistent revenue from fees generated by facilitating customer orders, not by investing in the securities or assets that they help to buy/sell.
Sometimes in order to fulfill an order the broker will go long or short a particular asset class, in this case bitcoin or ethereum, etc. If this happens the broker is exposed to fluctuations in the price of that asset against the asset they are trying to grow (cash).
Now, since Coinbase is heavily involved in crypto it might be part of their strategy to hold Bitcoin or Ethereum inventory, but I would doubt it would figure much since that would undermine public trust in their institution as an impartial exchange. No one really likes to hear their broker bet against them, it tends to engender resentment.
Technicals
Coinbase is setup as a software wallet, meaning you have an account, with the private keys stored on their server. So it is possible for them to facilitate some of the trading between bitcoin accounts without ever having to match orders with an account holder outside their system.
Meaning, they can collect/match/fill the orders in batches and then submit those batches to bitcoin miners. This would allow them to quickly "fulfill" your order, and then send you verification once it has been posted to the blockchain.
Further Reading
Although it is not specifically geared towards crypto exchanges there is an excellent book on the subject of how markets actually function.
Market Microstructure in Practice

Bitcoin transaction verification process

I am building and app which will offer payment in bitcoins. I know that when I send bitcoin from one address to another it can be tracked by blockain API to verify the transaction. After receiving some assets I want to send some assets back. The customer will have an input field where he will paste his deposit wallet address. I am subscribed to blockchain API to track received assets to my bitcoin address. How can I verify that the payment was made by certain customer? Checking his address doesn't seem to solve the problem because if customer uses wallets like Coinbase, Bitstamp etc. transaction is made from multiple addresses.
A few helpers here:
What you need to do is to generate a new address and give it to your customer. This way you can uniquely identify him
Wait for confirmation before making the decision. Just because you see a transaction, does not mean you have the money. You need to wait for a few blocks and several (>6) confirmations

Create new wallets on the Blockchain

I am new to bitcoin and blockchain , I want to build a digital currency exchange
But don't want to interface to an external site(Polonix for example).
I want, as a first step, to create wallets for all kinds of coins
Does "Blockchain" only work with Bitcoin?
Because I don't see an option to send "currency type" when creating a new wallet
https://blockchain.info/api
Please tell me what service or Api I'm supposed to interface with
Bitcoin and Blockchain are different things:
Bitcoin is the first descentralized digital crypto currency. Bitcoin implements the Blockchain technology.
Blockchain is the technology that gives you the chance to create descentralized networks.
Nowadays, there are many implementations of Blockchain: Bitcoin, Ethereum, Hyperledger Fabric, Corda, Ripple, Openchain...
If I were you, I would start reading more about Blockchain. Then, if you want to create your own cryptocurrency, I advise you to follow Ethereum's manual. https://www.ethereum.org/token. This will help you to understand better Blockchain, and also to create new wallets.
Bitcoin is a cryptocurrency and Blockchain is a data structure or technology.
Any cryptocurrency can be implemented using blockchain.
Wallet is like a bank account which has account numbers and the amounts.
I guess you want to create an user interface that shows multiple coin accounts and balances.
you can create one wallet and connect it to the blockchain networks like bitcoin, ethereum, ripple to get the information of multiple cryptos implemented using protocols ethereum and ripple.
ethereum network uses web3 api to connect and then eth.getBalance method to get balances of ethereum.Likewise each crypto will have a similar api and method.

Match bank transactions between Yodlee connections to the same account

In our application, there are occasionally cases where a bank account is disconnected using removeItem and subsequently reconnected using addItemForContentService1 from the Yodlee SOAP aggregation API. There is anecdotal evidence to suggest that, until relatively recently (1-2 months ago?), the transaction IDs for bank transactions that had already been retrieved from a prior connection would be identical when the same bank account was reconnected. However, now it appears that, when a bank account is disconnected and then reconnected in this way, all of the bank transactions are now assigned new transaction IDs, thus breaking any client logic that attempts to match transactions from previous connections to the same bank account. This can be a serious problem since, for example, it can produce many duplicate transactions for accounts that have already had bank reconciliations performed.
My questions are whether there now exists a reliable mechanism to identify the same bank transactions when disconnecting and reconnecting to the same bank account using removeItem and addItemForContentService1 and, if so, what is it?
When you call removeItem the account is deleted and also all the data related to that account is deleted. Now when you call addItemForContentService1 a new itemId is created for that account and data is freshly added to the data base considering the account as new. Since there is no mapping to the old data , so you will not get the same transaction IDs for those transactions.
Hence removeItem should only be called if you wish to delete the account and it's data from Yodlee platform.

Is there a way to get transactions for all container accounts belongs to a specific site aggregated using Yodle APIs?

Is there a way to get transactions for all container accounts that belong to a specific site aggregated using Yodle APIs?
For example, the American Express Cards (siteId: 12) have bank, credits, loans and etc enabled containers.
So, can we get the transactions for all enabled container accounts for a single site?
If you mean to ask this- "Is there a way to get transactions for all the accounts(all containers) belongs to a particular site?" Then.
Yodlee provides two ways to get the transactions.
Getting transactions for a specific account i.e., you need to provide itemAccountId for each account to get the transactions for the specific account using executeUserSearchRequest API.
Getting transactions for all the accounts i.e., you need not to provide itemAccountId for any of the particular account while provide rest of the input parameters to get transactions using executeUserSearchRequest but this will return you transactions for all the accounts. Using your example, it will give you transactions for all the container present under SiteID-12 as well as other sites added by the consumer. Though you can use the second approach to get the transactions for all accounts and then filter it out for all containers belongs to a specific site. You can use the sumInfoId(ContentServiceID) present in the response for each transaction.