# Mismatched data types in C# Alpaca library

**URL:** <https://forum.alpaca.markets/t/mismatched-data-types-in-c-alpaca-library/5489>\
**Category:** Alpaca Integration Applications\
**Created:** [April 20, 2021, 10:22pm UTC](https://forum.alpaca.markets/t/mismatched-data-types-in-c-alpaca-library/5489 "2021-04-20T22:22:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gabe](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/gabe/32/2505_2.png) [@Gabe](https://forum.alpaca.markets/u/Gabe)\
**Post date:** [April 20, 2021, 10:22pm UTC](https://forum.alpaca.markets/t/mismatched-data-types-in-c-alpaca-library/5489/1 "2021-04-20T22:22:41Z")

</div>

`decimal quantity = client.GetPositionAsync(ticker).Result.Quantity`  
Quantity here returns a decimal type

`_ = client.PostOrderAsync(LimitOrder.Buy(ticker, (long)Quantity, buy_price)).Result`  
but here is takes a long type

for systems dealing with money, it should stay as a decimal type, so why is one a decimal and one a long?
