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
286
286
}
287
287
string _symbol = $ "{ baseCurrency } -{ quoteCurrency } ";
288
288
289
- decimal amountFilled = 0 , spentQuoteCurrency = 0 , price = 0 ;
289
+ decimal amountFilled = 0 ;
290
+ decimal spentQuoteCurrency = 0 ;
291
+ decimal price = 0 ;
292
+ decimal fees = 0 ;
290
293
291
294
foreach ( var t in transactions )
292
295
{
293
296
int type = t [ "type" ] . ConvertInvariant < int > ( ) ;
294
297
if ( type != 2 ) { continue ; }
295
298
spentQuoteCurrency += t [ quoteCurrency ] . ConvertInvariant < decimal > ( ) ;
296
299
amountFilled += t [ baseCurrency ] . ConvertInvariant < decimal > ( ) ;
300
+ fees += t [ "fee" ] . ConvertInvariant < decimal > ( ) ;
297
301
//set price only one time
298
302
if ( price == 0 )
299
303
{
@@ -309,6 +313,8 @@ protected override async Task<ExchangeOrderResult> OnGetOrderDetailsAsync(string
309
313
MarketSymbol = _symbol ,
310
314
AveragePrice = spentQuoteCurrency / amountFilled ,
311
315
Price = price ,
316
+ Fees = fees ,
317
+ FeesCurrency = quoteCurrency ,
312
318
Result = status ,
313
319
ResultCode = statusCode
314
320
} ;
You can’t perform that action at this time.
0 commit comments