I have a [BUG REPORT]
Details:
running GetOpenOrderDetails on Bittrex fails with error System.ArgumentException: 'Can not convert Null to Decimal.'
It fails in Parse order on line:
order.AveragePrice = token["PricePerUnit"].ConvertInvariant(token["Price"].ConvertInvariant());
if I dump the Jobject I get this:
{
"success": true,
"message": "",
"result": [
{
"Uuid": null,
"OrderUuid": "6523de7d-e999-4d24-ad70-3adaf2895190",
"Exchange": "BTC-DGB",
"OrderType": "LIMIT_SELL",
"Quantity": 7000.0,
"QuantityRemaining": 7000.0,
"Limit": 5.49E-06,
"CommissionPaid": 0.0,
"Price": 0.0,
"PricePerUnit": null,
"Opened": "2018-02-09T15:00:53.76",
"Closed": null,
"CancelInitiated": false,
"ImmediateOrCancel": false,
"IsConditional": false,
"Condition": "NONE",
"ConditionTarget": null
},
{
"Uuid": null,
"OrderUuid": "b6b68d04-20ff-4d4a-a108-66fd35015a8b",
"Exchange": "BTC-DGB",
"OrderType": "LIMIT_SELL",
"Quantity": 5000.0,
"QuantityRemaining": 5000.0,
"Limit": 4.77E-06,
"CommissionPaid": 0.0,
"Price": 0.0,
"PricePerUnit": null,
"Opened": "2018-02-09T15:01:07.273",
"Closed": null,
"CancelInitiated": false,
"ImmediateOrCancel": false,
"IsConditional": false,
"Condition": "NONE",
"ConditionTarget": null
},
{
"Uuid": null,
"OrderUuid": "e2369e65-46be-4e9b-9812-1c9d659192ac",
"Exchange": "BTC-DGB",
"OrderType": "LIMIT_SELL",
"Quantity": 2000.0,
"QuantityRemaining": 2000.0,
"Limit": 8E-06,
"CommissionPaid": 0.0,
"Price": 0.0,
"PricePerUnit": null,
"Opened": "2018-02-09T15:02:01.777",
"Closed": null,
"CancelInitiated": false,
"ImmediateOrCancel": false,
"IsConditional": false,
"Condition": "NONE",
"ConditionTarget": null
},
{
"Uuid": null,
"OrderUuid": "e6b1525a-126d-44e6-ab97-579a8ff69464",
"Exchange": "BTC-DGB",
"OrderType": "LIMIT_SELL",
"Quantity": 1500.0,
"QuantityRemaining": 1500.0,
"Limit": 1.1E-05,
"CommissionPaid": 0.0,
"Price": 0.0,
"PricePerUnit": null,
"Opened": "2018-02-09T15:02:26.9",
"Closed": null,
"CancelInitiated": false,
"ImmediateOrCancel": false,
"IsConditional": false,
"Condition": "NONE",
"ConditionTarget": null
},
{
"Uuid": null,
"OrderUuid": "2ac91366-16ed-4930-b4f5-b7ff06c64c60",
"Exchange": "BTC-DGB",
"OrderType": "LIMIT_SELL",
"Quantity": 2014.79418184,
"QuantityRemaining": 2014.79418184,
"Limit": 1.9E-05,
"CommissionPaid": 0.0,
"Price": 0.0,
"PricePerUnit": null,
"Opened": "2018-02-09T15:02:40.823",
"Closed": null,
"CancelInitiated": false,
"ImmediateOrCancel": false,
"IsConditional": false,
"Condition": "NONE",
"ConditionTarget": null
}
]
}
PricePerUnit is null, since these are opened orders, so it fails.