Skip to main content

Get crypto coin informations & calculate the custom or constant indicators. (WITH BINANCE API)

Project description

binance-ema

Exchange indicators & Basic functions for Binance API.

  • 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 !

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.

  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;

  • 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.

          You can use this libary now but you need original binance-connector libary for connect to your API.
    

Binance Connector

tests

# example connect to API

from binance.spot import Spot
from binancema.indicators import indicator
from binancema.coininfo import *

KEY         = "XXXXXXXXXXXXXXXXXXXXXX"
SECRET      = "XXXXXXXXXXXXXXXXXXXXXX"

Client = Spot(KEY,SECRET)  # connect binance api
functions = indicator(Client) #connect the binance-ema libary

# default binance-connector
print(f"Server Time: {Client.time()['serverTime']}")

# use libary binancema
print(f"Your USDT ($) Balance:                  {balance_usdt(Client)} $")
print(f"OXT Quantity (Free):                    {quantity_free(Client,'OXT')} OXT")
print(f"OXT Quantity (locked):                  {quantity_locked(Client,'OXT')} OXT")
print(f"OXT Quantity (all):                     {quantity_all(Client,'OXT')} OXT")
print(f"OXT Balance ($) (free):                 {balance_free(Client,'OXT')} $")
print(f"OXT Balance ($) (locked):               {balance_locked(Client,'OXT')} $")
print(f"OXT Balance ($) (all):                  {balance_all(Client,'OXT')} $")
print(f"OXT/USDT Price (now):                   {price(Client,'OXTUSDT')}")
print(f"OXT/USDT Price (before 24hr):           {price_before_24hr(Client,'OXTUSDT')}")
print(f"OXT/USDT Price Change Value (24hr):     {price_change24(Client,'OXTUSDT')}")
print(f"OXT/USDT Price Change (%) (24hr):       % {price_change_percent24(Client,'OXTUSDT')}") 
print(f"OXT/USDT Price High Value (24hr):       {price_high24(Client,'OXTUSDT')}") 
print(f"OXT/USDT Price Low Value (24hr):        {price_low24(Client,'OXTUSDT')}")

License

MIT License | Copyright (c) 2022 Emre MENTEŞE

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

binance-ema-0.1.0.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file binance-ema-0.1.0.tar.gz.

File metadata

  • Download URL: binance-ema-0.1.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.1

File hashes

Hashes for binance-ema-0.1.0.tar.gz
Algorithm Hash digest
SHA256 47284d4bdc2baaac539739c2120d31ed1da13c072946743faeb449b067b8d930
MD5 2db90ff1d2fea0733dd91f28442141f2
BLAKE2b-256 4a53d7684a13c9370fb59380f5a0c4d6e78c6ba039e24f0ac0c9bb9e06a66b9e

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