Questions tagged [python]

Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability.

Filter by
Sorted by
Tagged with
0
votes
0answers
81 views

submitblock to btc-core fails to decode

I'm trying to create a little mining-script that connects over rpc to bitcoin core. I have problems following the documentation and all attempts to create a valid block (with dummy-nonce for testing) ...
0
votes
0answers
56 views

How to get the block hash in the chainstate leveldb?

From this link What are the keys used in the blockchain levelDB (ie what are the key:value pairs)?, to get the block hash I use the obfuscation key and xor it with the result I get from the db. So I ...
0
votes
0answers
18 views

Blockchain.info block explorer help

Using the python blockchain.info client When I attempt to get blocks and print the result I get this output: <blockchain.blockexplorer.SimpleBlock object at 0x103c6b208> How can I access the ...
0
votes
1answer
34 views

Read an XPUB list of transactions to Python using my own node [closed]

Anyone familiar with a Python library that can get a list of all transactions under an XPUB but by connecting to a Bitcoin node through RPC?
0
votes
1answer
30 views

Retrieve number of OP-RETURN transaction

Is there a possible way to extract the bitcoin transaction protocoll with Python and extract specifically OP RETURN transaction? I want to plot the number of those over the course of time to derive ...
0
votes
0answers
64 views

How can I generate a bitcoin address offline in Python?

I am new to python and bitcoin so please bear with my question. I want to integrate bitcoin as a payment method in my platform, I want to use 3rd party api service for sending transactions to block-...
0
votes
1answer
51 views

How do I use an issued API key in my python 3 script to bypass the request limiter?

I got an API key from blockchain.info to bypass the request limiter, but I don't know how to use it and I can't find any relevant info online. url = "https://blockchain.info/rawblock/" + str(s) ...
0
votes
1answer
59 views

broadcasting error for raw bitcoin transaction testnet

I am trying to create a raw transaction and send it to the testnet. I am using testnet keys and here is the simplified readable output from my script: decoded private key: ...
0
votes
2answers
59 views

What are the web3py equivalent for communicating with bitcoin in Python?

I am fairly new to working with Python, I have a requirement where I need to perform some basic bitcoin operations on my local system rather than relying on some external API's, those function mainly ...
0
votes
1answer
99 views

Question about Python library coincurve/libsecp256k

I am a noob with cryptography, just trying to learn using python and the library Coincurve ( https://github.com/ofek/coincurve ) which is a mature Python binding for libsecp256k1. The following code ...
0
votes
0answers
62 views

Bitcoin walletnotify doesn't pass the txid as %s

Thoroughly searched this online but haven't found an answer yet. Basically I'm using the below line in my conf file: walletnotify=C:\pathname\filename.py %s It is supposed to run my python file ...
0
votes
0answers
33 views

How can I connect to my own bitcoind node via json-rpc calls from python3 (or Django)? I'm using Windows 10

Context: I'm using bitcoind on Windows 10 and am able to operate it from bitcoin-cli already. Just want to do it programmatically from python3. Bitcoin wiki says python-jsonrpc is for old versions ...
0
votes
0answers
74 views

python-bitcoinrpc: modulenotfounderror no module named 'bitcoinrpc'

I'm running bitcoind/ bitcoind -regtest on Windows 10 and am already able to use bitcoin-cli -regtest along with json-rpc methods to perform basic operations and get balances etc. When I try to do ...
0
votes
0answers
53 views

SHA256 hash generating python

Can somebody give me complete python code that outputs a valid and random sha256 mining hash using python? I know bitcoin with a laptop is incredibly unprofitable, especially with python, I am just ...
0
votes
1answer
54 views

Dogecoin Scrypt mining hashes python [closed]

I know making a miner in python is inefficient and unprofitable, however I would like to do it as an experiment. What exactly is the code to generate a Dogecoin Scrypt mining hash in python? For ...
0
votes
0answers
122 views

Fastest way to generate millions of public keys from private keys (Python/C#)

I have run into a problem when trying to generate public keys from my mnemonics via privatekeys. The mnemonic -> privkey is fairly fast. Although when deriving the m/44./0./0./0/0 public adress it ...
0
votes
0answers
70 views

examples of using pycoin in python script

Im attempting to create a python script/app that creates and holds its own funds for trading btc and alts. I cant find any examples of how to use pycoin as anything other than a command line tool. ...
0
votes
1answer
120 views

Python - Querying bitcoin's block header using leveldb

I am facing a stupid problem. I am trying to read bitcoin/blocks/index leveldb using plyvel. I've set up a regtest and i know there is a block with the hash : ...
0
votes
1answer
990 views

Get Bitcoin Wallet balance with Python

On a tutorial in Youtube it uses pybitcointools. Upon searching it's github repository, I have found that it was not maintained anymore. Are there any alternative to this library which can get wallet ...
0
votes
1answer
83 views

How do I get the value of a btc address transaction with pybitcoin tools?

Lets say that I execute the code below when the user accesses the deposit page. my_private_key = random_key() my_public_key = privtopub(my_private_key) my_address = pubtoaddr(my_public_key) And I ...
0
votes
1answer
50 views

Trying to create a bitcoin based webapp in python which takes BTC deposits. How would I use pybitcointools to implement this?

Trying to create a bitcoin based webapp in python which takes BTC deposits (New to Bitcoin in general, but want to get involved). Although I would preferably want to use a different address for each ...
0
votes
0answers
103 views

getblockchaininfo timeout using API only

Thanks in advance. If I call getblockchaininfo through bitcoin-cli it just works. It might take a while but it works all the time. If I call it from within a Python Script from bitcoin.rpc import ...
0
votes
1answer
287 views

Electrum Gap Limit from CLI

Is there any way to change wallet gap limit in Electrum from command line? If yes, how? If not, could it be bypassed using some kind of external script? I really need to avoid GUI. Thank you in ...
0
votes
1answer
241 views

Pycoin: How to sign SegWit transaction via Pycoin?

My target is to make transaction with unspent transaction outputs(UTXOS). The information of UTXOs is as follow. [ { "pt_idx": 0, "subaccount": 37, "ga_asset_id": 1, "value": "...
0
votes
1answer
259 views

Pycoin: How to send transaction?

There is a problem in making and sending transaction. I got UTXOS by using API(GreenAddress), and from utxos I made a transaction. But calculated fee is always larger than one in original GA service. ...
0
votes
1answer
33 views

GreenAddress: Noticfication of receiving transaction

I'm developing python project using greenaddress API. I use pycoin package. I almost completed, but I can't resolve notification problem. Using greenaddress API, the notification received is as follow....
0
votes
0answers
118 views

Issues when attempting to get accounts using the GDAX API

Here is the github I have working with: https://github.com/danpaquin/gdax-python When I run the following code: auth_client.get_accounts() I'm getting the following error: TypeError: expected ...
0
votes
0answers
188 views

Help with multi-input transaction by code

I'm trying to consolidate multiple inputs into a single output, all left over is for the miner. When I send my transaction to a peer, it is never mined. I believe something is invalid in the multi-...
0
votes
1answer
162 views

What python code is necessary to convert the integers of a bitcoin public key into the proper hex version thereof?

If I get a public key of two integers, x and y values what code is necessary to convert them into their hex versions without any additional letters, or numbers? This is half a Python programming ...
0
votes
1answer
259 views

How to get the number of Bitcoin transactions every 30mins using API in python?

I'd like to get number of Bitcoin transactions every 30 minutes using API in python. Does someone know sample code how to mount in Github or any website?
0
votes
1answer
4k views

Bittrex websockets: How to get the order history?

Using the Bittrex websockets API I am able to get the summary updates for all markets and also the exchange updates for specific markets. However, I am not able to receive the order history (as ...
0
votes
4answers
974 views

How to read each bitcoin block by python

I need to read all Bitcoin transactions from the first one until now and extract all Bitcoin addresses for further analyses Any idea how to do it in Python?
0
votes
1answer
394 views

How to generate Electrum address with pybitcointools

I want to create a payment service where I want to be able to charge each client according to its invoice. I picked Electrum as my underlying wallet and pybitcontools as my Python interface. I would ...
0
votes
1answer
673 views

Pybitcointools python 3.5 support

I am trying to run Vitalik Buterin's python bitcoin wrapper. I installed it from PyPi (pip install pybitcointools ). When I try to run: import bitcoin I get the following error: ImportError ...
0
votes
1answer
171 views

How can I work out why a transaction isn't being included in any blocks? [duplicate]

I've crafted a testnet p2sh address using python-bitcoinlib. The script contents is 2-of-2 multisig: 2, key1, key2, 2, OP_CHECKMULTISIG Redeem script: ...
0
votes
1answer
366 views

How to auto deposit bitcoins on btc-e?

BTC-e gives a new address to send to for every time a deposit is to be made. These addressees can be accesses through this url: Bitcoin deposit authentication required I am currently using python to ...
-1
votes
1answer
938 views

converting RUBY script into PYTHON ( Recovering private key when someone uses the same k twice )

require 'ecdsa' public_key_hex = '02a50eb66887d03fe186b608f477d99bc7631c56e64bb3af7dc97e71b917c5b364' msghash1_hex = '01b125d18422cdfa7b153f5bcf5b01927cf59791d1d9810009c70cd37b14f4e6' msghash2_hex = '...