Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [python]

The tag has no usage guidance.

0
votes
1answer
15 views

getrawtransaction not working for 0th BTC block transaction

I am trying to insert BTC blocks and transactions in MONGODB collection from count 0 using Python3. getrawtransaction is giving output for block 1 but not for block 0. Can somebody help me why this ...
-1
votes
0answers
23 views

Insert BTC blocks and transactions in mongodb

I am trying to insert bitcoin transactions into MongoDB using python3. Below is my code : import pymongo import sys import json import time from bitcoinrpc.authproxy import AuthServiceProxy, ...
1
vote
1answer
46 views

Bitcoin RPC connection

I am trying to insert bitcoin transactions into MongoDB using python3. Below is my code : import pymongo import sys import json import time from bitcoinrpc.authproxy import AuthServiceProxy, ...
1
vote
1answer
31 views

Mutlisig tansactions with trezor with multiple inputs and outputs not able to broadcast

I am trying to do a multisig here is my final hex ...
1
vote
1answer
28 views

Why is Target < Blockhash?

I am currently trying to validate a blocks hash against its target in python3: This is a block in the Blockcypher testnet, and I am using this formula from the Bitcoin Wiki. block_hash = '...
0
votes
1answer
53 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 : ...
2
votes
1answer
90 views

Python: How generate bitcoin addresses using electrum library

What am I doing wrong here? I'm trying to generate bitcoin addresses from the seed but they do not match with ones from electrum application. Did I miss something? And I also have trouble with ...
0
votes
1answer
39 views

Struggling to successfully broadcast a p2pkh transaction

I've been experimenting with sending bitcoin transactions with python for the past week. I successfully was able to send p2wpkh->ALL address types, p2sh-p2wpkh->ALL address types. What I am ...
2
votes
0answers
51 views

Python library for Multisignature HD wallets

Is there is any python library is available that allow creation of Multisignature HD wallets ?
0
votes
1answer
354 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
208 views

bitcoin rpc api createrawtransaction with python returns -3: Expected type array, got object

experimenting with JSON RPC API using bitcoinrpc.authproxy for python. so far it works in all instances accept when i try to create a raw transaction. somewhere along the way im passing parameters in ...
0
votes
1answer
37 views

What could this Python Assertion error mean?

When I run the code below, sending a BTC transaction to the blockchain (using blockcypher api) I get an Assertion Error. I am not sure what an Assertion error means. The code: Btw the address had ...
0
votes
1answer
31 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 ...
1
vote
0answers
21 views

Why does this return an ssl error when using pybitcointools?

Really confused as to why this error persists. I have upgraded pip ( I believe) And have installed pybitcointools...
0
votes
1answer
36 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
185 views

How to fetch the latest unspent transaction by an address using bitcoind?

I want to build a server, which provide following APIs: 1.Get balance by address. 2.Get latest unspent transaction. 3.broadcast the transaction. First by first, I know I can do above stuffes by ...
1
vote
2answers
49 views

Why are my Signature Scripts Different from my professors?

bob_addr = "1NWzVg38ggPoVGAG2VWt6ktdWMaV6S1pJk"#"1FMb8Jnn1jSh7yjDFfonC8xCCH3ittoEzB" bob_hashed_pubkey = base58check.b58decode(bob_addr)[1:] bob2_hashed_pubkey = b'\xec\x06\xb2\xbf\x18\xc8\x97\x06\...
0
votes
1answer
58 views

bitcoinrpc.authproxy.JSONRPCException: -26: 16: bad-txns-in-belowout

I am getting this exception, when I am using sendrawtransaction. And all I want to do is translate this docs to Python code, and I have searched for a while but both Can anyone shed any light on this ...
0
votes
0answers
16 views

Pycoin Transaction List sorted by date

I am using Pycoin and Python 3 and would like to retrieve Bitcoin transaction list sorted by date with Private or Public key. Code wise have not gone as far as been able to find anything in their ...
1
vote
1answer
49 views

Is it possible to deploy a python script on Ethereum Virtual Network or NEO?

Is it possible to deploy a python script as a dApp on the Ethereum or NEO virtual network?
1
vote
2answers
651 views

How to generate public and private key pairs from the 12 seed words in python

I basically followed the instructions here How to generate mycelium addresses from the 12 words in python So my code is similar: from bip32utils import BIP32Key from bip32utils import BIP32_HARDEN ...
0
votes
0answers
66 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 ...
1
vote
1answer
178 views

How to recover wallet by importing private key on testnet?

I want to test the functionality of wallet recovery via private key import on the testnet. Preferably thru an online service. I only want to test the functionality so that I can verify that it's ...
2
votes
1answer
60 views

What is “Rate” on crypto exchange?

I use bittrex api and python for trading. I am interesting about lowest Ask and highest Bid prices on the pair. In this example: I want to sell XRP on 0.00008215 price and on 0.00008245 What ...
0
votes
0answers
38 views

Can't get response on “tx” message

I'm trying to write a code to send bitcoin transaction. I've found an example of python code. With few modifications it's here import time import socket import struct import random import hashlib ...
0
votes
1answer
166 views

python bitcoin public key to address code error

import hashlib b58chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' def hex_open_key_to_hex_hesh160(hex_open_key): h160 = hashlib.new('ripemd160') h160.update(hashlib.sha256(('04'+...
1
vote
1answer
209 views

Altcoin - genesis block - TypeError: __init__() takes exactly 2 arguments (3 given)

I'm trying to use the genesis script from innova to generate a genesis block of Xevan_hash https://github.com/innovacoin/GenesisH0/blob/master/genesis.py I'm using these parameters: python genesis....
1
vote
1answer
828 views

python-bitcoinlib | Create Private Keys, Public Keys and Addresses - How to Do It?

I'm trying to use the python-bitcoinlib library but its docs aren't entirely clear to me. I'm a programmer but quite new to Python, and not very versed in the Bitcoin protocol. What's the process, ...
1
vote
1answer
123 views

bitcoin chainstate database parsing in python giving wrong value

I am trying to decode chainstate db for a specific out index for a transaction in python just for learning. Transaction ID: 4d4a4c6ca4f3c91e69563199943336d3279fad71c9e8d9c1708ef9dc6ac16000 out index = ...
0
votes
1answer
466 views

ModuleNotFoundError: No module named 'bitcoin'

Here's my code: from bitcoin.rpc import RawProxy # Create a connection to local Bitcoin Core node p = RawProxy() # Run the getinfo command, store the resulting data in info info = p.getinfo() # ...
2
votes
1answer
91 views

Extract lightning network funding transactions with python bitcoin blockchain parser lib

My ultimate goal is to parse funding transactions (as well as channel closes in a later step) from the blockchain. In order to do so I wanted to start with a funding transaction and disect it. ...
0
votes
1answer
176 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 ...
2
votes
1answer
210 views

How does bitcoin functional test framework work?

Could someone explain how and where in the code the bitcoin test framework calls map to C++ bitcoin core code or RPC calls such that regression suite tests the bitcoin core functionality? Background ...
0
votes
1answer
155 views

need advice for Python interaction with bitcoin-core wallet

I've read about a few Python libraries that performs JSON-RPC calls to bitcoind. However, not many are actively developed/maintained, nor are they widely used in production environment. Since bitcoind ...
0
votes
0answers
39 views

Trades in bitstamp

How does one obtain the trade executions in bitstamp ? Is it via the live trades stream comparing order_ids in the stream with our own order_id, or poll one of the http apis periodically. If so, which ...
0
votes
1answer
168 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
198 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
0answers
236 views

PYWallet Help? Trying To Recover 17 LiteCoin. Getting An Error. Spent WEEKS on this b4 asking :-)

So I made a mistake when I was new to Crypto. I used a Desktop Core wallet to store litecoin (17 of them). I somehow removed the program and deleted the wallet.dat file. The second I noticed I took ...
0
votes
1answer
30 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
1answer
289 views

How to set up a private chain/local testnet : reverse engineering the blockchain code

Long story short, I want to set up a private chain/a testnet blockchain that can run locally just to fiddle and play with it just to learn how it works. So I have a general understanding of how things ...
1
vote
1answer
118 views

Project on modelling Bitcoin blockchain data

I am doing a thesis project on modelling Bitcoin blockchain data, but atm I am having trouble getting data from the Bitcoin blockchain into a format that is easy to deal with in e.g. Python. I have ...
0
votes
1answer
243 views

Can I, and how do I query the Bitcoin Core wallet to give me a list of all transactions for any specified address?

I've read some conflicting things on this. Given any address, what would be the json command and or how would I import into python, such a query to my bitcoin core wallet for an array of all the tx ...
0
votes
1answer
87 views

Wrong testnet address generation [python]

I'm trying to generate a testnet address without success.Main net address is working fine. Here is my code. The generated testnet address from this code is :CNFNz61dzQ2NQ9RCnjJFrm2de7nLbbT9xSv which ...
1
vote
1answer
400 views

Can I connect to Litecoin, Dash, BitcoinCash, Doge, etc. RPC with Bitcoin RPC client?

I want to set up a few nodes for different Bitcoin-derived cryptocurrencies and regularly query them for data via the JSON-RPC API. The thing is: I can't find much information on any other RPC API ...
0
votes
0answers
287 views

How to get public key from mnemonic 12 words or seed hex?

I have 12 words or seed hex and i need get public key, how to i can get this in python or nodejs?
0
votes
0answers
311 views

Creating coinbase from getblocktemplate response for bitcoin mining

When I request GetBlockTemplate, response does not have coinbasetx as mentioned in official document. Which I learned pool software has to generate if not present. So I tried to learn the logic from ...
0
votes
0answers
190 views

Where to find Python API that streams live trades from multiple exchanges?

I'm looking for a Python API that streams live trade data from many bitcoin exchanges. That is, not orderbook data or mid prices, just a pure trades stream. The data format ideally would be something ...
1
vote
1answer
297 views

Is it possible to spend bitcoins from private key 0?

In [1]: from bitcoin import * In [2]: privtoaddr(0) Out[2]: '16QaFeudRUt8NYy2yzjm3BMvG4xBbAsBFM' On blockchain.info, there is 0.01 BTC unspent in this address. Is it possible to spend the bitcoins? ...
1
vote
0answers
338 views

Having trouble using GDAX API to place market buy order

Here is the documentation I'm following and to place a buy order, the syntax follows the following format: # Buy 0.01 BTC @ 100 USD auth_client.buy(price='100.00', #USD size='0.01', #...
0
votes
0answers
112 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 ...