API wrong WITHDRAWAL Fee - coinbase-api

I'm developing a application to monitor Transactions on Coinbase. I developed my interface to ease of use. I don't know what I'm doing wrong, but all my withdrawals are with wrong Fee's. I what to give to the user the real fee of a withdrawal, but if I use the accounts/:account_id:/transactions no fee is available to the withdrawal, I have to call again with the resource url, but then I get the fee under network, and this value is only from the network gas fee. Who can I get the full fee?
For example, I transferred 0,54938902 ETH from coinbase to another exanger, according to the API the fee was 0.00103950 ETH, but in reality the fee was 0.00259477 ETH, because 0.54679425 ETH was the actual value to enter at destination.
Thank You

Never mind, all is good, the problem is that this particular destination exchange charges deposit fee...

Related

How to send Bitcoin > $1 on Coinbase?

When I tried to send $1 equivalent of Bitcoin using the Coinbase API I get this error:
ClientError [ValidationError]: Amount is below the minimum (0.0001 BTC) required to send on-blockchain.
How is it possible to enable microtransactions with Bitcoin? I want users to be able to trade in game items under 1 dollar (Coinbase's daily limit per user). I understand this restriction is due to transaction fees, but I know apps exist like Bitcoin Blast, where users are regularly awarded miniscule amounts of Bitcoin.
How do you think they do it? What could be a solution for using microtransactions with Coinbase API?
A lot of those apps would tell the users they have earned Bitcoin but require the user to have x amount of Bitcoin before being able to withdraw, with the threshold above the 0.0001 BTC minimum transaction requirement.
I think Robinhood does something similar where you can buy $1 of BTC on Robinhood but you don't have access to the crypto's wallet address. This is because Robinhood owns all your crypto and you're just trading the spot price. They made a large investment in crypto awhile ago and they hold that as collateral allowing users to buy and sell BTC for $1 without paying transaction fees because users are not trading BTC on the blockchain, they are trading Robinhood's supply of crypto.
You could do something similar as well, people can spend $1 worth of BTC on a game item but they're just trading the spot price of BTC and the transaction takes place in your game's digital ledger rather than Bitcoins' blockchain.
If you want your users to withdraw crypto, someone is going to have to pay that fee. You can either pay the fee yourself, have the user pay the fee, or do something like Robinhood where you can only deposit/withdraw in cash but users can exchange that cash for crypto that they don't get wallet access to.

Amazon MWS determine if product is in BuyBox

I am integrating MWS Amazon API. For importing product I need one important field like whether the seller product is buybox winner or not. I need to set flag in our DB.
I have check all the possible API of product in Amazon scratchpad but not get luck how to get this information.
The winner of the buy box can (and does) change very frequently, depending on the number of sellers for the product. The best way to get up-to-the-minute notifications of a product's buy box status is to subscribe to the AnyOfferChangedNotification: https://docs.developer.amazonservices.com/en_US/notifications/Notifications_AnyOfferChangedNotification.html
You can use those notifications to update your database. Another option is the Products API which has a GetLowestPricedOffersForASIN operation which will tell you if your ASIN is currently in the buy box. http://docs.developer.amazonservices.com/en_US/products/Products_GetLowestPricedOffersForASIN.html
Look for IsBuyBoxWinner.
While the question is old, it could still be useful to someone having a right answer about the product api solution.
In the product api there is GetLowestPricedOffersForSKU (slightly different from GetLowestPricedOffersForASIN ) which has, in addition to the information "IsBuyBoxWinner", the information "MyOffer". The two values combined can tell if you have the buybox.
Keep in mind that the api call limits for both are very strict (200 requests max per hours) so in the case of a very high number of offers the subscription to "AnyOfferChangedNotification" is the only real option. It requires further developing to consume those notifications though, so it is by no means simple to develop.
One thing to consider is that the AnyOfferChangedNotification is not a service that can push to the SQS queue that is a FIFO(First one first-out) style buffer. You can only push to a standard - random order sqs queue. I thought I was being smart when I set up two threads in my application, one to download the messages and one to process them. However when you download messages from download these messages you can get messages from anywhere in the SQS queue. To be successful you need to at least
Download all the messages to your local cache/buffer/db until amazon returns 'there are no more messages'
Run your process off of that local buffer that was built and current as the time you got the last 'no more message' returned from amazon
It is not clear from amazons documentation but I had a concern that I have not proven yet but worth looking in to. If an asin reprices two or three times quickly it is not clear if the messages could come in to queue out of order (or any one messages could be delayed). By 'out of order' I mean for one sku/asin it is not clear if you can get a message with a more recent 'Time of Offer Change' before one with an older 'Time of Offer Change' If so that could create a situation where 1)you have a ASIN that reprices at 12:00:00 and again at 12:00:01(Time of Offer Change time). 2) At 12:01:00 you poll the queue and the later 12:00:01 price change is there but not ther earlier one from 12:00:00. 3)You iterate the sqs queue until you clear it and then you do your thing(reprice or send messages or whatever). Then on the next pass you poll the queue again and you get this earlier AnyOfferChangeNotification. I added logic in my code to track the 'Time of Offer Change' for any asin/sku and alarm if it rolls backwards.
Other things to consider.
1)If you go out of stock on a ASIN/SKU you stop getting messages 2)You dont start getting messages on ASIN/SKU until you ship the item in for the first time, just adding it to FBA inventory is not enough. If you need pricing to update that earlier (or when you go out of stock) you also need to poll GetLowestPricedOffersForASIN

Where to find free or paid database of European postal addresses?

I'm searching for database for delivery service. Delivery rate calculates based on ZIP code. The only good product I found is geopostcodes.com, is there any more? E.g. geonames.org is good but contains not enough data.
How about this free solution http://download.geonames.org/export/zip/.

alert box through validation

Is it possible with cakePHP 2.0 to have a field validated based on two other fields and still allow the user to go through with the submit?
Something like this, I have a form that has rate, term and credit tier. The rate is usually based on the term and credit tier like this, a credit tier of B and a term of 60 months will have a rate of 6.75%. But there will be instances where I want to have a rate of 5.25% for this same tier and term. Is there a way to alert the user that the rate does not match the tier and term combination but still allow the user to submit the rate the way it is? The rate, term, and tier will be stored in the database so that it can easily be changed as rates change.
Sure - in your model, define your own validation method and crunch your numbers in there. It might be better to pass your data in with $this->Form->hidden() than call other models while validating.

Changing Currency on Site

I will be selling products on my site in GBP, however I would like an option for my customers to change currency to dollars and euros. This I know how to do but is there anyway to automatically fetch the data (currency rates) without manually changing it each day.
Also.
To avoid people tampering with the data on PayPal,which means that people can change the price to 1p. I put a security function:
if the price = fixed price then transaction approved.
However as the currency well keep changing is there anyway to get around that as well.
It's a bit of a tricky one.
If you accept payment in other currencies, you firstly have to show the price in that currency; this is not available as a feed or web service from PayPal (as far as I know). There are other feeds which provide this (Google is your friend - "currency conversion feed"), but they will never be exactly the same as PayPal.
The second issue is that - once you have taken payment in that currency - you don't know exactly how much you're going to get back in Pounds - say the sale happens today, but you only withdraw the money next week. The exchange rate could have shifted in that time, making your sale worth less in GBP. This risk could easily eat up your profits - especially in times of financial volatility.
The third issue is that currency conversion costs money - depending on volume and method, somewhere between 2 and 5%.
So, unless you're selling products with a very high margin, I'd be very nervous about taking payment in other currencies unless you can spend in those currencies too; if you can spend the money in foreign currencies, you don't have to pay for the conversion, and you are less exposed to the currency risk.
You can call out to a currency exchange web service.
I would suggest checking with your bank (whoever is behind your e-commerce site), as they may have a free tool for this.
Here is an example from a bank in New York -- it's a web service that will give you the exchange rate for any given date in xml format: http://www.ny.frb.org/markets/pilotfx.html
There is also the Google Finance API
http://code.google.com/apis/finance/docs/2.0/reference.html
This service is not free (I don't think), but looks pretty slick, and gives A LOT of infmormation via web service: http://www.xignite.com/forex/web-service/2000106.html

Resources