How to Import Trades
If you have a number of trades to manually book into the system, you can easily do so using the trade import template.
Usage
To find the template, click ACTIONS > DOWNLOAD TEMPLATE on the Trades screen. You will receive an Excel file titled "trade_import_upload_template.xlsx". Just fill out the template and upload it back to Molecule via ACTIONS > UPLOAD.
Tips
- If an upload fails, read the error message in the notifications panel, and then clear the message so that subsequent errors aren't confusing.
- Molecule de-duplicates uploads, so if you upload a file with the same name twice in the same minute, one of them may be ignored.
- The maximum row count on an upload spreadsheet is 1,000 rows. Additional rows get ignored.
- Note that some columns are required to be in the template, even if they do not get filled in.
Fields
Required Fields
These fields are included in the template by default. Note that the headers must exist in the file, even if the values are not needed.
Name | Description | Format (Example) | Required? |
trade_date | The date of the trade. It is formatted as YYYY-MM-DD. | 2023-04-01 | Yes |
quantity | The quantity of the trade. Note: | -200 | Yes |
quantity_type | Specifies how the quantity of the trade should be determined. Quantity types are Exchange trades should be uploaded with a contract quantity type. | unit | Yes |
mark | If you would like your trade to mark with a different product's curve price, you can do that here by filling out the product's ticker symbol. You can also specify a contract month, but it is not required. Should be in v1 or v2 formula format, depending on the Product. |
| Header Only |
primary_product_code | The ticker symbol of the trade. | NG | Yes |
price | The price of the trade can be static or formula. Can be a fixed price, or a formula (v1 or v2 formula, depending on the Product). |
| Yes |
strike | The strike price of the trade (for options only). | 1.5 | Header Only |
right | Specifies whether the trade is a 'call' or a 'put' (for options only). | call | Header Only |
counterparty | The counterparty of the trade, using their handle (aka short name). | NYMEX | Header Only |
tenor_start | The beginning of the first contract period of the trade. It is formatted as YYYY-MM-DD. | 2025-04-01 | Yes |
tenor_end | The end of the last contract period of the trade. As trades can have multiple legs and frequencies, this may not simply be the end of the tenor_start month.It is formatted as YYYY-MM-DD. | 2025-04-01 | Yes |
tags | Specifies which book the trade will be assigned to. You may also include secondary tags (beginning with @). All tags will need to be separated by a 'space'. Note: tag names may not have 'spaces' in their names. | #demo @strategy_1 | Yes (book only) |
fcm | The FCM of the trade, using their handle (short name) | STONEX | Header Only |
settlement_date_override | If you would like to specify your own settlement date for the trade, you can do that here. Populated as a date, if this field is specified, the imported trade's legs will be given this value as its realization date. It is formatted as YYYY-MM-DD. | 2023-04-01 | Header Only |
notes | Any notes you would like to include with the trade can be filled out here. | any string | Header Only |
po/so | A field for purchase order/sales order. | any string | Header Only |
custom_field_values | For accounts with "custom fields" set up. Custom fields for trades are done in JSON format. |
| Header Only (unless the field is created as "required") |
Optional Fields
These fields' headers are not in the template by default, but can be added.
mg_id
- text field; set multiple rows to the same value to group them upon uploading-
broker
- handle (short name) -
origin
- long name -
agreement_id
-
underlying_price_formula
- a v2 Formula -
tplus_payment_date
- an integer representing T+x. -
trader_email
- the e-mail associated with the Trader of the trade. Must be a valid user in Molecule.
Fees
Fees may be added via a column entitled fees
. The format required is JSON-based:
[{"name": "clearing", "type": "contract", "price": 0.77},{"name":"commission", "type": "contract", "price": 1.77}]
Hourly/Sub-Hourly Trades
For these columns, enter the hours in the "interval ending" format hhmm+
, where the + represents the repeated hour related to DST/Summer Time changeover.
tenor_start_ie
tenor_end_ie
0200+
.IR Swaps
These optional fields are exclusively for Interest Rate swaps.
fixed_day_count_fraction
float_day_count_fraction
initial_rate
payment_day
spread
business_day_convention