biteasy / blockchain-api Goto Github PK
View Code? Open in Web Editor NEWBiteasy Blockchain REST API
Biteasy Blockchain REST API
When asking for unspent outputs it sometimes times out which doesn't return a proper HTTP error.
In apps, it looks like as if SSL handshake was broken:
SSL handshake aborted:
ssl=0x7779cbf8: Failure in SSL library, usually a protocol error
error:14077410:SSL
routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
(external/openssl/s23_clnt.c:741 0x72f7d7e8:0x00000000)
i couldn't find examples for that on mainnet, but in testnet:
https://api.biteasy.com/testnet/v1/unspent-outputs/miBaPwzENDj4K4dytitWKayvykbG6HpV78
https://www.biteasy.com/testnet/addresses/miBaPwzENDj4K4dytitWKayvykbG6HpV78
the first report ~20 unspents, all of them have nothing to do with that address.
I really need the "script_pub_key" in the same format that is provided by blockchain.info. Is there a way to convert it?
How could I do that?
I randomly found this adress https://www.biteasy.com/blockchain/addresses/1Y2sKhUZvsP2EANpKra3FaFZufHq5VEwT wich has as negative balance.
Also it would be nice if batch address calls supported a delimited list of addresses rather than an array.
_This is not an api bug!,_
but the support page (https://www.biteasy.com/support) "strongly suggests" to use github because it is the fastest way.
Details:
https://www.biteasy.com/ uses SHA-1 signatures (for https) which can be considered broken since 2005 (https://en.wikipedia.org/wiki/SHA-1#Attacks)
Currently it just shows the block hash. Would be nice if you'd see the height.
The In Block
field shows "Main Chain", rather than test net.
Is this deliberate?
I tried the echo websocket test from both https and http
https://www.websocket.org/echo.html
http://www.websocket.org/echo.html
I tried following combinations of urls
wss://ws.biteasy.com/blockchain/v1
wss://ws.biteasy.com/blockchain/v1/
ws://ws.biteasy.com/blockchain/v1/
ws://ws.biteasy.com/blockchain/v1
I am unable to connect.
For example, this URL gives ALL the blocks heights, and not only the 20001:
https://api.biteasy.com/blockchain/v1/blocks?height=200001&type=BEST_CHAIN
I'm filing this here because I don't know a better say to reach you.
Mails to [email protected] and [email protected] bounce with this message:
[email protected]: host
3beb58e0adbc4dab843e55ce616b80.pamx1.hotmail.com[65.54.188.78] said: 550
Requested action not taken: mailbox unavailable (in reply to RCPT TO
command)
Example: https://api.biteasy.com/blockchain/v1/addresses/1dice8EMZmqKvrGE4Qc9bUFf9PX3xaYDp/unspent-outputs
Current output:
{"status":500,"code":500,"messages":"A serious internal error has occured. Please notify the monkeys!"}
If this API has been deprecated in favour of https://api.biteasy.com/blockchain/v1/unspent-outputs/1dice8EMZmqKvrGE4Qc9bUFf9PX3xaYDp, is it possible you could please update the documentation?
var mySocket = new WebSocket('wss://ws.biteasy.com/blockchain/v1');
WebSocket connection to 'wss://ws.biteasy.com/blockchain/v1' failed: Error during WebSocket handshake: Unexpected response code: 502
I'm testing your api (on testnet network) and i sent to a new address 1.54 btc and the current balance in the api is 3.09 why ?
https://www.biteasy.com/testnet/addresses/muVy2RafYwQoHXvxwXSu3yg8CM6Wap61eC
Whereever the API returns a script, it should also return the unparsed version of the script, so just the bytes (hex encoded).
More concrete, I'd need it for the unspent outputs:
https://api.biteasy.com/testnet/v1/unspent-outputs?address[]=mm4RrYHaQWqSt1SpQATzMR8abTBVdMQ4Qz
is the websocket still available? If so, why can't i connect?
I tried connecting using the following:
wss://ws.biteasy.com/blockchain/v1
wss://ws.biteasy.com/blockchain/v1/
ws://ws.biteasy.com/blockchain/v1/
ws://ws.biteasy.com/blockchain/v1
but no luck. Any help appriciated. Thanks!
I was hoping to look into the Biteasy API but the documentation site seems to be down. I'm visiting this URL: (that's from both the biteasy.com website as well as github)
But it shows some sort of Sirportly page not found error.
the current height is supposed to be 167753
Tried a random address with a lot of unspent outputs and the server takes a lot of time to return on higher pages. It gets even worse that on page 9 it crashes completely
Thanks!
biteasy is a easy way to learn It-Programming and make Money with blockmining to hash blocks and spend transactions
I have a use case that I need to get the first block of a specific date.
The endpoint /blocks returns the correct list but the block I need is in the end of that list so I have to paginate the whole list or search the previous day and search for the next_block. Both cases are sub-optimal.
Would it be possible to add a confirmations
field to the API? Blockchain, Blockr and Insight have that info but Biteasy does not so I am stuck querying multiple APIs to get all the data I need. Would be nice to simply rely on Biteasy.
It would be nice if there was an easy way to disable paging. Currently, you have to append something like &per_page=9999999999999
The currently documented behaviour of not returning any results if you append &per_page=0 doesn't make any sense to me. When would you want to use that? Instead, it could disable paging.
I tried to use the API in a Java and Python applicatin. In both cases I get 403 error. What am I doing wrong?
My Python code:
import json
import urllib2
url = "https://api.biteasy.com/blockchain/v1/addresses/1TNtj2YPt1z7uNWkSzMT5Nvkj3PHKma1z"
data = json.load(urllib2.urlopen(url))
print data
There is a problem to show that
transaction.
I guess, what is exceptional
here is the 3rd out tx is a multisig -
it's really not a standard one.
Thanks in advance,
you have a great product.
Roman.
Now that we have the script_pub_key in a workable format, all we need is PushTX and we can drop the buggy blockchain.info forever. Any plans for this?
Here's a transaction from Testnet. https://www.biteasy.com/testnet/transactions/1e496ef6b6ff77105fa1862cfd5044475caab073c302282a9387f6fee44e72ea
I created it to send 1 BTC, with a 0.001 fee, to another account. Bitcoind chose a 10 BTC input.
For the "BTC transacted" data, you report 8.9999. I'd expect to see 1.0. Is that just a factor of it's hard to guess what is an actual spend and what is a change transaction, so you choose the larger of the two?
I'm opening a separate ticket for this idea, because it's independant from the other tickets.
The idea is that a client can use a stable URL if he wants to raise the number of results to whatever maximum the API will want to serve. The client will specify &per_page=MAX
Also see: #16 (comment)
(This is currently the blocking issue for releasing the swipe wallet feature of Bitcoin Wallet to the public.)
For transaction ba44cc1e1d2aa767ac6b32b4c8f931ccffa6e81858de6f5a297a8ceebe85ea05 Biteasy is showing a different address than blockchain.info, blockr, chain and sochain:
https://chain.so/api/v2/tx/BTC/ba44cc1e1d2aa767ac6b32b4c8f931ccffa6e81858de6f5a297a8ceebe85ea05
http://btc.blockr.io/api/v1/tx/info/ba44cc1e1d2aa767ac6b32b4c8f931ccffa6e81858de6f5a297a8ceebe85ea05
I would assume it is an issue with handling inputs that come from a multisig output, but not sure.
How do I get around the CORS restriction on the Biteasy API?
The documentation mentions:
The REST API currently only supports JSON for the request and response formats. That means, that requests should always send the following header:
Content-Type: application/json
But to my knowledge a GET
request doesn't even have a content type.
I could use JSONP and provide a callback function like https://api.biteasy.com/blockchain/v1/addresses/1dice8EMZmqKvrGE4Qc9bUFf9PX3xaYDp/unspent-outputs?per_page=2&callback=callback-function` but Biteasy doesn't seem to understand it needs to wrap the response in the callback function.
According to https://support.biteasy.com/kb/rest-api/endpoints/transactions-hash there is a field "object" which contains the hex of the transaction. This doesn't seem to exist though.
Example: look at the output of https://api.biteasy.com/v2/btc/testnet/transactions/4586e67ee5adcdbc97ed3d2a026ee8703df2ed3553854c186c216e90cd761b69
I suspect the UXTO API returns bad results since a few days. Consider this call:
https://api.biteasy.com/testnet/v1/unspent-outputs?address[]=mm4RrYHaQWqSt1SpQATzMR8abTBVdMQ4Qz
It returns several unspent outputs. Now see the same address on this URL, its got a balance of 0:
https://www.biteasy.com/testnet/addresses/mm4RrYHaQWqSt1SpQATzMR8abTBVdMQ4Qz
I did not send any coins from or to this address for about 2 weeks. I think when I last checked, the above API call returned an empty list (as expected). It feels as if some server change during the last few days regressed the expected result to something unexpected.
...
If you look at the output for https://api.biteasy.com/blockchain/v1/transactions/d1ef46055a84fd02ee82580d691064780def18614d98646371c3448ca20019ac you will see that there is no way to determine that this transaction has an input with a nonstandard lock time (it's usually 0, but in this rare case it's not).
This makes is impossible to reconstruct the original transaction.
The transaction value for nSequence is not included in the output either, and probably should be for completeness. (I do not have any examples of transactions in the blockchain where this is a non-standard value at this time.)
The reason I want these values is so I can take the JSON and turn it into a binary that matches the original transaction. This is easy with other services; see https://github.com/richardkiss/pycoin/blob/master/pycoin/services/blockr_io.py for an example.
Example: Find transactions of 1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD in the block with hash 000000000000006a963150feb057e34303095ee00a069e72872bf1ada410cf94
(the URL below is exactly as proposed in the sandbox)
I am comparing the Blockchain.info and Biteasy API's. Here is an example of the unspent outputs endpoint for the same multisig address for both services. I understand there are small differences between both API's but they seem to differ heavily.
tx_hash
(db29...) and transaction_hash
(9e07...) are not the same?tx_index
(5480...) and transaction_index
(0) are not even close, I guess the transaction_index
from Biteasy matches with the tx_output_n
?script
(a914...) and script_pub_key
(HASH...) are in a different format, I guess you can encode one in the other?Do both API's simply use different ways to present the same data or is the data different between the two?
https://blockchain.info/unspent?active=3CmmhMciChAx4FtGxHtYppoPBLpRLcBy1H
{
"tx_hash": "db29f6a52fa09bf852cefd514fdd71027894f2b19f6fc752cb5e001dc323079e",
"tx_index": 54805310,
"tx_output_n": 0,
"script": "a914798f9646eb0c7efdd33eaf019a35fc6e37bffb4287",
"value": 100000,
"value_hex": "0186a0",
"confirmations": 1369
}
https://api.biteasy.com/blockchain/v1/addresses/3CmmhMciChAx4FtGxHtYppoPBLpRLcBy1H/unspent-outputs
{
"transaction_hash": "9e0723c31d005ecb52c76f9fb1f294780271dd4f51fdce52f89ba02fa5f629db",
"script_pub_key": "HASH160 [798f9646eb0c7efdd33eaf019a35fc6e37bffb42] EQUAL",
"to_address": "3CmmhMciChAx4FtGxHtYppoPBLpRLcBy1H",
"value": 100000,
"transaction_index": 0,
"is_spent": 0,
"script_sent_type": "PAY_TO_HASH"
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.