Files
Place-Order-Trading-Bot/jobScheduler.ipynb
T
2025-05-27 13:23:26 +02:00

140 KiB

Job Scheduler 4 Placed Orders

import Libaries

In [ ]:
import requests
import MetaTrader5 as mt
import keyring as kr
In [ ]:
# login to your Trading Account - sign up in the description
mt.initialize()
    
login = 10730196
server = 'VantageInternational-Demo'
password = kr.get_password(server, str(login))


mt.login(login, password, server)

app Notifier

In [167]:
project = "trading-" + server[-4::1]
project = project.lower()
project

Out [167]:
'trading-demo'
In [164]:
def send_message(message: str, description: str, message_type: str, project: str):

    project_id_dict = {
        'trading-demo': 'a3f3ae',
        'trading-live': '747543'
    }


    requests.post('https://api.mynotifier.app', {
        "apiKey": 'beafb52e-3cb6-477a-92ef-2f10bff50e20',
        "message": message,
        "description": description,
        "type": message_type,#"info", # info, error, warning or success
        "project": project_id_dict[project]
    })
In [168]:
send_message('Testnotification', 'Kurzer Test', 'info', project)
0.2 3248.69 3216.73 3280.65 222.8
[639.2] [-639.2]
222.8
0.1 3256.94 3230.6 3283.28 28.9
[639.2, 263.40000000000003] [-639.2, -263.40000000000003]
28.9
0.2 3248.69 3216.73 3280.65 221.0
[639.2] [-639.2]
221.0
0.1 3256.94 3230.6 3283.28 28.0
[639.2, 263.40000000000003] [-639.2, -263.40000000000003]
28.0
0.2 3248.69 3216.73 3280.65 212.0
[639.2] [-639.2]
212.0
0.1 3256.94 3230.6 3283.28 23.5
[639.2, 263.40000000000003] [-639.2, -263.40000000000003]
23.5
0.2 3248.69 3216.73 3280.65 279.2
[639.2] [-639.2]
279.2
0.1 3256.94 3230.6 3283.28 57.1
[639.2, 263.40000000000003] [-639.2, -263.40000000000003]
57.1
0.2 3248.69 3216.73 3280.65 258.8
[639.2] [-639.2]
258.8
0.1 3256.94 3230.6 3283.28 46.9
[639.2, 263.40000000000003] [-639.2, -263.40000000000003]
46.9
0.2 3248.69 3216.73 3280.65 263.8
[639.2] [-639.2]
263.8
0.1 3256.94 3230.6 3283.28 49.4
[639.2, 263.40000000000003] [-639.2, -263.40000000000003]
49.4
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 12:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 12:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 12:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 12:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 13:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 13:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 13:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 13:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 14:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 14:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 14:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 14:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 15:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 15:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 15:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 15:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 16:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 16:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 16:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 16:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 17:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 17:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 17:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 17:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 18:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 18:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 18:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 18:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 19:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 19:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 19:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 19:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 20:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 20:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 20:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 20:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 21:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 21:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 21:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 21:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 22:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 22:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 22:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-05 22:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 08:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 08:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 08:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 08:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 09:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 09:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 09:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 09:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 10:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 10:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 10:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 10:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 11:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 11:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 11:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 11:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 12:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 12:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 12:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 12:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 13:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 13:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 13:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 13:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 14:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 14:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 14:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 14:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 15:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 15:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 15:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 15:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 16:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 16:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 16:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 16:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 17:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 17:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 17:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 17:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 18:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 18:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 18:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 18:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 19:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 19:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 19:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 19:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 20:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 20:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 20:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 20:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 21:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 21:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 21:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 21:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 22:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 22:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 22:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-06 22:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 08:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 08:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 08:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 08:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 09:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 09:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 09:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 09:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 10:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 10:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 10:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 10:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 11:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 11:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 11:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 11:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 12:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 12:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 12:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 12:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 13:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 13:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 13:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 13:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 14:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 14:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 14:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 14:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 15:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 15:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 15:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 15:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 16:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 16:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 16:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 16:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 17:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 17:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 17:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 17:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 18:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 18:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 18:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 18:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 19:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 19:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 19:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 19:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 20:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 20:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 20:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 20:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 21:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 21:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 21:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 21:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 22:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 22:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 22:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-07 22:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-08 08:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-08 08:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-08 08:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-08 08:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-08 09:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-08 09:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-08 09:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-08 09:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-08 10:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-08 10:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-08 10:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-08 10:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-08 11:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-08 11:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-08 11:30:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-08 11:45:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-08 12:00:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Job "get_orders_profit (trigger: cron[year='*', month='*', day_of_week='mon,tue,wed,thu,fri', hour='8-22', minute='0,15,30,45'], next run at: 2025-05-08 12:15:00 CEST)" raised an exception
Traceback (most recent call last):
  File "c:\ProgramData\anaconda3\Lib\site-packages\apscheduler\executors\base.py", line 131, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Temp\2\ipykernel_4564\1123853975.py", line 6, in get_orders_profit
    if len(pos) > 0:
       ^^^^^^^^
TypeError: object of type 'NoneType' has no len()

Get open Orders

In [ ]:
def get_orders_profit():
    global project
    
    pos = mt.positions_get()
    calc_profit = []
    calc_risk = []
    if len(pos) > 0:
        for p  in pos:
            #print(p)
            print(p.volume, p.price_open, p.sl, p.tp, p.profit)
            prof = (round((p.tp - p.price_open),2) * p.volume * 100)
            los = (round((p.price_open - p.sl),2) * p.volume * 100 *(-1))
            calc_profit.append(prof)
            calc_risk.append(los)
            print(calc_profit, calc_risk )
            print(p.profit)

            # Take Profit Info or Loss Alert!
            #if p.profit > (los * 0.8):
            if p.price_current < p.sl + 10:
                message = "Der aktuelle Verlust {} einer offenen Positonen ist kurz vor dem Totalverlust (90%) {} erreicht".format(p.profit, los)
                message_type = 'error' #info, error, warning or success
                send_message(message, 'Verlust Warnung!', message_type, project )
            elif p.price_current > p.tp - 5:
                message = "Der aktuelle Profit {} einer offenen Positonen ist kurz vor dem TP (90%) {}".format(p.profit, prof)
                message_type = 'info'
                send_message(message, 'Profit Info!', message_type, project )






        # if sum(real_profit) >= sum(min_profit):
        #     print(f"Der aktuelle Profit {sum(real_profit)} der offenen Positonen hat den Mindestprofit von (0.8) {min_profit} erreicht")
        #     message = "Der aktuelle Profit {} der offenen Positonen hat den Mindestprofit von (0.8) {} erreicht".format(sum(real_profit), sum(min_profit))
        #     message_type = 'info'
        #     send_message(message, 'Profit Info!', message_type )
        # else:
        #     print(f"Der aktuelle Profit {sum(real_profit)} der offenen Positionen hat noch nicht das Mindestprofit von (0.8) {sum(min_profit)} erreicht.")
        #     message = "Der aktuelle Profit {} der offenen Positonen hat den Mindestprofit von (0.8) {} noch nicht erreicht".format(sum(real_profit), sum(min_profit))
        #     message_type = 'warning'
        #    #send_message(message, 'Profit Info!', message_type )

In [ ]:
get_orders_profit()

Scheduler

In [ ]:
from apscheduler.schedulers.background import BackgroundScheduler
import time


scheduler = BackgroundScheduler()
#scheduler.add_job(main, 'date', run_date='2025-03-07 14:29:50')
#scheduler.add_job(my_periodic_task, 'interval', seconds=5) #intervall
#scheduler.add_job(export_marketview, 'cron', year="*", month='*', day_of_week='mon, tue, wed; thu, fri', hour='8-22', minute=00)
scheduler.add_job(get_orders_profit, 'cron', year="*", month="*", day_of_week="mon, tue, wed, thu, fri", hour='8-22', minute='00,15,30,45') #cron
#scheduler.add_job(pause_trading, 'cron', year="*", month="*", day_of_week="mon, tue, wed, thu, fri", hour=22, minute=00) #cron
scheduler.start()
#scheduler.shutdwon()

Show all Jobs

In [158]:
scheduler.get_jobs()
Out [158]:
[<Job (id=23b5bda2566f4d11a6dfb7ff009b60f1 name=get_orders_profit)>]

Remove all Jobs

In [ ]:
scheduler.remove_all_jobs()
In [ ]:
#scheduler.add_job(start_trading, 'date', run_date='2025-03-17 18:16:50')