traderman


Nametraderman JSON
Version 0.0.2 PyPI version JSON
download
home_pageNone
SummaryPython SDK to build, train, and deploy trading systems
upload_time2024-08-04 04:04:10
maintainerNone
docs_urlNone
authoriteralabs
requires_python>=3.10
licenseNone
keywords python3 trading sdk defi hft
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Traderman
Python SDK to build, train, stress-test, deploy and monitor trading strategies

[![version](https://badge.fury.io/py/traderman.svg)](https://pypi.org/project/traderman)
[![stars](https://img.shields.io/github/stars/iteralabs/traderman)](https://github.com/iteralabs/traderman/stargazers)
[![issues](https://img.shields.io/github/issues/iteralabs/traderman)](https://github.com/iteralabs/traderman/issues)
[![forks](https://img.shields.io/github/forks/iteralabs/traderman)](https://github.com/iteralabs/traderman/network/members)
[![python](https://img.shields.io/badge/-Python_3.11-blue?logo=python&logoColor=white)](https://www.python.org/downloads/release/python-3110/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/iteralabs/tradernab/blob/master/.pre-commit-config.yaml)
[![License](https://img.shields.io/github/license/iteralabs/traderman)](https://github.com/iteralabs/traderman/blob/master/LICENSE)
<br>


## Install

Using `pip`

```
pip install traderman
```

Cloning the repository

```
git clone https://github.com/iteralabs/traderman.git
```

<br>

## Use

### Credentials

One alternative way of storing the Tokens is to place them in a .py inside a local virtual environment folder that is ignored (indicated in .gitignore) and run such
file once every working session that you are developing locally.


```python

import os
import toml
import numpy as np

from traderman.forecasters.benchmarks import Randomizer
from traderman.connectors import binance as BinanceSpot

BINANCE_API_KEY = os.environ["BINANCE_API_KEY"]
BINANCE_SECRET_KEY = os.environ["BINANCE_SECRET_KEY"]

# --- Get params from Config.toml

with open(cwd_path + "/examples/basic_config.toml", "r") as file:
    config_data = toml.load(file)

SET_SEED = config_data["model"]["signal"]["model_params"]["seed"]
SET_CLASSES = config_data["model"]["signal"]["model_params"]["classes"]

# --- Use the randomizer as model benchmark

ModelSignal = Randomizer(seed=SET_SEED, model_type="classifier")
forecasted_signal = ModelSignal.predict(classes=SET_CLASSES)

ModelRisk = Randomizer(seed=SET_SEED, model_type="regressor")
forecasted_volume = np.round(ModelRisk.predict(lower=0.0001, upper=0.0009), 4)

# --- Specify parameters for trades

trade_params = {
    "symbol": "BTCUSDT",
    "type": "MARKET",
    "side": forecasted_signal,
    "quantity": forecasted_volume[0],
}

# --- Place an Order

n_order = BinanceSpot.new_order(
    in_params=trade_params,
    api_key=BINANCE_API_KEY,
    secret_key=BINANCE_SECRET_KEY
)

```

<br>

## Contributors

Thanks to everyone that have contributed and made a difference.

<a href="https://github.com/iteralabs/traderman/graphs/contributors">
  <img class="dark-light" src="https://contrib.rocks/image?repo=iteralabs/traderman&anon=0&columns=20&max=100&r=true" />
</a>

Check out the following ways to contribute:

- Check the [Contributing guide](https://github.com/IteraLabs/traderman/blob/main/CONTRIBUTING.md) and the [Open Projects](https://github.com/IteraLabs/traderman/projects?query=is%3Aopen)

## Maintainers

- [IFFranciscoME](https://github.com/IFFranciscoME)

## References

- [binance-docs/spot](https://binance-docs.github.io/apidocs/spot/en/#introduction)

## License

```
MIT License

Copyright (c) 2024 IteraLabs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "traderman",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "\"J.Francisco Munoz\" <if.francisco.me@gmail.com>",
    "keywords": "python3, trading, sdk, defi, hft",
    "author": "iteralabs",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/65/51/994b0bad7fe9dee65cbd02c8c9ac36d72a80b863b1f45964be53979eb1cb/traderman-0.0.2.tar.gz",
    "platform": null,
    "description": "# Traderman\nPython SDK to build, train, stress-test, deploy and monitor trading strategies\n\n[![version](https://badge.fury.io/py/traderman.svg)](https://pypi.org/project/traderman)\n[![stars](https://img.shields.io/github/stars/iteralabs/traderman)](https://github.com/iteralabs/traderman/stargazers)\n[![issues](https://img.shields.io/github/issues/iteralabs/traderman)](https://github.com/iteralabs/traderman/issues)\n[![forks](https://img.shields.io/github/forks/iteralabs/traderman)](https://github.com/iteralabs/traderman/network/members)\n[![python](https://img.shields.io/badge/-Python_3.11-blue?logo=python&logoColor=white)](https://www.python.org/downloads/release/python-3110/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/iteralabs/tradernab/blob/master/.pre-commit-config.yaml)\n[![License](https://img.shields.io/github/license/iteralabs/traderman)](https://github.com/iteralabs/traderman/blob/master/LICENSE)\n<br>\n\n\n## Install\n\nUsing `pip`\n\n```\npip install traderman\n```\n\nCloning the repository\n\n```\ngit clone https://github.com/iteralabs/traderman.git\n```\n\n<br>\n\n## Use\n\n### Credentials\n\nOne alternative way of storing the Tokens is to place them in a .py inside a local virtual environment folder that is ignored (indicated in .gitignore) and run such\nfile once every working session that you are developing locally.\n\n\n```python\n\nimport os\nimport toml\nimport numpy as np\n\nfrom traderman.forecasters.benchmarks import Randomizer\nfrom traderman.connectors import binance as BinanceSpot\n\nBINANCE_API_KEY = os.environ[\"BINANCE_API_KEY\"]\nBINANCE_SECRET_KEY = os.environ[\"BINANCE_SECRET_KEY\"]\n\n# --- Get params from Config.toml\n\nwith open(cwd_path + \"/examples/basic_config.toml\", \"r\") as file:\n    config_data = toml.load(file)\n\nSET_SEED = config_data[\"model\"][\"signal\"][\"model_params\"][\"seed\"]\nSET_CLASSES = config_data[\"model\"][\"signal\"][\"model_params\"][\"classes\"]\n\n# --- Use the randomizer as model benchmark\n\nModelSignal = Randomizer(seed=SET_SEED, model_type=\"classifier\")\nforecasted_signal = ModelSignal.predict(classes=SET_CLASSES)\n\nModelRisk = Randomizer(seed=SET_SEED, model_type=\"regressor\")\nforecasted_volume = np.round(ModelRisk.predict(lower=0.0001, upper=0.0009), 4)\n\n# --- Specify parameters for trades\n\ntrade_params = {\n    \"symbol\": \"BTCUSDT\",\n    \"type\": \"MARKET\",\n    \"side\": forecasted_signal,\n    \"quantity\": forecasted_volume[0],\n}\n\n# --- Place an Order\n\nn_order = BinanceSpot.new_order(\n    in_params=trade_params,\n    api_key=BINANCE_API_KEY,\n    secret_key=BINANCE_SECRET_KEY\n)\n\n```\n\n<br>\n\n## Contributors\n\nThanks to everyone that have contributed and made a difference.\n\n<a href=\"https://github.com/iteralabs/traderman/graphs/contributors\">\n  <img class=\"dark-light\" src=\"https://contrib.rocks/image?repo=iteralabs/traderman&anon=0&columns=20&max=100&r=true\" />\n</a>\n\nCheck out the following ways to contribute:\n\n- Check the [Contributing guide](https://github.com/IteraLabs/traderman/blob/main/CONTRIBUTING.md) and the [Open Projects](https://github.com/IteraLabs/traderman/projects?query=is%3Aopen)\n\n## Maintainers\n\n- [IFFranciscoME](https://github.com/IFFranciscoME)\n\n## References\n\n- [binance-docs/spot](https://binance-docs.github.io/apidocs/spot/en/#introduction)\n\n## License\n\n```\nMIT License\n\nCopyright (c) 2024 IteraLabs\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python SDK to build, train, and deploy trading systems",
    "version": "0.0.2",
    "project_urls": {
        "Homepage": "https://github.com/iteralabs/traderman",
        "Issues": "https://github.com/iteralabs/traderman/issues"
    },
    "split_keywords": [
        "python3",
        " trading",
        " sdk",
        " defi",
        " hft"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6551994b0bad7fe9dee65cbd02c8c9ac36d72a80b863b1f45964be53979eb1cb",
                "md5": "fbbfc1b8ecf80586935b7a92f2256004",
                "sha256": "c54e9f478a1272804d97102f9c704c8618dd3116b3dea4753631e892200cfee1"
            },
            "downloads": -1,
            "filename": "traderman-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "fbbfc1b8ecf80586935b7a92f2256004",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 10786,
            "upload_time": "2024-08-04T04:04:10",
            "upload_time_iso_8601": "2024-08-04T04:04:10.598680Z",
            "url": "https://files.pythonhosted.org/packages/65/51/994b0bad7fe9dee65cbd02c8c9ac36d72a80b863b1f45964be53979eb1cb/traderman-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-04 04:04:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "iteralabs",
    "github_project": "traderman",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "traderman"
}
        
Elapsed time: 0.29581s