# Mesh Connect

> Read Mesh payment transfers and browse supported networks, tokens and integrations.

App · 14 actions. Web page: https://docs.lodol.com/docs/integrations/mesh-connect

## Actions

### Discover pay-in (source) bridging routes for one or more payout destinations.

Find the pay-in routes that can deliver funds to one or more payout destinations. Choose one route per source or every matching pair.

**Inputs**

- Destinations (`destinations`, list, required): Destination networks and assets Mesh should match against configured bridging directions (CAIP-2 network + symbol per entry). At least one is required.
- Optimized (`optimized`, true/false): When true (default), return at most one destination per distinct source. When false, return every matching origin→destination pair.

**Outputs**

- `data` (object): The response from Mesh Connect.

**Example output**

```json
{
  "data": {
    "content": {
      "routes": []
    },
    "displayMessage": "example",
    "errorData": "example",
    "errorHash": "example",
    "errorType": "example",
    "message": "example",
    "status": "ok",
    "teamCode": "example"
  }
}
```

### Discover payout (destination) bridging routes for fixed omnibus (source) legs.

Find the payout routes available from fixed source networks and assets. Choose one route per destination or every matching pair.

**Inputs**

- Sources (`sources`, list, required): Source networks and assets (e.g. Stake omnibus chain + token). At least one is required.
- Optimized (`optimized`, true/false): When true (default), return at most one source per distinct destination. When false, return every matching origin→destination pair.

**Outputs**

- `data` (object): The response from Mesh Connect.

**Example output**

```json
{
  "data": {
    "content": {
      "routes": []
    },
    "displayMessage": "example",
    "errorData": "example",
    "errorHash": "example",
    "errorType": "example",
    "message": "example",
    "status": "ok",
    "teamCode": "example"
  }
}
```

### Get aggregated fiat balances

Get cached aggregated fiat balances from all connected integrations.

**Inputs**

- User id (`record_user_id`, text): End user ID to get the aggregated portfolio for.

**Outputs**

- `data` (object): The response from Mesh Connect.

**Example output**

```json
{
  "data": {
    "content": {
      "fiatBalances": []
    },
    "displayMessage": "example",
    "errorData": "example",
    "errorHash": "example",
    "errorType": "example",
    "message": "example",
    "status": "ok",
    "teamCode": "example"
  }
}
```

### Get aggregated holdings

Get the aggregated portfolio of the user containing market values.

**Inputs**

- User id (`record_user_id`, text, required): End user ID to get the aggregated portfolio for.
- Timezone offset (`timezone_offset`, number): Offset in second, used to calculate daily return for cryptocurrencies.

**Outputs**

- `data` (object): The response from Mesh Connect.

**Example output**

```json
{
  "data": {
    "content": {
      "actualPortfolioPerformance": 1.0,
      "cryptocurrenciesValue": 1.0,
      "cryptocurrencyPositions": [],
      "equitiesValue": 1.0,
      "equityPositions": [],
      "nftPositions": [],
      "nftsValue": 1.0,
      "portfolioCostBasis": 1.0
    },
    "displayMessage": "example",
    "errorData": "example",
    "errorHash": "example",
    "errorType": "example",
    "message": "example",
    "status": "ok",
    "teamCode": "example"
  }
}
```

### Get an indicative quote for bridging a given pay-in amount on a configured origin→destination route.

Get an estimate of what a bridge would deliver for a given pay-in amount on one route, net of fees, along with the minimum amount. Nothing is created.

**Inputs**

- Origin (`origin`, object, required): The pay-in leg: network and asset that will be sent to the bridging address. Must match a configured route from deposit or withdrawal route discovery.
- Destination (`destination`, object, required): The payout leg: network, asset, and the address that will receive the bridged funds. Must match a route from deposit or withdrawal route discovery together with `origin`.
- Amount (`amount`, number, required): Amount to be sent, denominated in the `origin` asset (e.g. `100` for 100 USDC). Must be greater than zero and at most 1,000,000,000. From 1e-18 to 1000000000.

**Outputs**

- `data` (object): The response from Mesh Connect.

**Example output**

```json
{
  "data": {
    "content": {
      "constraints": {
        "maximumAmount": "example",
        "minimumAmount": "example"
      },
      "destination": {
        "address": "example",
        "asset": "example",
        "estimatedAmount": 1.0,
        "minimumAmount": 1.0,
        "network": "example"
      },
      "fees": {
        "items": {},
        "totalUsd": 1.0
      },
      "origin": {
        "amount": 1.0,
        "asset": "example",
        "network": "example"
      },
      "quotedAt": 1,
      "rate": 1.0,
      "warnings": []
    },
    "displayMessage": "example",
    "errorData": "example",
    "errorHash": "example",
    "errorType": "example",
    "message": "example",
    "status": "ok",
    "teamCode": "example"
  }
}
```

### Get integrations

List every integration Mesh supports for transfers, including which tokens and networks each supports.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Mesh Connect.

**Example output**

```json
{
  "data": {
    "content": {
      "integrations": []
    },
    "displayMessage": "example",
    "errorData": "example",
    "errorHash": "example",
    "errorType": "example",
    "message": "example",
    "status": "ok",
    "teamCode": "example"
  }
}
```

### Get Link token

Get a short-lived, one-time use token for initializing a Link session using the client-side SDKs

**Inputs**

- User ID (`record_user_id`, text, required): A unique Id representing the end user. Typically this will be a user Id from the client application. Personally identifiable information, such as an email address or phone number, should not be used. 300 characters length maximum.
- Broker type (`broker_type`, object): Type of integration to redirect to. Will redirect to catalog if not provided. Not supported types: DeFiWallet, CryptocurrencyAddress, CryptocurrencyWallet.
- Restrict multiple accounts (`restrict_multiple_accounts`, true/false): The final screen of Link allows users to “continue” back to your app or “Link another account.” If this param is present then this button will be hidden.
- Transfer options (`transfer_options`, object): Encapsulates transaction-related parameters, including destination addresses and the amount to transfer in fiat currency.
- Integration (`integration_id`, text): A unique identifier representing a specific integration obtained from the list of available integrations.
- Disable api key generation (`disable_api_key_generation`, true/false): For direct integrations that also support API keys, Link presents the user with the option to generate an API key for seamless access. If this param is true, this feature will be disabled.
- Verify wallet options (`verify_wallet_options`, object): Encapsulates verify DeFi wallet parameters.
- Sub client ID (`sub_client_id`, text): Sub Client ID, for B2B2B clients to tailor Link experience for their clients.

**Outputs**

- `data` (object): The response from Mesh Connect.

**Example output**

```json
{
  "data": {
    "content": {
      "linkToken": "example",
      "paymentLink": "example"
    },
    "displayMessage": "example",
    "errorData": "example",
    "errorHash": "example",
    "errorType": "example",
    "message": "example",
    "status": "ok",
    "teamCode": "example"
  }
}
```

### Get Mesh transfers

Get cryptocurrency transfers initiated by Mesh on exchanges or self-custody wallets.

**Inputs**

- Count (`count`, number): Number of items to return. Default 10, maximum - 1000.
- Offset (`offset`, number): Number of items to skip.
- Transfer ID (`transfer_id`, text): Mesh transfer identifier.
- Client transaction ID (`client_transaction_id`, text): Client transaction identifier.
- User ID (`record_user_id`, text): Client's user identifier.
- Integration IDs (`integration_ids`, list): Transfered integration.
- Statuses (`statuses`, list): Transfer statuses. One or more of: `pending`, `succeeded`, `failed`, `expired`.
- From timestamp (`from_timestamp`, date and time): Transfer created minimum timestamp.
- To timestamp (`to_timestamp`, date and time): Transfer created maximum timestamp.
- Min amount in fiat (`min_amount_in_fiat`, number): Minimum amount in fiat.
- Max amount in fiat (`max_amount_in_fiat`, number): Maximum amount in fiat.
- Hash (`hash`, text): Transfer hash.
- Sub client ID (`sub_client_id`, text): Sub-client identifier.
- Descending order (`descending_order`, true/false): Value indicating if ordering is descending.
- Include refund information (`include_refund_information`, true/false): When true, includes refund information (summary and details) in the response. This includes partial refund data with transaction hashes, statuses, and amounts. Default is false for backward compatibility.
- Include webhooks logs (`include_webhooks_logs`, true/false): When true, includes Transfer Status update webhooks data sent to client.

**Outputs**

- `data` (object): The response from Mesh Connect.

**Example output**

```json
{
  "data": {
    "content": {
      "hasMorePages": false,
      "items": [],
      "range": {
        "count": 1,
        "end": 1,
        "isValid": false,
        "start": 1
      },
      "total": 1
    },
    "displayMessage": "example",
    "errorData": "example",
    "errorHash": "example",
    "errorType": "example",
    "message": "example",
    "status": "ok",
    "teamCode": "example"
  }
}
```

### Get networks

List every network Mesh supports for transfers, including which tokens and integrations each supports, with the address format and contract address to validate against.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Mesh Connect.

**Example output**

```json
{
  "data": {
    "content": {
      "networks": []
    },
    "displayMessage": "example",
    "errorData": "example",
    "errorHash": "example",
    "errorType": "example",
    "message": "example",
    "status": "ok",
    "teamCode": "example"
  }
}
```

### Get supported tokens

Get the list of all tokens supported by Mesh to perform transfers, including which networks and integrations are supported.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Mesh Connect.

**Example output**

```json
{
  "data": {
    "content": {
      "tokens": []
    },
    "displayMessage": "example",
    "errorData": "example",
    "errorHash": "example",
    "errorType": "example",
    "message": "example",
    "status": "ok",
    "teamCode": "example"
  }
}
```

### Get transfer quote

Get a quote for transferring a fiat amount from a brokerage account in a given cryptocurrency over a specified network. Returns min and max fees and amounts to account for different funding sources (existing crypto balance, cash balance or ACH/debit deposit). Currently only supported for Coinbase.

**Inputs**

- Amount in fiat (`amount_in_fiat`, number, required): Base amount of fiat currency being transferred
- Fiat currency (`fiat_currency`, text, required): 3 character currency code, e.g. USD
- Symbol (`symbol`, text, required): Symbol of destination cryptocurrency, e.g. ETH
- Network (`network_id`, text, required): Unique id of destination network
- To address (`to_address`, text, required): The designated destination for sending the asset.
- Broker type (`broker_type`, text, required): The type of the integration to send the asset from. One of: `robinhood`, `eTrade`, `alpaca`, `tdAmeritrade`, `weBull`, `stash`, `interactiveBrokers`, `public`, `coinbase`, `kraken`, and 62 more.
- Fee flat (`fee_flat`, number): Flat fee in crypto to be charged as a partner fee
- Fee percentage (`fee_percentage`, number): Percentage of transfer amount to be charged as a partner fee, expressed as decimal (ie 0.1 = 10%)

**Outputs**

- `data` (object): The response from Mesh Connect.

**Example output**

```json
{
  "data": {
    "content": {
      "amountInFiat": 1.0,
      "brokerPrice": 1.0,
      "brokerType": "robinhood",
      "fees": {
        "inCrypto": {},
        "inFiat": {}
      },
      "fiatCurrency": "example",
      "fundingOptions": [],
      "ineligibilityReason": {},
      "isEligible": false,
      "maxAmount": 1.0,
      "maxAmountFiat": 1.0,
      "maxEligibleAmount": 1.0,
      "maxEligibleAmountFiat": 1.0,
      "minAmount": 1.0,
      "minAmountFiat": 1.0,
      "minEligibleAmount": 1.0,
      "minEligibleAmountFiat": 1.0,
      "networkId": "example",
      "price": 1.0,
      "symbol": "example",
      "toAddress": "example"
    },
    "displayMessage": "example",
    "errorData": "example",
    "errorHash": "example",
    "errorType": "example",
    "message": "example",
    "status": "ok",
    "teamCode": "example"
  }
}
```

### List available integrations

Returns a list of integrations with details including the integration ID, name, type, DeFi wallet provider ID, and categories.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Mesh Connect.

**Example output**

```json
{
  "data": {
    "content": {
      "items": []
    },
    "displayMessage": "example",
    "errorData": "example",
    "errorHash": "example",
    "errorType": "example",
    "message": "example",
    "status": "ok",
    "teamCode": "example"
  }
}
```

### List integration health

Get the list of supported institutions and their health statuses.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Mesh Connect.

**Example output**

```json
{
  "data": {
    "content": [],
    "displayMessage": "example",
    "errorData": "example",
    "errorHash": "example",
    "errorType": "example",
    "message": "example",
    "status": "ok",
    "teamCode": "example"
  }
}
```

### List wallet verification integrations

List the wallets and networks that can verify wallet ownership, and which pairs are supported.

**Inputs**

- Integration (`integration_id`, text): Only return this self-custody wallet. Use the same id you send as `integrationId` when creating a link token.
- Network (`network_id`, text): Only return this network. Use the same id you send as `verifyWalletOptions.networkId` when creating a link token. With `integrationId` too, the response always holds that one pair, with `isSupported` and, when it cannot be verified, `unsupportedReason`.

**Outputs**

- `data` (object): The response from Mesh Connect.

**Example output**

```json
{
  "data": {
    "content": {
      "integrations": []
    },
    "displayMessage": "example",
    "errorData": "example",
    "errorHash": "example",
    "errorType": "example",
    "message": "example",
    "status": "ok",
    "teamCode": "example"
  }
}
```
