Metadata-Version: 2.1
Name: pykomodefi
Version: 0.2.1
Summary: A wrapper for the Komodo DeFi Framework API
Home-page: https://github.com/smk762/pykomodefi
License: MIT
Keywords: dex,crypto,komodo,defi,api,trading,atomic swaps
Author: smk
Author-email: smk@komodoplatform.com
Requires-Python: >=3.8,<4.0
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: requests (>=2.31.0,<3.0.0)
Project-URL: Documentation, https://github.com/smk762/pykomodefi
Project-URL: Repository, https://github.com/smk762/pykomodefi
Description-Content-Type: text/markdown


## KomoDeFi Framework wrapper for Python

**pykomodifi** is a simple wrapper around [Komodo Platform's](https://komodoplatform.com/en/) [DeFi Framework](https://github.com/KomodoPlatform/komodo-defi-framework).


**Basic usage:**
```
   >>> import komodefi
   >>> dexapi = komodefi.KomoDeFi_API(config="path/to/MM2.json")
   >>> dexapi.version
   '1.0.7-beta_afe2e08'
```

**Simple RPC call:**
```
   >>> r = dexapi.rpc("get_enabled_coins")
   >>> r
   <Response [200]>
   >>> r.status_code
   200
   >>> r.json()
   {'result': [{'ticker': 'KMD', 'address': 'RMC1cWXngQf2117apEKoLh3x27NoG88yzd'}, {'ticker': 'LTC', 'address': 'LQyzwFtf8HU7VYQMhop5bv857uMao4jnKX'}]}
```
   
**RPC call with parameters:**
```
   >>> params = {"coin": "KMD"}
   >>> r = dexapi.rpc("my_balance", params)
   >>> r.json()
   {'coin': 'KMD', 'balance': '20', 'unspendable_balance': '0', 'address': 'RMC1cWXngQf2117apEKoLh3x27NoG88yzd'}
```

**v2 RPC call:**
```
   >>> r = dexapi.rpc("get_public_key", v2=True)
   >>> r.json()
   {'mmrpc': '2.0', 'result': {'public_key': '0371792f7a6846a0da28f3422501927ae103355c02750bc4c4d8430375329a09ac'}, 'id': None}
```

For documentation about available methods and parameters, refer to: <https://developers.komodoplatform.com/basic-docs/atomicdex/introduction-to-atomicdex.html>

