Closed ferdn4ndo closed 3 years ago
The objective is develop a flow to retrieve initial data from exchange and save on database. Creates:
This consumer have two main functions:
An example on how to consume crated classes:
import os from app.clients.binance.binance_client import BinanceClient from app.services.consumer_service import ConsumerService from app.services.exchanges.binance_exchange_service import BinanceExchangeService from sqlalchemy import create_engine from sqlalchemy.orm import Session, sessionmaker engine = create_engine(os.getenv("DATABASE_URL")) Session = sessionmaker(bind=engine) session = Session() client = BinanceClient() service = BinanceExchangeService(session) consumer = ConsumerService(client, service) consumer.populate_exchange_data() consumer.populate_candlesticks("BTCUSDT")
The objective is develop a flow to retrieve initial data from exchange and save on database. Creates:
This consumer have two main functions:
An example on how to consume crated classes: