Saravanan666/pypi-org huggingface dataset:
Package: trading-backend
# trading-backend [1.2.14](https://github.com/Drakkar-Software/trading-backend/tree/master/CHANGELOG.md)
[![PyPI](https://img.shields.io/pypi/v/trading-backend.svg)](https://pypi.python.org/pypi/trading-backend/)
[![Downloads](https://pepy.tech/badge/trading-backend/month)](https://pepy.tech/project/trading-backend)
[![Github-Action-CI](https://github.com/Drakkar-Software/trading-backend/workflows/trading-backend-CI/badge.svg)](https://github.com/Drakkar-Software/trading-backend/actions)Install trading-backend from pip :` {.sourceCode .bash} $ python3-mpip installtrading-backend`
Package: trading-bot-predictor
PredictorTimeseries forecasting for stock prediction.InstallationEnviroment VariablesThe following command must be used to insert theAlpha Vantage API keyinto the environment variables in
Windows:setx ALPHAVANTAGE_API_KEY"API key"/mDockerThe Docker image can be created with the following command:docker build --build-arg alphavantage_api_key=${ALPHAVANTAGE_API_KEY} -t predictor_image .The Docker container can be started with the following command:docker run -d --name predictor_container predictor_imagePackagingThe package can be generated with the following command:python setup.py sdist bdist_wheelThe package can be installed with the following command:python setup.py install
Package: tradingcomdados
tradingcomdadosIntroductionTrading com Dados Library for quantitative financeThe library consists of a collection of methods that can be used in order to help Data Scientists, Quantitative Analysts and data professionals during the development of quantitative finance applications. One of the main objectives of the library is to provide methods to connect to Trading com dados' data provider services.Library Motivation and DescriptionTrading com dados is an Edtech that provides educational content for people who want to know quantitative finance and in order to obtain that knowlegde, we need quality data, thus this library and our API service was created to solve that.API methods-> get_data-> get_data_tickersHow to installpipinstalltradingcomdadosImporting and fetching dataimporttradingcomdadosastcd# Fetching datatcd.get_data('PETR4',start='01/01/2019')Machine LearningThis library has a few machine learning models that you can use in your daily activities.With our lib, you can easily implement machine learning models to your daily activities in the financial market.fromtradingcomdadosimportunsupervised_learningasulul.clustering_pipeline()Alternative DataYou can obtain alternative data from the Brazilian Market using this libraryfromtradingcomdadosimportalternative_dataasadad.ibov_composition()
Package: tradingeconomics
The Trading Economics Python package provides direct access to over 300,000 economic indicators, exchange rates, stock market indexes, government bond yields, and commodity prices. This package offers various request methods to query the Trading Economics databases and supports exporting data in XML, CSV, or JSON format. The API can be used to feed custom-developed applications, public websites, or off-the-shelf software.InstallationYou can install the package using pip:pip install tradingeconomicsAuthenticationTo use the Trading Economics API, you need to authenticate by providing your API key and secret:import tradingeconomics as tete.login(‘key:secret’)Sample UsageHere are some examples of how to use the Trading Economics Python package:te.getCalendarData()te.getIndicatorData(country=[‘mexico’, ‘sweden’], output_type=’df’)te.getMarketsData(marketsField=’commodities’)te.getMarketsBySymbol(symbols=’aapl:us’)te.getFinancialsData(symbol=’aapl:us’, output_type=’df’)GitHub ExamplesYou can find additional examples and usage instructions in the GitHub repository:https://github.com/tradingeconomics/tradingeconomics-python/tree/main/examplesDocumentationFor detailed documentation and API reference, please visit the Trading Economics API documentation:https://docs.tradingeconomics.com
Package: tradingfeatures
tradingfeaturesA useful tool to download market history from popular exchanges.Installationpip install tradingfeaturesorpip install git+https://github.com/realiti4/tradingfeatures.git@master --upgradeExample.get(): Returns most recent history amount you pass..get_history(): Downloads all avaliable history for that api..update(): Takes a csv file path and updates it.You can use.get(),.get_history()and.update()with all avaliable apis. Currently supported:bitfinexbitstampbinancebinance.fundingbitmexbitmex.fundingbitmex.quoteSupported symbols:btcusd,ethusd,ltcusd. These are guaranteed to work with every module. You can stil use any symbol that an exchange supports. But same pair is different for each exchange of course. Using an unsupported symbol will give you a warning, but it should work just fine as long as you are using a correct symbol for that api.Get history with .get()import pandas as pd
from tradingfeatures import bitfinex, bitstamp, binance, bitmex

bitfinex = bitfinex()

df = bitfinex.get(2000)

df2 = bitfinex.get(2000, symbol='ethusd')   # Default is btcusd, you can pass others in symbol parameter

df3 = bitfinex.get(20000, interval='1m')    # You can pass any interval that exchange api supportsJust pass how much data you want. It will return the amount in most recent 1h data. If history amount is above api limit,.get()will run.get_history()under the hood, so you don't need to worry about it. But if you want everything avaliable on an exchange, just run.get_history().Download all available history with .get_history()The tool will download all avaliable history while respecting request per minute limits. Using it easy, and it takes couple of minutes for 1h data.import pandas as pd
from tradingfeatures import bitfinex, bitstamp, binance, bitmex

bitstamp = bitstamp()

df = bitstamp.get_hist()
df.to_csv('bitstamp_1h.csv')Updating a csv file with .update()import pandas as pd
from tradingfeatures import bitfinex, bitstamp, binance, bitmex

bitstamp = bitstamp()

bitstamp.update('bitstamp.csv')Update takes a path variable to csv file and updates it.
Package: tradingindicators
TradingIndicatorsThis python package is used to calulate the following trading indicators: Relative Strength Index(RSI), Simple Moving Average(MA), Smoothed Moving Average(SMMA), Exponential Moving Average(EMA), Moving Average Convergence Divergence(MACD), Bollinger Bands, Fibonacci Retracements, Fibonacce Extensions.Getting startedpip install tradingindicators
pip install -r requirements.txtImport package to your projectfrom tradingindicators import indicatorsExamplesExamples can be found on Github inside the/examplesdirectory.
Package: tradingmachine
TradingMachine=======TradingMachine is intend to bring optimization and machine techniques into finance algorithmic trading.Discussion and Help===================TODOFeatures========* Optimization on strategy parameters.* PyBrain Integration (Reinforcement Learning, Neural Network ...).* TA-Lib Integration (Most common technical analysis available.)* Pandas (High speed time series data analysis)Installation============# You will first need to install TALib. ta-lib is a python wrapper for that. Please refer [TA-Lib](http://ta-lib.org/hdr_doc.html)TradingMachine can be installed via pip```pip install numpypip install matplotlibpip install pandaspip install ta-libpip install tradingmachine```If there are problems installing the dependencies, please consider install scipy stack.For Windows, the [Enthought Python Distribution](http://www.enthought.com/products/epd.php)includes most of the necessary dependencies.On OSX, the [Scipy Superpack](http://fonnesbeck.github.com/ScipySuperpack/) works very well.Other platforms, the [Scipy Stack](http://www.lfd.uci.edu/~gohlke/pythonlibs/) has binary available to install.After installation, you will need to create a configuration file in home directory named ".tmconfig.ini".Example:```1 [DEFAULT]2 HistoricalDataPath = /Users/chen/Repository/historicaldata```Configuration file is intended to point to the historical data folder.A copy of historical data can be downloaded from: [historicalata](https://github.com/chinux23/historicaldata)Dependencies------------* Python (>= 3.3.1)* numpy (>= 1.7.1)* pandas (>= 0.11.0)* pytz* ta-libContact=======For other questions, please contact Chen Huang <chinux@gmail.com>.
Package: trading-simulator
trn-simSimulation on financial market transaction (eg. Stock buy&sell).
Imagining you have a trading account, you can do buy & sell actions. You can build the trn history once you take the action and provide functions for calculation of FF(Fund Flow) and GL(Gain & Loss).Version 1.0A very simple and conding version. You have to write your own python logic to decide when you buy or sell. But it will help you recording and computing your result.
Package: trading-strategy
Trading Strategy framework for PythonTrading Strategy framework is a Python framework for algorithmic trading on decentralised exchanges.
It is usingbacktesting dataandreal-time price feedsfromTrading Strategy Protocol.Use casesAnalyse cryptocurrency investment opportunities ondecentralised exchanges (DEXes)Creating trading algorithms and trading bots that trade on DEXesDeploy trading strategies as on-chain smart contracts where users can invest and withdraw with their walletsFeaturesSupports multiple blockchains likeEthereum mainnet,Binance Smart ChainandPolygonAccess trading data from on-chain decentralised exchanges likeSushiSwap,QuickSwapandPancakeSwapIntegration with Jupyter Notebook for easy manipulation of data.
Seeexample notebooks.Writealgorithmic trading strategiesfor  decentralised exchangeGetting startedSeethe Getting Started tutorialand the rest of theTrading Strategy documentation.
The easiest way to get started is readyDev Container for Visual Studio Code.PrerequisitesPython 3.10Understanding Python package management and installation(unless using Dev Container from teh above)Installing the packageYou can install this package withPoetryas a dependency:poetryaddtrading-strategy-Edirect-feedPoetry, local development:poetryinstall-Edirect-feedPip:pipinstall"trading-strategy[direct-feed]"Note:trading-strategypackage provides trading data
download and management functionality only. If you want todeveloped
automated trading strategies you need to install trade-executor package as well.DocumentationDocumentation.Getting started.CommunityTrading Strategy websiteBlogTwitterDiscordTelegram channelChangelog and version historyRead more documentation how to develop this package.LicenseGNU AGPL 3.0.
Package: trading-strategy-backtrader
Trading Strategy BacktraderThis is patched and bug fixed version forBacktrader library. This package is a dependency fortrading-strategypackage.Thebacktraderproject was forked and the fork released on a different PyPi package nametrading-strategy-backtraderbecause the original was unmaintained and unusable as a PyPi package dependency.Show package information on PyPi.For more information see the original Backtrader websiteandTrading Strategy website.ReleaseHow to release this package on PyPi.Updatesetup.pyversion.rm-rfdist
python3-mpipinstall--upgradebuild
python3-mbuild
python3-mpipinstall--upgradetwine
python3-mtwineuploaddist/*How to publish Python packages
Package: trading-strategy-qstrader
Trading Strategy QSTraderThis is patched and bug fixed version forQSTrader library. This package is a dependency fortradingstrategypackage.The QSTrader project was forked and the fork released on a different PyPi package nametrading-strategy-qstraderbecause the original project by Michael Halls-Moore was unmaintained and unusable as a PyPi package dependency.Warning: This package is currently under active development to become suitable for crypto trading. APIs are likely to break.InformationVisit Trading StrategyView Trading Strategy documentationView package information on PyPiSee the original QSTrader repository on GithubCompatibilitySince version 0.4 internals have been reworked to be compatible with crypto trading. This version is unlikely to work with stock markets anymore and the development has divergedReleaseHow to release this package on PyPi.Updatesetup.pyversion.rm-rfdist
python3.9-mvenvvenvsourcevenv/bin/activate
pipinstall-Upip
python3-mpipinstall--upgradebuildpython3-mbuild
python3-mpipinstall--upgradetwine
python3-mtwineuploaddist/*How to publish Python packages
Package: tradingview-indicators
PT-BRSe voce quiser ler em portugues bastaclicar aquiObjectiveThe initial objective of this repository was to create technical analysis indicators in a way that they would be easy to maintain and highly modular. It was observed that the initial values of the indicators, both byTA-Liband pandas, had some inaccuracies and needed adjustments. With this in mind, I created this repository specifically to address this issue of inaccuracy.InstallationTo install TradingView Indicators, you need to use the package managerpip:pip install tradingview-indicatorsExampleimportpandasaspdimporttradingview_indicatorsastadf=pd.read_csv("BTCUSDT_1d_spot.csv")source=df["close"].copy()df["RSI"]=ta.RSI(source,14)df["MACD"]=ta.MACD(source,12,26,9).get_histogramdmi=ta.DMI(df,"close")df["ADX"]=dmi.adx()[0]df["DI+"]=dmi.adx()[1]df["DI-"]=dmi.adx()[2]df["DI_Delta"]=dmi.di_difference()[0]df["DI_Ratio"]=dmi.di_difference()[1]
Package: tradingview-scraper
Tradingview scraperThis is a Python library for scraping ideas and indicators ofTradingView.com.
The goal is to develop this package for scraping anything onTradingView.comwith realtime response.Thanks to contributorsTo Do List:Scrape ideas section of a symbolExport ascsvfileExport asJSONScrape indicators status dataReview and fix bugsetc ... (You suggest)To be aware of last changes go to theend of this pageFeatures:Scrape idea's informations like:Idea's TitleIdea's descriptionIdea's symbolIdea's timeframeIdea's timestampIdea's labelIdea's social informationsThree ways to scrape webpage:Scrape the front pageScrape all pagesScrape specific range of pagesExtract indicators status like of symbols:RSIStoch.K, etcfull list of indicatorsSave data into a CSV fileReturn json formatInstallation:Open your favorite Terminal and run the command:pipinstalltradingview-scraperExamples:1. Getting ideas:fromtradingview_scraperimportIdeasobj=Ideas().scraper(symbol:str=None,startPage:int=1,endPage:int=2,to_csv:bool=False,return_json:bool=False)print(obj)Setting symbol to None will scrape theideas front page on TradingView.Output:- By default a tuple object containing the following columns is returned:
  1. A pandas dataframe (contains: Timestamp, Title, Description, Symbol, Timeframe, Label, Url, ImageURL, Likes, Comments) 
  2. A string (Symbol description in the first webpage)
- If 'return_json' is set to True, a dictionary will be returned containing the keys below:   
  `dict_keys(['symbol_description', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'])`   
  Where each of '0' to '9' keys contain an idea's details like 'Timestamp','Title','Description', etc.2. Getting indicators status:fromtradingview_scraperimportIndicatorsobj=Indicators().scraper(exchange:str="BITSTAMP",symbols:list=["BTCUSD","LTCUSDT"],indicators:list=["RSI","Stoch.K"],allIndicators:bool=False)print(obj)Output:{'BTCUSD': {'RSI': '46.34926112', 'Stoch.K': '40.40173723'}, 'LTCUSD': {'RSI': '43.38421064', 'Stoch.K': '42.32662465'}}Note:Default arguments are set to:Ideas.scraper(symbol:str=None,startPage:int=1,endPage:int=2,to_csv:bool=False,return_json:bool=False)ArgumentDescriptionsymbolSymbol namestartPagespecify first page number to scrapeendPagespecify last page number to scrapeto_csvSet it True to save data as a 'CSV' filereturn_jsonSet it True to have json format in returnIndicators().scraper(exchange: str = "BITSTAMP",
                     symbols: list = ["BTCUSD", "LTCUSDT"],
                     indicators: list = ["RSI", "Stoch.K"],
                     allIndicators: bool = False)ArgumentDescriptionexchangeExchange namealso you can useanother exchangessymbolsA list of symbolsindicatorsA list of indicatorsallIndicatorsSet it True if you needall of indicatorsChanges:Release0.1.0:The name ofClassAchanged toIdeasLicenseMIT
Package: tradingview-ta
python-tradingview-taAn unofficial python API wrapper to retrieve technical analysis from TradingView.NoteAlways update tradingview-ta for new features and bug fixes:pip install -U tradingview_taTechnical analysis for indices (index) is not supported by both TradingView and tradingview-ta, see issue#67and#84.FeaturesFaster response (compared to v2, which uses Selenium)Retrieve analysis for multiple symbolsIndicatorsDemoYou can try tradingview-ta online without installing Python:https://tradingview.brianthe.dev/.RequirementsPython 3.6 or newer.Requests, included in installation.InstallationPyPI(stable, recommended):pip install tradingview_taGitHub (latest):pip install git+https://github.com/brian-the-dev/python-tradingview-ta.gitExamplefromtradingview_taimportTA_Handler,Interval,Exchangetesla=TA_Handler(symbol="TSLA",screener="america",exchange="NASDAQ",interval=Interval.INTERVAL_1_DAY,# proxies={'http': 'http://example.com:8080'} # Uncomment to enable proxy (replace the URL).)print(tesla.get_analysis().summary)# Example output: {"RECOMMENDATION": "BUY", "BUY": 8, "NEUTRAL": 6, "SELL": 3}Tip: Usehttps://tvdb.brianthe.dev/if you don't know what symbol, screener, and exchange to use.DocumentationRead The DocsIssueIf you found a bug or have a question, please open an issue.WarningTrading is a risky activity, especially when done using an automated program. Never trade automatically without your supervision using results provided by tradingview-ta. Any monetary losses are not my fault.ContributingPull requests (docs, bug fix, features) are welcomed! Any pull request (documentation, bug fix, features, etc) are welcomed. Please follow theguidelinesand thecode of conduct.LicensePermission 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.
Package: tradingview-ta1
python-tradingview-taAn unofficial python API wrapper to retrieve technical analysis from TradingView.NotePlease ensure to update to the latest version for new features and bug fixes.pip install -U tradingview_taOther implementationsGolang:dematron/go-tvscannerNodeJS:tvorilas/trading-view-recommends-parser-nodejsFeaturesFast analysis (compared to v2.5.0 or older)Reputable data sourcesIndicatorsDemoA demo is available onhttps://tradingview.brianthe.dev/.RequirementsPython 3.5 or newer.Requests, included in installation.Installationpip:pip install tradingview_taDocker image:docker run -p 8080:8080 --rm reg2005/tradingview-ta-dockerExamplefromtradingview_taimportTA_Handler,Interval,Exchangetesla=TA_Handler(symbol="TSLA",screener="america",exchange="NASDAQ",interval=Interval.INTERVAL_1_DAY)print(tesla.get_analysis().summary)# Example output: {"RECOMMENDATION": "BUY", "BUY": 8, "NEUTRAL": 6, "SELL": 3}DocumentationRead The DocsMirror (IPFS)IssueFound a bug? Want to ask something? Just create an issue and I'll help you.WarningTrading (especially using an automated program) is a dangerous activity. Do not use TradingView's analysis to trade automatically without your supervision. I am not responsible for any financial loss.ContributingYou may fork this repository or submit a pull request. Any pull request (documentation, bug fix, features, etc) are welcomed. Please follow the guidelineshere.LicensePermission 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.
Package: tradingview-websocket
TradingView WebSocket ClientIntroductionThis Python package provides a simple WebSocket client for connecting to the TradingView WebSocket API. It allows users to subscribe to real-time financial data streams and retrieve historical data.InstallationYou can install the package via pip:pipinstalltradingview_websocketUsagefromtradingview_websocketimportTradingViewWebSocketDefine symbol, timeframe, and number of candlessymbol="USDEUR"timeframe="1D"candles=100Initialize TradingViewWebSocket objectws=TradingViewWebSocket(symbol,timeframe,candles)ws.connect()Run the WebSocket clientws.run()Access the result dataresult_data=ws.result_dataprint(result_data)LicenseThis project is licensed under the MIT License - see theLICENSEfile for details.IssuesIf you encounter any issues or have questions regarding the package, please feel free to open an issue on GitHub.
Package: tradingview-ws
InformationThis package to fetch data from tradingview websocketInstallationCreate an isolated Python virtual environmentpip3 install virtualenv
virtualenv ./virtualenv --python=$(which python3)Activate the virtualenvIMPORTANT: it needs to be activated every time before you run. virtualenv/bin/activateInstall Python requirementspip install -r requirements.txtInstallpip install -e .run testpython -m testUsing:define a callback function get receive resultdef callbackFunc(s):
    print(s)call websocket to get quote price or ohlcv to write a trading bot, data will be delayed 10m if don't use account premiumpair = "ES"

market = "futures" # 'stock' | 'futures' | 'forex' | 'cfd' | 'crypto' | 'index' | 'economic'
username = None
password = None
trading = td.TradingViewWs(pair, market, username, password)
# get quote price
trading.realtime_quote(callbackFunc)

# get ohlcv
interval = 5
total_candle = 240 # total candle to calculate indicator ex: EMA, WMA
trading.realtime_bar_chart(interval, total_candle, callbackFunc)