Importing Positions Data
- Try get Positions on a Date
- Download Positions to Finmars
- Transform Positions to Standard Configuration
- Import Daily Positions to Finmars
Try get Positions on a Date
Go to /explorer/workflows/com/finmars/exante-broker/get-positions/test.ipynb
Its a test Jupyter python script that allows you to check if you able to fetch Positions
So you need to change your accounts
variable on line 47, add your accountId e.g. ABC1234.001 it will call API endpoint of https://api-live.exante.eu/api-docs/#tag/Account-summary-API/operation/getAccountSummaryWithoutDate
So your output will be something like
{
"currencies": [
{
"code": "USD",
"convertedValue": "55175.23",
"value": "55175.23"
}
],
"timestamp": 1727295675000,
"freeMoney": "55175.22",
"netAssetValue": "970467.92",
"marginUtilization": "0.7443",
"positions": [
{
"convertedPnl": "-54410.19",
"symbolId": "CIFR.NASDAQ",
"convertedValue": "778292.7",
"price": "2.925",
"accruedInterest": null,
"symbolType": "STOCK",
"value": "778292.7",
"quantity": "91724.0",
"pnl": "-34410.19",
"currency": "USD",
"averagePrice": "4.5182"
}
],
"sessionDate": "2024-09-20",
"currency": "USD",
"accountId": "ABC1234.001",
"moneyUsedForMargin": "568292.7"
}
Finmars will store this outputs in Explorer, so after it will be processed by Exante Transformer, to make it compatible with Finmars Standard Configuration
Download Positions to Finmars
Go to Workflow Page
Run following workflow: com.finmars.exante-broker:get-positions
Pass payload like:
{
"secret": "finmars/exante",
"date_from": "2024-09-01",
"date_to": "2024-09-24",
"currencies": ["USD"],
"portfolios": ["ABCD123.001"]
}
Go to see status of your workflow
Seems all the requests are done!
Go to explorer/data/exante/positions/ABCD123.001/
and you shall able to see downloaded files as .json
That data can be later passed to Exante Data Transformer, to make it compatible with Finmars Standard Configuration
Transform Positions to Standard Configuration
Precondition: You downloaded some Positions from Exante (Check your /explorer/data/exante/positions
folder)
Go to Worfklow Page
Run Task com.finmars.exante-data-transformer:transform-positions
{
"date_from": "2024-09-01",
"date_to": "2024-09-27",
"portfolios": ["ABCD123.001"]
}
Go to see you Task Status
So all your download Position files from Exante should be packed into one .json file that converted to Standard Configuration
You shall able to see it in /explorer/data/general/positions
data/general - is a folder where data accumulates from all the sources, we keep transformed data there
Great, so this file will be dispatched to Standard Import (see schema com.finmars.standard-import-from-file:pos_daily) STD - POS DAILY
P.S. Before we able to import Positions, we must ensure that all Instruments/Currencies already present in Space. So after it, you free to import file either manually or via Standard AutoImport Schedule
Import Daily Positions to Finmars
Preconditions: You parsed instruments from positions file and Imported Instruments to Finmars
Warning: Without Instruments/Currencies this step will lead to error
Go to Workflow Page
Look for com.finmars.standard-workflow:simple-autoimport
Lets execute it (You can find files to import in /explorer/data/general/positions
)
Go to see Task Status
Great success! Lets check our transactions
Your Daily Positions successfully imported into Finmars
P.S. Some issues with Standard Import Schema Daily Positions, please provide feedback