Get Portfolio Node

This node can be used to fetch the user’s account balance from a crypto exchange and compose an estimated total in any desired target currency supported by the exchange. For instance, it’s possible to get an estimation of the user’s total account balance in BTC.

info

The merger node can be used to combine multiple different exchanges into one message.

Configuration

Name optional
Optional name for this node
Exchange select
Select the exchange you wish to connect to
Ignore small balances selec
Check this box if you want the node to ignore small crypto amounts within your exchange portfolio
Target Currency select
Select the currency for which you desire to get an aggregated estimation. This can be any currency supported by the exchange.

Input

This node does not require any specific prior nodes.

Output

The message will be enriched by the portfolio property:

payload float
, e.g. 31.210764241348013
payload_text string
Human-readable representation, e.g. Total 31.210764241348013 USDT
portfolio.* object
Currency with free, used, and total properties
portfolio.free object
Money, available for trading, by currency
portfolio.used object
Money on hold, locked, frozen, or pending, by currency
portfolio.total object
Total (free + used), by currency
portfolio.aggregations object
List of currencies with estimated total in quote currency.
portfolio.aggregatedTotal.totalQuoteAmount float
Combined value of all total currency values estimated in quote currency.
portfolio.aggregatedTotal.currency string
Currency configured via selected target currency
portfolio.exchange string
Exchange, e.g. hitbtc

Example message

{
  "payload": 31.210764241348013,
  "payload_text": "Total 31.210764241348013 USDT",
  "topic": "portfolio",
  "portfolio": {
    "Super Bitcoin": { "free": 0.00056088, "used": 0, "total": 0.00056088 },
    "BTG": { "free": 0.0000053, "used": 0, "total": 0.0000053 },
    "WIN": { "free": 49.841203, "used": 0, "total": 49.841203 },
    "BTC": { "free": 3.337e-9, "used": 0, "total": 3.337e-9 },
    "TRX": { "free": 0, "used": 500, "total": 500 },
    "free": {
      "Super Bitcoin": 0.00056088,
      "BTG": 0.0000053,
      "WIN": 49.841203,
      "BTC": 3.337e-9
    },
    "used": { "TRX": 500 },
    "total": {
      "Super Bitcoin": 0.00056088,
      "BTG": 0.0000053,
      "WIN": 49.841203,
      "BTC": 3.337e-9,
      "TRX": 500
    },
    "aggregations": [
      { "currency": "TRX", "quoteAmount": 31.2046 },
      { "currency": "WIN", "quoteAmount": 0.005721520898385 },
      { "currency": "Super Bitcoin", "quoteAmount": 0.00026922240000000003 },
      { "currency": "BTG", "quoteAmount": 0.00010697498799999999 },
      { "currency": "BTC", "quoteAmount": 0.00006652306163 }
    ],
    "aggregatedTotal": {
      "totalQuoteAmount": 31.210764241348013,
      "currency": "USDT"
    },
    "exchange": "hitbtc"
  }
}

Details

This node could be used as a first step in a portfolio rebalancing flow.

Last updated on Oct 6, 2022

Newsletter

Subscribe to our newsletter to stay updated and to get notified once the platform officially launches:

By subscribing, you agree with Foretale’s Privacy Policy

© foretale - 2022