Finmart to Finmars
Overview
The Finmars-to-Finmars module enables exporting and sending data from a common Finmars controlling space (which includes multiple portfolios) to a private client space.
Exported Data Includes:
-
Portfolio
-
Account
-
Currency
-
Instrument
-
Counterparty
-
Responsible
-
Complex Transaction
-
Price History
-
Currency History
-
Portfolio History
Requirements
-
Both the sender and recipient spaces must have standard configurations (same versions).
Installation
-
In the sender space, navigate to Add-ons → Marketplace.
-
Locate the Finmars-to-Finars module and install it.
-
Go to Workflow → Schedules:
-
URL format:
https://{domain_name}/{realm_code}/{space_code}/w/schedule
-
-
Create a new schedule and fill out the form with the following details:
Field Value usercode Unique name name Name of the schedule workflow user code com.finmars.finmars-to-finmars:init-exportcrontab * * * * *(Format: Minute, Hour, Day of Month, Month, Day of Week)notes Optional notes payload {}(Empty JSON)manager Select "Yes"enabled Select "Yes" -
Wait for the space data to be exported to storage. You can check the exported data in Explorer → "export_data" folder.
Usage
Obtaining a JWT Token
You can retrieve a JWT token via an API POST request using the following URL pattern: https://{domain_name}/{realm_code}/{space_code}/api/v1/auth-tokens/personal-access-token/create-token/
Sending Data for a Single Portfolio
-
In the sender space, go to Workflow → Home.
-
Locate and run the workflow with user code: com.finmars.finmars-to-finmars:send
-
Use the following payload data format when running the workflow:
{ "portfolio_code": "<The portfolio code in the current space>", "export_date": "<The date of the export>", "domain_name": "<The domain name of the private client space>", "realm_code": "<The realm code of the private client space>", "space_code": "<The space code of the private client space>", "jwt_token": "<The JWT token for accessing the private client space>" }
Sending Data for a Date Range
-
In the sender space, go to Workflow → Home.
-
Locate and run the workflow with user code: com.finmars.finmars-to-finmars:send
-
Use the following payload data format:
{ "export_date_from": "<Start date of the export>", "export_date_to": "<End date of the export>", "domain_name": "<The domain name of the private client space>", "realm_code": "<The realm code of the private client space>", "space_code": "<The space code of the private client space>", "jwt_token": "<The JWT token for accessing the private client space>" }