Skip to main content

Standard Workflow Simple Autoimport

So far we have:

Exante Instruments 
Exante Positions

We assume that there is no exotic currencies (then you need Exante Currencies)

All these data converted to Standard Configuration. So we should be able to Import them!

Before creating an automation, lets try to do it manually

So, for that we will use /explorer/workflows/com/finmars/standard-workflow/simple-autoimport/tasks.py

its a relatively simple workflow that could import either data or transactions. Its payload structure is:

So you add any number of steps (Depends of your situation). Order is matter! Here for example we import Instruments and then only Positions


directory - optional: path to directory in explorer with files to import, trailing slash is important (/ on end)
file_path - optional: path to some file in explorer with data to import
import_type - required:"data" for Simple Import, "transaction" for Transaction Import
schema - required: user_code of schema to execute

Nota bene: Both directory and file_path are optional, but one must be present

If you pass directory it will tries to join all files in that directory into one file (List of Dictionaries)

So, lets try it out!

Go to Workflows Page and lets find com.finmars.standard-workflow:simple-autoimport

{
    "actions": [
        {
            "directory": "/data/general/instruments/",
            "import_type": "data",
            "schema": "com.finmars.standard-import-from-file:instruments.instrument:instruments"
        },
        {
            "file": "/data/general/positions/exante_abcd123_001_2024-09-01_2024-09-24.json",
            "import_type": "transaction",
            "schema": "com.finmars.standard-import-from-file:pos_daily"
        }
    ]
}   

Screenshot 2024-09-27 at 09.26.04.png

Lets execute it!


Screenshot 2024-09-27 at 09.28.06.png
Go to see your Task Status