<p>How can I create an op_return TX with python bitcoinlib?</p>
<p>The transaction should include the OP_RETURN HEX-Data and an address where I send my change money</p>

CC BY-SA 4.0
2021-10-31T03:22:50.040Z
@Prayank Python-bitcoinlib is a library that natively implements the Bitcoin protocol; it is not an RPC library for communicating with Bitcoin Core.
Pieter Wuille
CC BY-SA 4.0
2021-11-01T18:26:10.877Z
Have you tried working with the examples from the github documentation? https://github.com/petertodd/python-bitcoinlib/blob/0ea83c4fd499c63823754627c69ebdd79dc0d62c/examples/timestamp-op-ret.py#L59
m1xolyd1an
CC BY-SA 4.0
2023-03-25T15:02:51.890Z
Any update about some new code for this? Above link is from 2015
JuliSmz
<python><op-return><python-bitcoinlib>
Creating an OP_Return TX with Python bitcoinlib
Captain Evening
# Creating an OP_Return TX with Python bitcoinlib

(Asked by: username_0 on 2021-10-30)

How can I create an op\_return TX with python bitcoinlib?

The transaction should include the OP\_RETURN HEX-Data and an address where I send my change money

**Tags:** python, op-return, python-bitcoinlib

> **Comments:**
> **username_1**: @Prayank Python-bitcoinlib is a library that natively implements the Bitcoin protocol; it is not an RPC library for communicating with Bitcoin Core.  
> **username_2**: Have you tried working with the examples from the github documentation? https://github.com/petertodd/python-bitcoinlib/blob/0ea83c4fd499c63823754627c69ebdd79dc0d62c/examples/timestamp-op-ret.py#L59  
> **username_3**: Any update about some new code for this? Above link is from 2015  

---

## 0 answers

