How to get historic Bitcoin Price Index using coinbase or any other open source API - bitcoin

I would like to get a history of the bitcoin price.
For example I would like to be able to provide a start_date and end_date for a search/filter.
Are there any open source and trusted api with almost accurate prices for this?
I have noticed that coinbase only returns the spot/current price and I cannot pass more params to filter
curl https://api.coinbase.com/v2/prices/spot?currency=USD
I have also used coindesk but the prices are not accurate.
https://api.coindesk.com/v1/bpi/historical/close.json?start=2019-08-10&end=2020-08-11&currency=zar

bitcom.com does not provide historical prices, it is wallet and kinda banking services.
API for pro.bitcom.com, (crypto exchange) provides to historical prices.
https://docs.pro.coinbase.com/#get-historic-rates

I would recommend you to use the CoinMarketCap API if what you want are historical prices.
There are also libraries like ccxt where you can probably find this information as well.
However you have keep in mind that due to the number of exchanges these prices are approximations, and there is not sucha thing as a "unique" price for bitcoin.

Related

Binance API transaction history

I am trying to display a users transaction history in binance, including fund deposits and withdrawals as well as buying and selling of different crypto's. Does anyone know which binance API endpoints I would use to do this? It seems quite complicated in comparison to other trading platforms.
Thanks
This is the link to the docs: https://binance-docs.github.io/apidocs/spot/en/#withdraw-history-supporting-network-user_data
I can see the Wallet endpoints "Withdraw" and "Deposit", but this won't cover crypto trading will it?, The account trade list call would be ideal, but it requires a symbol input which I'm not sure how I would obtain dynamically.
I would also like this endpoint to provide me with the data so I can get the avg buy price for a crypto
Currently this is not supported. See: https://dev.binance.vision/t/fetch-all-account-orders/279/3
This is the route you're looking for to get the user trade history. The big downside is that you have to specify the exchange symbol, you cannot get the history of the account with just one request:
https://binance-docs.github.io/apidocs/spot/en/#account-trade-list-user_data
Get your account information first. You can then extract non-zero balances from here to get symbols for transactions. You can then loop through each currency pair and get its transaction history. This seems to be the most optimistic way we can get right now
You can also try to use caching. For example, you can remember balance for a particular coin, and if it has not changed by the next launch, then it is likely (but not 100%) that no transactions were made with it
You can also connect to WebSocket, but this is still a terrible crutch and requires a DOS attack to get the necessary data
Please note that here the balances for Savings wallet have LD prefix added to their ticker. For example, BTC in the Savings wallet is labeled as LDBTC

How to retrieve listing price data for specific event using ticketmaster's developer API?

I made a Ticketmaster developer account and I would like to pull listing price data for specific events. I am able to retrieve this type of listing data for specific events using Stubhub's API, but looking through Ticketmaster's API documentation, I don't see any specific API requests that will return listing data, such as section, row and listing_price.
Am I missing something, or is it not possible to retrieve this type of listing data using Ticketmaster's API?
For anyone who stumbles upon this in the future, TicketMaster does offer this functionality through their availability endpoint. However you have to be a TM nexus partner to use it, and getting approved as a partner depends on what your business/software does and income etc...

Product showing up in Amazon MWS API but not Product Advertising API

I'm building an integration for my warehouse and using Amazon's API's to get product information from UPC. I've ran into a number of times where a result comes back accurately from the GetMatchingProduct on MWS API but not from the Product Advertising API. Even Vice Versa has occurred.
Why might this be? Is there a reason I should just use one or the other?
Example: UPC - 363824072463
MWS brings back ASIN - B0057UUHGU which is the relevant one that also comes back when you just search Amazon. However the Product Advertising API does not return this in its list of results at all.
We have found that often times new, or recently changed items take a little while to correctly populate in the Product Advertising API.
Also, for what you say your purposes are, I would be cautious relying on the Product Advertising API. It is a sales tool, so sometimes when given an out-of-stock item, for instance, it will return results of a different item (maybe similar, maybe was variated with it, etc) as the purpose of that API is to drive sales to Amazon.

Retrive Sales Data through API for sales from POS

I am trying to do some custom analytics and analysis for my business. We use the Square POS, and have access to the API. I can retrieve the transactions, but cannot seem to get the Order ID's that I need to batch retrieve the orders. What am I missing? Is it possible through the API to access the same sales data that I can see in my dashboard?
It depends on what exactly you are looking for. Items that are sold? Try the v1Payments endpoint. The order's endpoint that you are using is for primarily for pulling the transaction data from e-commerce transactions.

Shopify - New order using the Shopify API - how to know tax and shipping?

We have built an e-commerce web application (Node backend, Vue frontend). We process the payment using Stripe, but many brands have asked us if the order and inventory control can be done in Shopify. We are trying to figure out the best way integrate a payment module into Shopify so that the brand can manage the fulfilment and inventory through Shopify.
It seems we should use the Order API to create an order and mark it as paid. But how do we know that the product is in stock, and what are the cost for shipping and tax from Shopify when creating the order? I think we can use the Product API to get inventory levels, but where is the shipping and tax endpoints?
If I understand the Order API correctly, we need to tell Shopify what are the shipping costs and tax costs, when a new order is created. Is that right? How could we possibly know those figures? Seems like there should be an endpoint to calculate shipping costs and get a product's tax rates so that we can then pass those figures back into the Order API. Am I missing something?
I thought maybe we are supposed to create an order that has financial_status: pending first to get shipping and tax rates back (does it even give you those?), then update the order to either cancel_reason: customer or cancel_reason: inventory if those rates are too expensive and the order is declined? But surely we need to know what shipping methods are available to the customer in order to tell Shopify which one to use, right? Or does it by default choose the cheapest one when creating an order?
Notes:
We know the customers shipping address
We don't know where the product is warehoused (Shopify does I think)
We don't know the weights or dimensions of the product (Shopify does I think)
This answer is a little bit late, but i hope, i can help others that are struggling with the same issue.
First i would recommend to set up all Shipping Rates and Taxes in Shopify. There are plenty of manuals to achieve this:
https://help.shopify.com/manual/taxes#general-process-to-set-up-taxes
https://help.shopify.com/manual/shipping/rates-and-methods/calculated-rates
After this there are different possibilities to calculate your shipping and tax cost.
Your shipping cost can you get via the active_shipping API, which can be found here:
https://github.com/Shopify/active_shipping
Or the following Shopify Application: https://apps.shopify.com/boxify
However, you may need to know size and storage location for theese solutions.
The taxes can you get via the country in the Admin API, there is a specific key-value pair for this:
https://help.shopify.com/api/reference/country
I hope that's enough information to get closer to solving the issue, for at least someone.