Skip to main content

SDK to trade on osmosis DEX

Project description

osmo_trade: Making the trading experience seamless.

License

osmo_trade is an open source python SDK made from the perspective of Algorithmic Traders. It is built to trade on Osmosis DEX powered by Cosmos SDK and Tendermint as the consensus engine.

This code is free and publicly available under the Apache 2.0 open source license!

Features of osmo_trade as a package:

  • Very easy to set up any alpha based strategy on osmosis DEX.
  • Modular in nature. We can add any new feature coming on osmosis DEX like Concentrated liquidity without altering the exisiting code.
  • With a bit of customizations in regards to performance, it also can be used CEX-DEX arb which generates majority of the volume on the DEX.

Components in osmo_trade:

  • DataFeed: DataFeed is the class to get the data from the blocks mined already. We haven't configured osmo_trade to have the mempool transactions as of now.
  • TransactionBuilder: This class is used to build your transactions however you want. It'll return the txn_hash, logs, code to tell the user whether the transaction is successful.
  • Strategy: We've setup an example code to really explain what each component is doing. And that is how user just need to make a script like this which will contain the strategy logic.

Detailed documentation can be found in the examples directory where we try to explain each component of the SDK in much detail.

Installation

pip install osmo_trade 

Note:

If you want to run by customizing the SDK itself. Then git clone the repo, make your changes and do:

pip install . in the cloned directory.

Mandatory Step

  • First of all, User have to define the env file in their current working directory with the following fields:

    • MNEMONIC
    • RPC_URL
    • gRPC_host and gRPC_port
    • REST_URL

    A very good example of env file can be found here

FAQ:

What to do when user is getting the following error after installing the package for the first time:

  • when you're getting an error that says mpz object has no to_bytes() attributes
    • pip uninstall gmpy2

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

osmo_trade-0.1.1.tar.gz (15.5 kB view details)

Uploaded Source

File details

Details for the file osmo_trade-0.1.1.tar.gz.

File metadata

  • Download URL: osmo_trade-0.1.1.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for osmo_trade-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7beb91d668f5634bc11482f2aef8efa57913626b70d90dfbf0e11c27e9f547ae
MD5 01de3dfb3ecf5011959cfe925753ae3b
BLAKE2b-256 108cb6f52cdc0f991553b568db0e7b0a4d32434956b9e581c1b387cd8141d8f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page