import chalice could not be resolved

56 views Asked by At

im trying to create a trading bot and i got stuck with this problem.

problem: Import "chalice" could not be resolved

Code:

 from chalice import Chalice

    app = Chalice(app_name='trading-bot')

    @app.route('/', methods=['POST'])
    def index():
    # Get the JSON body of the request
    request = app.current_request.json_body

    # Extract the symbol and the action from the     request
    symbol = request.get('symbol')
    action = request.get('action')

    # Print them to the console (for testing purposes)
    print(f'Symbol: {symbol}, Action: {action}')

    # Return a success message
    return {'message': 'Trade executed'}

I have no idea what to do please help

0

There are 0 answers