Name | binance-ema JSON |
Version |
1.0.1
JSON |
| download |
home_page | https://github.com/emrementese/binance-ema |
Summary | Get crypto coin informations & calculate the custom or constant indicators. (WITH BINANCE API) |
upload_time | 2025-01-21 12:01:45 |
maintainer | Emre MENTEŞE |
docs_url | None |
author | Emre MENTEŞE |
requires_python | >=3.10 |
license | MIT License
Copyright (c) 2021 Emre MENTEŞE
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.
|
keywords |
binance
public api
ema
macd
trade
crypto
coin
indicators
btc
eth
usdt
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# binance-ema
Simplified & Professional Binance API.
- Get crypto coin information in an easy way.
- Get account information (balance,quantity etc.)
- Buy / Sell / Limit / Stop Loss --> Orders any way.
- Calculate SMA, EMA, MACD etc. functions (custom indicators)
- https://pypi.org/project/binance-ema/
pip install binance-ema
# Nots
- This python library has been written to calculate SMA, EMA, MACD etc. functions with Binance API.
- Complex functions in the Binance API, has been facilitate for developers.
- After installing the libary, don't forget reading the funcions content !
- We are not responsible the your code mistake
# Usage
Firstly, for the use this library you have to create an API via Binance. This documentation will help you for create an safe API.
1) Visit the Binance web site and log in: https://www.binance.com/
2) After, click to your profile photo. Select api management from the menu that appears.
![](https://github.com/emrementese/binance-ema/blob/main/examples/images/menu.png)
3) Third, you can create an API now. After the API creatation, move the API List and click the edit button your API.
- After the API creatation, save your "API KEY" & "SECRET KEY".
- Page looks like;
![](https://github.com/emrementese/binance-ema/blob/main/examples/images/binance-api-settings.png)
* Enable Reading was default active. This settings give you authority for reading the coins information. (Red circle in the image)
* Enable Spot-Marign Trading was default passive. !! IF YOU DON'T SPOT-MARGİN TRADİNG, YOU MUST DON'T ACTİVE THİS SETTİNG FOR YOUR SECURİTY. (Green circle in the image)
* Trusted IP default null. You must add your ip adress here for your security. Other ip adress cannot read coins information or trade.
> Binance Connector
- This project uses the official binance documentation.
- Github Referance for Binance Connector -->https://github.com/binance/binance-connector-python
- Original Binance Connector Document --> https://binance-docs.github.io/apidocs/spot/en/#introduction
- Referance 3 --> https://binance-connector.readthedocs.io/en/stable/
- [Binance Spot Trade Rules](https://www.binance.com/en/trade-rule)
- You can download and start using and developing the library now.
- Don't forget to sen message me for any mistake. Don't forget give star. I waiting for your pull requests (Forks) :)
## Example connect to API & Info Functions
```py
# Example connect to API & Info Functions
from binance.spot import Spot
from binancema.coininfo import *
KEY = "XXXXXXXXXXXXXXXXXXXXXX"
SECRET = "XXXXXXXXXXXXXXXXXXXXXX"
Client = Spot(KEY,SECRET) # connect binance api
symbol = "OXT"
market = "OXTUSDT"
# use libary binancema functions
print(f"Your USDT ($) Balance: {balance_usdt(Client)} $\n") #float
print(f"OXT Quantity (Free): {quantity_free(Client,symbol)} OXT\n") #float
print(f"OXT Quantity (locked): {quantity_locked(Client,symbol)} OXT\n") #float
print(f"OXT Quantity (all): {quantity_all(Client,symbol)} OXT\n") #float
print(f"OXT Balance ($) (free): {balance_free(Client,symbol)} $\n") #float
print(f"OXT Balance ($) (locked): {balance_locked(Client,symbol)} $\n") #float
print(f"OXT Balance ($) (all): {balance_all(Client,symbol)} $\n") #float
print(f"OXT/USDT Price (now): {price(Client,market)}\n") #float
print(f"OXT/USDT Price (before 24hr): {price_before_24hr(Client,market)}\n") #float
print(f"OXT/USDT Price Change Value (24hr): {price_change24(Client,market)}\n") #float
print(f"OXT/USDT Price Change (%) (24hr): % {price_change_percent24(Client,market)}\n") #float
print(f"OXT/USDT Price High Value (24hr): {price_high24(Client,market)}\n") #float
print(f"OXT/USDT Price Low Value (24hr): {price_low24(Client,market)}\n") #float
```
## Example Trade Functions
```py
from binance.spot import Spot
from binancema.coininfo import *
KEY = "XXXXXXXXXXXXXXXXXXXXXX"
SECRET = "XXXXXXXXXXXXXXXXXXXXXX"
Client = Spot(KEY,SECRET) # connect binance api
symbol = "OXT"
market = "OXTUSDT"
# TRADE with binance-ema
print(market_buy_with_price(Client, market,30)) # buy 30 $ BTC (market price)
print(market_buy_with_quantity(Client, market,0.01233)) # buy 0.01233 BTC (market price)
# default binance-connector functions
print(f"All Open Orders (LIMIT): {Client.get_open_orders()}\n") #list
print(f"OXT Open Orders (LIMIT): {Client.get_open_orders(market)}\n") #list
print(f"Get only 1 order:{Client.get_order(market,orderId = 55555)} \n") # dict (inpur order id gettin to get_open_orders)
```
# Contributors
<table>
<tr>
<td align="center"><a href="https://github.com/emrementese"><img src="https://avatars.githubusercontent.com/u/76906642?v=4" width="100px;" alt=""/><br /><sub><b>Emre MENTEŞE (Owner)</b></sub></a><br /></td>
<td align="center"><a href="https://github.com/ozanmutlu"><img src="https://avatars.githubusercontent.com/u/62659953?v=4" width="100px;" alt=""/><br /><sub><b>Ozan Mutlu</b></sub></a><br /></td>
</tr>
</table>
# License
MIT License | Copyright (c) 2022 Emre MENTEŞE
Raw data
{
"_id": null,
"home_page": "https://github.com/emrementese/binance-ema",
"name": "binance-ema",
"maintainer": "Emre MENTE\u015eE",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "emrementese@gmail.com",
"keywords": "Binance, Public API, EMA, MACD, TRADE, Crypto, Coin, Indicators, BTC, ETH, USDT",
"author": "Emre MENTE\u015eE",
"author_email": "emrementese@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/d3/b8/f2c24bfdf9aaf7d5dd6e6731a3b86a8b11bbee943a0c235a57046796f98c/binance_ema-1.0.1.tar.gz",
"platform": null,
"description": "# binance-ema\nSimplified & Professional Binance API.\n \n- Get crypto coin information in an easy way.\n- Get account information (balance,quantity etc.)\n- Buy / Sell / Limit / Stop Loss --> Orders any way.\n- Calculate SMA, EMA, MACD etc. functions (custom indicators)\n- https://pypi.org/project/binance-ema/\n \n pip install binance-ema\n \n# Nots\n- This python library has been written to calculate SMA, EMA, MACD etc. functions with Binance API.\n- Complex functions in the Binance API, has been facilitate for developers.\n- After installing the libary, don't forget reading the funcions content !\n- We are not responsible the your code mistake\n\n# Usage\nFirstly, for the use this library you have to create an API via Binance. This documentation will help you for create an safe API.\n\n1) Visit the Binance web site and log in: https://www.binance.com/\n \n2) After, click to your profile photo. Select api management from the menu that appears.\n\n ![](https://github.com/emrementese/binance-ema/blob/main/examples/images/menu.png)\n\n\n3) Third, you can create an API now. After the API creatation, move the API List and click the edit button your API. \n\n- After the API creatation, save your \"API KEY\" & \"SECRET KEY\".\n- Page looks like;\n\n ![](https://github.com/emrementese/binance-ema/blob/main/examples/images/binance-api-settings.png)\n \n* Enable Reading was default active. This settings give you authority for reading the coins information. (Red circle in the image)\n* Enable Spot-Marign Trading was default passive. !! IF YOU DON'T SPOT-MARG\u0130N TRAD\u0130NG, YOU MUST DON'T ACT\u0130VE TH\u0130S SETT\u0130NG FOR YOUR SECUR\u0130TY. (Green circle in the image)\n* Trusted IP default null. You must add your ip adress here for your security. Other ip adress cannot read coins information or trade.\n \n> Binance Connector\n- This project uses the official binance documentation.\n- Github Referance for Binance Connector -->https://github.com/binance/binance-connector-python\n- Original Binance Connector Document --> https://binance-docs.github.io/apidocs/spot/en/#introduction\n- Referance 3 --> https://binance-connector.readthedocs.io/en/stable/\n- [Binance Spot Trade Rules](https://www.binance.com/en/trade-rule)\n \n- You can download and start using and developing the library now.\n- Don't forget to sen message me for any mistake. Don't forget give star. I waiting for your pull requests (Forks) :)\n\n## Example connect to API & Info Functions\n```py\n\n# Example connect to API & Info Functions\n\nfrom binance.spot import Spot\nfrom binancema.coininfo import *\n\nKEY = \"XXXXXXXXXXXXXXXXXXXXXX\"\nSECRET = \"XXXXXXXXXXXXXXXXXXXXXX\"\n\nClient = Spot(KEY,SECRET) # connect binance api\n\nsymbol = \"OXT\"\nmarket = \"OXTUSDT\"\n\n#\u00a0use libary binancema functions\nprint(f\"Your USDT ($) Balance: {balance_usdt(Client)} $\\n\") #float\n\nprint(f\"OXT Quantity (Free): {quantity_free(Client,symbol)} OXT\\n\") #float\n\nprint(f\"OXT Quantity (locked): {quantity_locked(Client,symbol)} OXT\\n\") #float\n\nprint(f\"OXT Quantity (all): {quantity_all(Client,symbol)} OXT\\n\") #float\n\nprint(f\"OXT Balance ($) (free): {balance_free(Client,symbol)} $\\n\") #float\n\nprint(f\"OXT Balance ($) (locked): {balance_locked(Client,symbol)} $\\n\") #float\n\nprint(f\"OXT Balance ($) (all): {balance_all(Client,symbol)} $\\n\") #float\n\nprint(f\"OXT/USDT Price (now): {price(Client,market)}\\n\") #float\n\nprint(f\"OXT/USDT Price (before 24hr): {price_before_24hr(Client,market)}\\n\") #float\n\nprint(f\"OXT/USDT Price Change Value (24hr): {price_change24(Client,market)}\\n\") #float \n\nprint(f\"OXT/USDT Price Change (%) (24hr): % {price_change_percent24(Client,market)}\\n\") #float\n\nprint(f\"OXT/USDT Price High Value (24hr): {price_high24(Client,market)}\\n\") #float\n\nprint(f\"OXT/USDT Price Low Value (24hr): {price_low24(Client,market)}\\n\") #float\n\n```\n## Example Trade Functions\n```py\n\nfrom binance.spot import Spot\nfrom binancema.coininfo import *\n\nKEY = \"XXXXXXXXXXXXXXXXXXXXXX\"\nSECRET = \"XXXXXXXXXXXXXXXXXXXXXX\"\n\nClient = Spot(KEY,SECRET) # connect binance api\n\nsymbol = \"OXT\"\nmarket = \"OXTUSDT\"\n\n# TRADE with binance-ema\nprint(market_buy_with_price(Client, market,30)) # buy 30 $ BTC (market price)\n\nprint(market_buy_with_quantity(Client, market,0.01233)) # buy 0.01233 BTC (market price)\n\n# default binance-connector functions\nprint(f\"All Open Orders (LIMIT): {Client.get_open_orders()}\\n\") #list\n\nprint(f\"OXT Open Orders (LIMIT): {Client.get_open_orders(market)}\\n\") #list\n\nprint(f\"Get only 1 order:{Client.get_order(market,orderId = 55555)} \\n\") # dict (inpur order id gettin to get_open_orders)\n```\n# Contributors\n\n<table>\n <tr>\n \n <td align=\"center\"><a href=\"https://github.com/emrementese\"><img src=\"https://avatars.githubusercontent.com/u/76906642?v=4\" width=\"100px;\" alt=\"\"/><br /><sub><b>Emre MENTE\u015eE (Owner)</b></sub></a><br /></td>\n\n <td align=\"center\"><a href=\"https://github.com/ozanmutlu\"><img src=\"https://avatars.githubusercontent.com/u/62659953?v=4\" width=\"100px;\" alt=\"\"/><br /><sub><b>Ozan Mutlu</b></sub></a><br /></td>\n\n </tr>\n</table>\n\n# License\n\n MIT License | Copyright (c) 2022 Emre MENTE\u015eE\n\n",
"bugtrack_url": null,
"license": "MIT License\n\nCopyright (c) 2021 Emre MENTE\u015eE\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",
"summary": "Get crypto coin informations & calculate the custom or constant indicators. (WITH BINANCE API)",
"version": "1.0.1",
"project_urls": {
"Download": "https://pypi.org/project/binance-ema/#files",
"Github": "https://github.com/emrementese",
"Homepage": "https://github.com/emrementese/binance-ema",
"Source": "https://github.com/emrementese/binance-ema"
},
"split_keywords": [
"binance",
" public api",
" ema",
" macd",
" trade",
" crypto",
" coin",
" indicators",
" btc",
" eth",
" usdt"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c0d819a7788c0d65fbe83ef949b029fa4d79f3335d9f8faf7bea95fc434ceaa2",
"md5": "cef34ba1c5f320668de4c99b8c9f8e44",
"sha256": "f6d405ca3bd64a0f8562b4affe05168df1a953b470a72a7d8359628ab991a764"
},
"downloads": -1,
"filename": "binance_ema-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cef34ba1c5f320668de4c99b8c9f8e44",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 8864,
"upload_time": "2025-01-21T12:01:43",
"upload_time_iso_8601": "2025-01-21T12:01:43.807753Z",
"url": "https://files.pythonhosted.org/packages/c0/d8/19a7788c0d65fbe83ef949b029fa4d79f3335d9f8faf7bea95fc434ceaa2/binance_ema-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d3b8f2c24bfdf9aaf7d5dd6e6731a3b86a8b11bbee943a0c235a57046796f98c",
"md5": "dd72a99603ee23fa754479f238af4914",
"sha256": "596d625177c0b6e87e74700241b7d25d4f4833a27a3113eb21d7554cf84f8b37"
},
"downloads": -1,
"filename": "binance_ema-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "dd72a99603ee23fa754479f238af4914",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 7643,
"upload_time": "2025-01-21T12:01:45",
"upload_time_iso_8601": "2025-01-21T12:01:45.490832Z",
"url": "https://files.pythonhosted.org/packages/d3/b8/f2c24bfdf9aaf7d5dd6e6731a3b86a8b11bbee943a0c235a57046796f98c/binance_ema-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-21 12:01:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "emrementese",
"github_project": "binance-ema",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "binance-ema"
}