title: Magento 2: get Stock quantity from custom source
body: <p>I use this code to retrieve stock quantity by product id.</p>
  <pre><code>$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
  $StockState = $objectManager-&gt;get('\Magento\CatalogInventory\Api\StockStateInterface');
  $qty = $StockState-&gt;getStockQty($product-&gt;getId(), $product-&gt;getStore()-&gt;getWebsiteId());
  </code></pre>
  <p>This snippet returns only &quot;default source&quot; quantity.
  My goal consist to retrieve &quot;mycustom source&quot; quantity such as:</p>
  <p><a href="https://i.stack.imgur.com/YxiHi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YxiHi.png" alt="enter image description here" /></a></p>
  <p>Is it possible?</p>