File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/ExchangeSharp/API/Exchanges/Bitstamp Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -286,14 +286,18 @@ protected override async Task<ExchangeOrderResult> OnGetOrderDetailsAsync(string
286286 }
287287 string _symbol = $ "{ baseCurrency } -{ quoteCurrency } ";
288288
289- decimal amountFilled = 0 , spentQuoteCurrency = 0 , price = 0 ;
289+ decimal amountFilled = 0 ;
290+ decimal spentQuoteCurrency = 0 ;
291+ decimal price = 0 ;
292+ decimal fees = 0 ;
290293
291294 foreach ( var t in transactions )
292295 {
293296 int type = t [ "type" ] . ConvertInvariant < int > ( ) ;
294297 if ( type != 2 ) { continue ; }
295298 spentQuoteCurrency += t [ quoteCurrency ] . ConvertInvariant < decimal > ( ) ;
296299 amountFilled += t [ baseCurrency ] . ConvertInvariant < decimal > ( ) ;
300+ fees += t [ "fee" ] . ConvertInvariant < decimal > ( ) ;
297301 //set price only one time
298302 if ( price == 0 )
299303 {
@@ -309,6 +313,8 @@ protected override async Task<ExchangeOrderResult> OnGetOrderDetailsAsync(string
309313 MarketSymbol = _symbol ,
310314 AveragePrice = spentQuoteCurrency / amountFilled ,
311315 Price = price ,
316+ Fees = fees ,
317+ FeesCurrency = quoteCurrency ,
312318 Result = status ,
313319 ResultCode = statusCode
314320 } ;
You can’t perform that action at this time.
0 commit comments