compilar projecto
This commit is contained in:
@ -36,6 +36,8 @@ def API(
|
||||
ampersand = "&"
|
||||
url_pedido = url_raiz_API + api_endpoint + api_params_string
|
||||
resposta = requests.get(url_pedido, headers=headers)
|
||||
# log to url do pedido
|
||||
# print(f"URL: {url_pedido}")
|
||||
return url_pedido, resposta.status_code, resposta.json()
|
||||
|
||||
|
||||
@ -209,12 +211,14 @@ def coin_price_by_token_addresses(
|
||||
if not isinstance(include_24hr_change, bool):
|
||||
include_24hr_change = False
|
||||
if include_24hr_change != False:
|
||||
api_parameters["include_24hr_change"] = str(include_24hr_change).lower()
|
||||
api_parameters["include_24hr_change"] = str(
|
||||
include_24hr_change).lower()
|
||||
# include_last_updated_at
|
||||
if not isinstance(include_last_updated_at, bool):
|
||||
include_last_updated_at = False
|
||||
if include_last_updated_at != False:
|
||||
api_parameters["include_last_updated_at"] = str(include_last_updated_at).lower()
|
||||
api_parameters["include_last_updated_at"] = str(
|
||||
include_last_updated_at).lower()
|
||||
# precision
|
||||
if not isinstance(precision, (int, str)):
|
||||
raise TypeError("'precision' tem de ser do tipo 'int' ou 'str'")
|
||||
@ -542,7 +546,8 @@ def coin_tickers_by_id(
|
||||
if not isinstance(include_exchange_logo, bool):
|
||||
raise TypeError("'include_exchange_logo' tem de ser do tipo 'str'")
|
||||
if include_exchange_logo:
|
||||
api_parameters["include_exchange_logo"] = str(include_exchange_logo).lower()
|
||||
api_parameters["include_exchange_logo"] = str(
|
||||
include_exchange_logo).lower()
|
||||
# page
|
||||
if not isinstance(page, int | None):
|
||||
raise TypeError("'page' tem de ser do tipo 'int'")
|
||||
@ -861,7 +866,8 @@ def coin_data_by_token_address(
|
||||
api_parameters["contract_address"] = contract_address
|
||||
|
||||
return API(
|
||||
f"coins/{api_parameters['id']}/contract/{api_parameters['contract_address']}",
|
||||
f"coins/{api_parameters['id']
|
||||
}/contract/{api_parameters['contract_address']}",
|
||||
{},
|
||||
)
|
||||
|
||||
@ -1723,4 +1729,3 @@ def public_companies_holdings(coin_id: str = "") -> tuple[str, int, dict[Any, An
|
||||
# print(f'{item}: {dados[item]}')
|
||||
# else:
|
||||
# print(f'erro {codigo}: {dados}')
|
||||
|
||||
|
||||
23
modulos/gui.py
Normal file
23
modulos/gui.py
Normal file
@ -0,0 +1,23 @@
|
||||
# gui para a aplicação
|
||||
import tkinter
|
||||
|
||||
app = tkinter.Tk()
|
||||
|
||||
app.title("Crypto Portfolio")
|
||||
|
||||
# container para carteiras
|
||||
frame_carteiras = tkinter.Frame(
|
||||
app,
|
||||
)
|
||||
|
||||
label_carteiras = tkinter.Label(app, text="carteiras")
|
||||
label_detalhes_carteira = tkinter.Label(app, text="detalhes")
|
||||
label_grafico_preco = tkinter.Label(app, text="grafico preco")
|
||||
label_movimentos_carteira = tkinter.Label(app, text="movimentos")
|
||||
|
||||
label_carteiras.grid(row=0, column=0, sticky=tkinter.W, pady=5)
|
||||
label_detalhes_carteira.grid(row=1, column=0, sticky=tkinter.W, pady=5)
|
||||
label_grafico_preco.grid(row=0, column=1, sticky=tkinter.W, pady=5)
|
||||
label_movimentos_carteira.grid(row=1, column=1, sticky=tkinter.W, pady=5)
|
||||
|
||||
app.mainloop()
|
||||
Reference in New Issue
Block a user