The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
1answer
316 views

What's the easiest way to hook into multiple BTC exchanges?

If you want to compare prices of BTC across multiple exchanges, is there a central mechanism or place to do so? I have been unable to find such a thing from my research
0
votes
1answer
341 views

cannotsend error using python bitcoin library to send bitcoin on testnet

When I run the script from bitcoin.core import COIN, b2lx import bitcoin.wallet import bitcoin.rpc rpc = bitcoin.rpc.Proxy() addr = bitcoin.wallet.CBitcoinAddress('mfrMeTKojpEXFXpcQiRr7zA3Bff4UBgZTx'...
0
votes
1answer
172 views

Troubleshooting pybitcointools transaction signing/verification

I'm having several problems getting tests to successfully run under my fork (or vbuterin's pybitcointools, and I'm hoping someone with a combined Python / Bitcoin knowledge can provide some insight. ...
0
votes
2answers
375 views

Regtest: address is still at zero after sending some bitcoins

I'm trying to send some btc to an address in Regtest mode: the address where I want to send is: mjeoXvBnD4DtZumeSJEjNJfLb4RrhpbH1H $ bitcoin-cli -regtest -rpcuser=bitcoinrpc -rpcpassword=Alice -...
0
votes
2answers
2k views

How to use bitcoin-python

I'm trying to create a bitcoin address with the bitcoin-python library. I tried this code: import bitcoinrpc bitcoinrpc.connect_to_local().getnewaddress() But I got this error: error: [Errno 10061]...
0
votes
1answer
499 views

Ubuntu 14 LTS with SX tools installation issues

I'm trying to install the SX (http://SX.dyne.org) tools using Ubuntu 14 LTS following the installation instructions (http://sx.dyne.org/introduction.html#installation). I use wget to download the SH ...
0
votes
0answers
18 views

How to create a Bitcoin Transaction With Protocoin

Please how do I create a btc transaction and broadcast it with protocoin library? I want to create a transaction that will relay to the node without validating inputs and outputs. Of course I know the ...
0
votes
1answer
29 views

What is the program in Python that print information about the current block?

What is the program in Python that print information about the current block the world try to mine (I mean Version, Previous Block, Merkle Root, Time, Bits) plus how many zeros we are looking for for ...
0
votes
0answers
11 views

Resource pool and bitcoin rpc (python)

Is it safe to use a resource pool (e.g. https://github.com/Bogdanp/resource_pool/blob/master/resource_pool.py) for: rpc_connection = AuthServiceProxy("http://%s:%s@%s:%s"%(user, password...)) What ...
0
votes
1answer
42 views

Strange re-connection problem with python-bitcoinrpc

I am using https://github.com/jgarzik/python-bitcoinrpc to access the bitcoin core rpc. I have found a very strange re-connection problem. from bitcoinrpc.authproxy import AuthServiceProxy, ...
0
votes
0answers
84 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
2answers
94 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
20 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
38 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
31 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
74 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
56 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
67 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
68 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
121 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
76 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
39 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
91 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
61 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
0answers
162 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
82 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
141 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
1k 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
97 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
51 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
1answer
299 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
249 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
276 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
34 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
120 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
191 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
164 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
276 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
1answer
405 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
696 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
172 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
370 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 ...
0
votes
5answers
1k 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?
-1
votes
1answer
966 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 = '...