I’m trying to help a few friends of mine develop a crypto newsletter that does ERC1155<>ERC20 swaps as payment using a Django backend, and I’d like them to use 0x.
In this newsletter app that they are building, interested readers can purchase a “membership” in the form of a ERC1155 for an ERC20 or ETH. I’m trying to help them do this with the latest 0x NFT protocol, however they use Python/Django on the backend to sign 0x orders, and I couldn’t find any up to date Python library that supports these new order types.
Is there any library for Python to create such orders? Assuming the answer is no (I checked and couldn’t find it), what other languages allow me to create 0x V4 orders easily with a few LOCs?
Hey @PirosB3 yes I’m afraid there’s no Python library with NFT feature toolkits.
Trader.xyz just launched a swap SDK that could be helpful here.
It comes with nftSwapSdk.buildOrder and nftSwapSdk.signOrder
Also it comes with its own hosted orderbook if needed.
Thank you! I also checked Trader website, and I could not find any Python library - maybe I missed it? my friends are Python and Go backend programmers (from Italy! ) and I’d definitely like to steer them in the direction of 0x. I also think they shouldn’t need to change their stack to use 0x, because they have other options that don’t require JS. For now, I’m just helping them on the side by generating snippets of code for them that produce ABI, but I was looking for something more official
hi @PirosB3 !
there are some conversations about python in the 0x discord
not specifically wrt nft support, but might provide some usable information that can help for your situation
if you’re not in the server already, please join and search on the term ‘python’
I can see a few people in the Stack Overflow having similar problems to me, but without a clear solution. How have other non-JS developers in the space solved this problem?
Unless someone has a better solution here, I’ll be helping my friends by creating a buildOrder and signOrder equivalent in Python. Should be fine.
I just wanted to quickly echo the need for generic libraries for 0X as @PirosB3 mentioned. What 0X is doing is amazing, but these sorts of limitations are really painful for many other developers out there. I’ll keep a watchful eye on this thread to see how this hopefully progresses.
It goes without saying that if anyone wants to step in to develop some python tooling, we should try and reward them with a grant from the community treasury of the 0x grants program! @PirosB3 just making names here… or maybe you can write the high level requirements so someone else could pick it up!
That’s pretty exciting, I have a tool that I made to help my Python friends that may be useful to allow anyone to trade with anyone. I started building it for them as a little tool, but I honestly feel very opinionated in building it for anyone in the world to use. This tool essentially reduces the barrier to entry for anyone who wants to build a market making bot, or retail trading bot. The developer must only know how to make HTTP requests, sign Ethereum transactions, and submit them on-chain.
I’ll wrap up some documentation soon, thank you for mentioning the opportunity Theo. I have limited bandwidth so I’m not sure about it commitment-wise, but maybe I can do it with my friends and let them drive the development.
With the help of the community, I’ve built an API that allows anyone (on any programming language) to create 0x orders.
This NFT Swap API is the equivalent of the 0x Swap API exclusively for NFT order creators (like market makers or NFT marketplaces). Users make one single request through our API (powered by GraphQL or REST API) and receive call-data for both the maker and taker, that can be conveniently settled on-chain - great for discovering, evaluating, and effortlessly implementing the 0x Order protocol.
The API will be released entirely as Open Source and is built on top of the popular Trader XYZ library.
I’m looking for more developers that are finding it a little difficult to create, sign, cancel, execute 0x orders. I’d love to get in touch with you and understand your problems more! Please reach out to me on Twitter or in this thread!