- https://don't-look-here-go-away.com
- https://twitter.com/onepagecodehttps://don't-look-here-go-away.com
- https://don't-look-here-go-away.comhttps://don't-look-here-go-away.com
- https://don't-look-here-go-away.comhttps://don't-look-here-go-away.com
- https://don't-look-here-go-away.comhttps://don't-look-here-go-away.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| symbol="AAPL" #AAPL is the symbol for Apple Inc. | |
| d = "22/03/2022" | |
| timestamp=time.mktime(datetime.datetime.strptime(d, "%d/%m/%Y").timetuple()) | |
| URL=('https://yfapi.net/v7/finance/options/' | |
| '{}?' | |
| 'date={}' | |
| ) | |
| URL=URL.format(symbol,"{timestamp}") | |
| header = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interval='1d' | |
| range='5d' | |
| symbols='AAPL'#AAPL is the symbol for Apple Inc. | |
| URL=('https://yfapi.net/v8/finance/spark?' | |
| 'interval={}&' | |
| 'range={}&' | |
| 'symbols={}' | |
| ) | |
| URL=URL.format(interval,range,symbols) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| comparisons = "ABNB" #ABNB is the ticker for Airbnb Inc. | |
| interval= "1d" | |
| range="5d" | |
| ticker="AAPL" #AAPL is the ticker for Apple Inc. | |
| URL=('https://yfapi.net/v8/finance/chart/' | |
| '{}?' | |
| 'comparisons={}&' | |
| 'interval={}&' | |
| 'range={}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| symbol="AAPL" #AAPL is the symbol for Apple Inc. | |
| URL=('https://yfapi.net/v6/finance/recommendationsbysymbol/' | |
| '{}' | |
| ) | |
| URL=URL.format(symbol) | |
| header = { | |
| 'X-API-KEY': "{{API_KEY}}" | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| symbol="AAPL" #AAPL is symbol for Apple Inc. | |
| modules = "price" | |
| URL=('https://yfapi.net/v11/finance/quoteSummary/' | |
| '{}?' | |
| 'modules={}&' | |
| 'lang=en&' | |
| 'region=US' | |
| ) | |
| URL=URL.format(symbol,modules) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| count="25" | |
| scrIds="day_gainers" | |
| URL=('https://yfapi.net/ws/screeners/v1/finance/screener/predefined/saved?' | |
| 'count={}&' | |
| 'scrIds={}' | |
| ) | |
| URL=URL.format(count,scrIds) | |
| header = { | |
| 'X-API-KEY': "{{API_KEY}}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| symbol="AAPL" #AAPL is the symbol for Apple Inc. | |
| URL=('https://yfapi.net/ws/insights/v1/finance/insights?' | |
| 'symbol={}' | |
| ) | |
| URL=URL.format(symbol) | |
| header = { | |
| 'X-API-KEY': "{{API_KEY}}" | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from typing import Callable, Dict, List, Optional, Sequence, Tuple, Type, Union | |
| import numpy as np | |
| import datetime | |
| import os | |
| from loguru import logger | |
| import sys | |
| import time | |
| import requests | |
| import pandas as pd | |
| from pandas import DataFrame |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Positions(Enum): | |
| LONG = 'LONG' | |
| SHORT = 'SHORT' | |
| class Side(Enum): | |
| BUY = 'BUY' | |
| SELL = 'SELL' | |
| class OrderStatus(Enum): | |
| PENDING = 'PENDING' | |
| CANCELED = 'CANCELED' | |
| FILLED = 'FILLED' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Config(): | |
| """ | |
| Class for Bot configuration | |
| """ | |
| def __init__(self, symbols, total_cash, cash_per_trade, data_fetch_interval): | |
| self._symbols = symbols | |
| self._cash_per_trade = cash_per_trade | |
| self._total_cash = total_cash | |
| self._data_fetch_interval = data_fetch_interval | |
| # Getters |
OlderNewer