DocsAPI Reference
Log In
Docs

Mesh to Meld Mappings

**Note:** You can always compare the raw responses from Mesh in the `serviceProviderDetails` section of a financial account.

[Financial Account Base Fields](#financial-account-base-fields)

[Balances](#product-balances)

[Investment Holdings](#product-investment-holdings)

[Investment Transactions](#product-investment-transactions)

[Normalized Account Types and Subtypes](#normalized-account-types-and-subtypes)

## Financial Account Base Fields

This data comes from Mesh's `onBrokerConnected` event emitted from their widget. The event schema is detailed [here](https://github.com/FrontFin/front-b2b-link/blob/main/packages/link/src/utils/types.ts).

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Meld
      </th>
      <th>
        Description
      </th>
      <th>
        Mesh Response Field
      </th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>
        name
      </td>
      <td>
        The account name
      </td>
      <td>
        accountName
      </td>
    </tr>
    <tr>
      <td>
        truncated\
        AccountNumber
      </td>
      <td>
        The last 4 digits of the account number
      </td>
      <td>
        accountId
      </td>
    </tr>
    <tr>
      <td>
        status
      </td>
      <td>
        The real-time status of the account
      </td>
      <td>
        * None\_. Always mapped to `ACTIVE`
      </td>
    </tr>
    <tr>
      <td>
        type
      </td>
      <td>
        The type of the account. Mapped to a Meld standardized type
      </td>
      <td>
        * None\_. Always mapped to `INVESTMENT`
      </td>
    </tr>
    <tr>
      <td>
        subtype
      </td>
      <td>
        The subtype of the account.
      </td>
      <td>
        * None\_. Always mapped to `BROKERAGE`
      </td>
    </tr>
  </tbody>
</Table>

## Product: Balances

This data comes from Mesh's [/api/v1/balance/get](https://docs.meshconnect.com/reference/post_api-v1-balance-get) endpoint and is returned from Meld's [/bank-linking/accounts](https://docs.meld.io/reference/bank-linking-accounts-search) endpoint.

| Meld            | Description                         | Mesh Response Field                                          |
| :-------------- | :---------------------------------- | :----------------------------------------------------------- |
| currency        | The currency of the account balance | **Not Available**. Always use "USD"                          |
| currentAmount   | The current amount in the account   | totalCashUsdValue                                            |
| availableAmount | The available amount in the account | totalBuyingPowerUsdValue                                     |
| updatedAt       | The last time balances were updated | **Not Available**. Always use the current time as of loading |

## Product: Investment Holdings

This data comes from Mesh's [/api/v1/holdings/get](https://docs.meshconnect.com/reference/post_api-v1-holdings-get) endpoint and is returned from Meld's [/bank-linking/investments/holdings](https://docs.meld.io/reference/bank-linking-investment-holdings-search) endpoint.

| Meld Field   | Description                                                                | Mesh Response Field                                                                                                                                                                                                           |
| :----------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| symbol       | The symbol of the security                                                 | symbol                                                                                                                                                                                                                        |
| quantity     | The number of shares of the security                                       | amount                                                                                                                                                                                                                        |
| currentValue | The total current value of the holding                                     | **Not Available**                                                                                                                                                                                                             |
| costBasis    | The purchase price of the holding, per share                               | costBasis                                                                                                                                                                                                                     |
| currencyCode | The ISO currency code that was used to purchase the holding                | **Not Available**. Always use "USD"                                                                                                                                                                                           |
| updatedAt    | The last time the details of this holding were updated                     | updatedTimestamp                                                                                                                                                                                                              |
| name         | A description of the holding                                               | name                                                                                                                                                                                                                          |
| closePrice   | The price of the security at last market close                             | **Not Available**                                                                                                                                                                                                             |
| isin         | The global ISO number for an individual security.                          | **Not Available**                                                                                                                                                                                                             |
| cusip        | A shortened version of the isin used for North American securities.        | **Not Available**                                                                                                                                                                                                             |
| type         | The type of holding (ex: stock, etf). This is normalized across providers. | Mapped to Meld type based on whether it is in the `equityPostitions`, `notSupportedEquityPositions`, `cryptoCurrencyPositions`, `notSupportedCryptoCurrencyPositions`, `nftPositions`, or `optionPositions` lists of holdings |

## Product: Investment Transactions

This data comes from Meld's [/api/v1/transactions/list](https://docs.meshconnect.com/reference/post_api-v1-transactions-list) endpoint and is returned from Meld's [/bank-linking/investments/transactions](https://docs.meld.io/reference/bank-linking-investment-transactions-search) endpoint.

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Meld Field
      </th>
      <th>
        Description
      </th>
      <th>
        Mesh Response Field
      </th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>
        symbol
      </td>
      <td>
        The symbol of the security
      </td>
      <td>
        symbol
      </td>
    </tr>
    <tr>
      <td>
        quantity
      </td>
      <td>
        The number of shares of the security
      </td>
      <td>
        **Not Available**
      </td>
    </tr>
    <tr>
      <td>
        costBasis
      </td>
      <td>
        The purchase price of the holding, per share
      </td>
      <td>
        value
      </td>
    </tr>
    <tr>
      <td>
        cashBalance
      </td>
      <td>
        The cash balance of the account after the transaction
      </td>
      <td>
        **Not Available**
      </td>
    </tr>
    <tr>
      <td>
        financialAccountId
      </td>
      <td>
        The Id of the financial account
      </td>
      <td>
        accountId
      </td>
    </tr>
    <tr>
      <td>
        amount
      </td>
      <td>
        The total currency involved in the transaction
      </td>
      <td>
        amount
      </td>
    </tr>
    <tr>
      <td>
        currency
      </td>
      <td>
        The ISO currency code that was used to purchase the holding
      </td>
      <td>
        * None\_. Always use "USD"
      </td>
    </tr>
    <tr>
      <td>
        description
      </td>
      <td>
        A description of the transaction
      </td>
      <td>
        name
      </td>
    </tr>
    <tr>
      <td>
        status
      </td>
      <td>
        The status of the transaction
      </td>
      <td>
        status
        <br>  - If returns `success`, Meld will populate the value as `POSTED`<br>  - If returns anything else,  Meld will populate the value as `PENDING`<br>
      </td>
    </tr>
    <tr>
      <td>
        type
      </td>
      <td>
        The type of investment transaction
      </td>
      <td>
        side
        `sell` -> `SELL`\
        `buy` -> `BUY`\
        `unknown` -> `OTHER`
      </td>
    </tr>
    <tr>
      <td>
        transactionDate
      </td>
      <td>
        The date the transaction was initiated
      </td>
      <td>
        createdTimestamp
      </td>
    </tr>
    <tr>
      <td>
        postedDate
      </td>
      <td>
        The date the transaction was finalized
      </td>
      <td>
        updatedTimestamp
      </td>
    </tr>
  </tbody>
</Table>

## Normalized Account Types and Subtypes

<HTMLBlock>{`
<iframe src="https://docs.google.com/spreadsheets/d/1kgFqN8wTrC5vtccg8eAYzf5XCHGdpN9rZV9V4_pGf8o/edit?usp=sharing" width="100%" height="1200" title="Iframe" border="none" style="border:none;"></iframe>
`}</HTMLBlock>

<HTMLBlock>{`
<div></div>
<style>.UpdatedAt { display: none; }</style>
`}</HTMLBlock>