# Get Realized Gains Provides short-term and long-term realized gains on proceeds from the securities transactions. Please see response payload for the detailed fields. Following table has reason code for Insurance Details. ### Reason Codes |Code|Description| |--- |--- | |MRG_VF_DAC|Verification method: Direct brokerage account connection| |MRG_VF_USD|Verification method: User-submitted 1099-B| |MRG_VF_DAC_USD|Verification method: Direct brokerage account connection and one or more user-submitted 1099-B| Endpoint: POST /v3/services/get_realized_gains Version: 3.0 Security: Bearer ## Header parameters: - `version` (number) Version number of the MeasureOne API you wish to integrate. - `Authorization` (string) Authorization API Key - `Content-type` (string) Content-type of the request payload. MeasureOne accepts content in application/json format unless specified otherwise ## Response 200 fields (application/json): - `individual` (object) Individual Details - `individual.individual_id` (string) Unique ID of the Individual identified by MeasureOne - `individual.datasources` (array) List of datasource IDs for which the realized gains needs to be retrieved. If the list is empty, the details will be retrieved for all the data sources - `individual.account_numbers` (array) List of account numbers for which the realized gains needs to be retrieved. If the list is empty, the details will be retrieved for all the accounts available - `individual.tax_years` (array) List of tax years for which the realized gains needs to be retrieved. If the list is empty, the details will be retrieved for all the tax years available - `datarequest_id` (string) Unique ID of the Data Request identified by MeasureOne - `service_context_id` (string) Unique ID of the service context identified by MeasureOne - `processing_status` (string) Processing status of the request. - MeasureOne has finished processing of the request. - We have received the request and system is acquiring the realized gains. Enum: "COMPLETED", "ACQUIRING" - `metadata` (object) metadata can be used for storing additional information in a structured format. metadata will be sent in webhooks and report response. - `realized_gains` (array) Array of realized gains for each datasource with the details as presented in the acquired data. - `realized_gains.datasource` (object) Datasource details - `realized_gains.datasource.id` (string) Unique ID of the datasource identified by MeasureOne - `realized_gains.datasource.type` (string) Type of the datasource - `realized_gains.datasource.name` (string) Name of datasource - `realized_gains.as_of_date` (number) timestamp when this record was generated - `realized_gains.account_number` (string) Account Number as presented on the datasource - `realized_gains.recipient` (object) Details of the recipient - `realized_gains.recipient.name` (string) Name of the recipient - `realized_gains.recipient.phone_number` (string) Phone number of the recipient - `realized_gains.recipient.tin` (string) Tax identification number of the recipient - `realized_gains.recipient.address` (object) Address of the recipient - `realized_gains.recipient.address.addr1` (string) Address Line 1 - `realized_gains.recipient.address.addr2` (string) Address Line 2 - `realized_gains.recipient.address.city` (string) City - `realized_gains.recipient.address.state` (string) State - `realized_gains.recipient.address.zipcode` (string) Zipcode - `realized_gains.recipient.address.country` (object) Country details - `realized_gains.recipient.address.country.name` (string) Country name - `realized_gains.recipient.address.country.a2_code` (string) Alpha-2 code of country - `realized_gains.payer` (object) Details of the payer - `realized_gains.payer.tin` (string) Tax identification number of the payer - `realized_gains.payer.name` (string) Name of the payer - `realized_gains.payer.phone_number` (string) Phone number of the payer - `realized_gains.payer.address` (object) Address of the payer - `realized_gains.fatca_filing_requirement` (boolean) Used to show FATCA filing requirement value - `realized_gains.transactions` (array) List of transactions - `realized_gains.transactions.gain_type` (string) Type of the gain Enum: "SHORT_TERM", "LONG_TERM" - `realized_gains.transactions.quantity_sold` (number) Quantity sold - `realized_gains.transactions.asset_details` (object) Details of the asset - `realized_gains.transactions.asset_details.type` (string) Type of asset Enum: "SECURITY", "CRYPTO", "REAL_ESTATE", "OTHER" - `realized_gains.transactions.asset_details.description` (string) Description of property - `realized_gains.transactions.asset_details.cusip` (string) CUSIP number - `realized_gains.transactions.asset_details.ticker` (string) Ticker - `realized_gains.transactions.acquired_date` (number) Date acquired - `realized_gains.transactions.sell_date` (number) Date sold or disposed - `realized_gains.transactions.proceeds` (object) Proceeds - `realized_gains.transactions.proceeds.currency` (string) Currency of the proceed Enum: "USD", "CAN", "INR" - `realized_gains.transactions.proceeds.value` (number) value of the proceed - `realized_gains.transactions.cost` (object) Cost or other Basis - `realized_gains.transactions.cost.currency` (string) Currency of the cost Enum: "USD", "CAN", "INR" - `realized_gains.transactions.cost.value` (number) Value of cost or basis - `realized_gains.transactions.accrued_market_discount` (object) Accrued Market Discount - `realized_gains.transactions.accrued_market_discount.currency` (string) Currency of accrued market discount Enum: "USD", "CAN", "INR" - `realized_gains.transactions.accrued_market_discount.value` (number) Value - `realized_gains.transactions.wash_sale_disallowed` (object) Wash Sale disallowed amount - `realized_gains.transactions.wash_sale_disallowed.currency` (string) Currency Enum: "USD", "CAN", "INR" - `realized_gains.transactions.wash_sale_disallowed.value` (number) Wash Sale Loss Disallowed Value - `realized_gains.transactions.gain` (object) gain Amount - `realized_gains.transactions.gain.value` (number) gain Amount - `realized_gains.transactions.additional_information` (string) Additional Information - `realized_gains.transactions.proceed_type` (string) Enum: "GROSS", "NET" - `realized_gains.transactions.basis_reported_to_irs` (boolean) Basis Reported to the IRS - `realized_gains.transactions.non_covered_security` (boolean) Covered/Non-covered Security (Box 5) - `realized_gains.totals` (object) Realized gain totals - `realized_gains.totals.short_term_gains` (object) Total short term realized gains - `realized_gains.totals.short_term_gains.cost` (object) Cost basis - `realized_gains.totals.short_term_gains.cost.value` (number) Cost basis value - `realized_gains.totals.short_term_gains.wash_sale_disallowed` (object) Wash Sale Loss Disallowed - `realized_gains.totals.short_term_gains.gain` (object) Realized gain - `realized_gains.totals.short_term_gains.gain.value` (number) Realized gain value. The number will be negative incase if loss - `realized_gains.totals.long_term_gains` (object) Total long term realized gains - `transaction_id` (string) Unique ID of this transaction ## Response 400 fields (application/json): - `timestamp` (number) Timestamp in milliseconds - `error_code` (string) MeasureOne Error code - `error_message` (string) Details of the error ## Response 401 fields (application/json): - `timestamp` (number) Timestamp in milliseconds - `error_code` (string) MeasureOne Error code - `error_message` (string) Details of the error ## Response 404 fields (application/json): - `timestamp` (number) Timestamp in milliseconds - `error_code` (string) MeasureOne Error code - `error_message` (string) Details of the error ## Response 405 fields (application/json): - `timestamp` (number) Timestamp in milliseconds Example: 1655227025839 - `error_code` (string) MeasureOne Error code Example: "METHOD_NOT_ALLOWED" - `error_message` (string) Details of the error Example: "Given Method not allowed" ## Response 409 fields (application/json): - `timestamp` (number) Timestamp in milliseconds Example: 1655227025839 - `http_code` (number) Error status code Example: 409 - `error_code` (string) MeasureOne Error code Example: "MULTIPLE_REPORT_INSTANCES" - `error_message` (string) Details of the error Example: "Multiple instances of the report REALIZED_GAINS found in the Data Request. Please provide params/metadata in request" ## Response 422 fields (application/json): - `timestamp` (number) Timestamp in milliseconds - `error_code` (string) MeasureOne Error code - `error_message` (string) Details of the error - `reason_codes` (array) List of reason codes. Helps developer understand what error occurred during processing an item. - `reason_codes.code` (string) Reason code applicable |Reason Code|Description| |--- |--- | |UNSUPPORTED_FORMAT| The report could not be generated as the following items are of unsupported format. |UNPROCESSABLE_DOCUMENT_QUALITY| The report could not be generated as the following items are unprocessable. |PARTIAL_DOCUMENT| The report could not be generated as the following items are partial. |NO_ITEMS| The report could not be generated as there are no items for this Individual. - `reason_codes.description` (string) Description providing details to understand what error occurred during processing an item. - `reason_codes.context` (object) Context to understand where the reason code is applicable - `reason_codes.context.items` (array) List of Items where the reason code is applicable ## Response 500 fields (application/json): - `timestamp` (number) Timestamp in milliseconds - `error_code` (string) MeasureOne Error code - `error_message` (string) Details of the error