Author

Topic: Developing of API (Read 494 times)

hero member
Activity: 1778
Merit: 764
www.V.systems
February 27, 2019, 04:21:18 PM
#9
Hi OP, I know you don't want to use external API's but you can rely on insight
They're open source so you can probably modify and redeploy according to your own needs. This is, of course, if you're sticking to commercial or personal uses and not something proprietary.
newbie
Activity: 53
Merit: 0
February 18, 2019, 07:00:50 PM
#8
best would be to talk directly to bitcoind, throw the rpc interface, just send some json and parse it.

In that way you will not really need to rely to much on any third party(often they come and go).
You might want to have like 2 urls that you get the current block from for checking that your node is up to date.

Alot of blockexplorers work like this, and you will both learn more and offer a better service that you can scale, The down side is that you will have to allocate like 300/250 gb of diskspace for the bitcoins blockchain
legendary
Activity: 3430
Merit: 3080
February 17, 2019, 03:05:54 PM
#7
If you want a quick and easy sollution, check out https://bitcore.io

that software should come with a health warning...


From the bitcore.io front page:

Quote
Bitcore uses the source code of Bitcoin directly, so accidental chain forks are a thing of the past.

Right, except when Bitpay change the underlying source code to switch you to a different chain fork, deliberately. At least Bitpay tell you they do this kind of thing, they tell you "bad things will happen" if you don't use the software that uses the chain fork they think you should use.


Unless you want to constantly check how Bitpay are imposing their self-interest on the code you run, you're better off choosing a solution that you can rely on permanently. Or fork their API and patch it into the Bitcoin source code, then you can be compatible with the API and use trustworthy source for the bitcoin network (assuming the API does the job you want)
member
Activity: 140
Merit: 56
February 17, 2019, 01:23:44 PM
#6
Why don't you want to use an external API?
Could be they want to verify everything themselves and not trust another node. If that's the case they could just aggregate the stats from multiple APIs and avg it out while keeping an eye out for outliers. Probably still easier than running a full node and you've got a bit more assurance.
sr. member
Activity: 860
Merit: 423
February 16, 2019, 03:35:20 PM
#5
Thank you!
I'll explore and try.

GL

Why don't you want to use an external API?

There are a lot of great solutions out there, even for free. I would recommend chain.so, they have the best realtime socket setup, and you can subscribe to events like mew blocks, or new mempool txes.

Parsing blocks and txes yourself from the full node is a total pain in the ass, while it would be a great idea if you're looking to learn, it's a waste of time if you have some business end-goal from this..

Sometimes, running a full node, is a cost overhead.
sr. member
Activity: 938
Merit: 452
Check your coin privilege
February 14, 2019, 12:25:29 AM
#4
Thank you!
I'll explore and try.

GL

Why don't you want to use an external API?

There are a lot of great solutions out there, even for free. I would recommend chain.so, they have the best realtime socket setup, and you can subscribe to events like mew blocks, or new mempool txes.

Parsing blocks and txes yourself from the full node is a total pain in the ass, while it would be a great idea if you're looking to learn, it's a waste of time if you have some business end-goal from this..
newbie
Activity: 6
Merit: 1
February 13, 2019, 12:59:27 PM
#3
Thank you!
I'll explore and try.

GL
legendary
Activity: 3584
Merit: 5243
https://merel.mobi => buy facemasks with BTC/LTC
February 12, 2019, 03:39:18 PM
#2
If you want a quick and easy sollution, check out https://bitcore.io

If you want to do it yourself, you'll have to run a full node and either use the json-rpc interface and build a custom api on top of it, or build a block parser, extract the needed data and build an api on top of this data
newbie
Activity: 6
Merit: 1
February 12, 2019, 03:35:48 PM
#1
Hello guys, i need your help.
I'm trying to create an API. With help of this API i would like to get statistics for the last 24 hours of Bitcoin network and return something like that:
  • Amount of mined blocks
  • Amount of transactions
  • Hashrate

and so on...

Can you suggest me, how i can access this data without using others APIs?

Thanks

GL and have a good day, guys!
Jump to: