Deal.fromJson constructor
Implementation
Deal.fromJson(Map<String, dynamic> json)
: id = json['id'],
type = json['type'],
botId = json['bot_id'],
maxSafetyOrders = json['max_safety_orders'],
dealHasError = json['deal_has_error'],
fromCurrencyId = json['from_currency_id'],
toCurrencyId = json['to_currency_id'],
accountId = json['account_id'],
activeSafetyOrdersCount = json['active_safety_orders_count'],
createdAt = DateTime.parse(json['created_at']),
updatedAt = DateTime.parse(json['updated_at']),
finished = json['finished'],
currentActiveSafetyOrdersCount =
json['current_active_safety_orders_count'],
currentActiveSafetyOrders = json['current_active_safety_orders'],
completedSafetyOrdersCount = json['completed_safety_orders_count'],
completedManualSafetyOrdersCount =
json['completed_manual_safety_orders_count'],
cancellable = json['cancellable'],
panicSellable = json['panic_sellable'],
trailingEnabled = json['trailing_enabled'],
tslEnabled = json['tsl_enabled'],
stopLossTimeoutEnabled = json['stop_loss_timeout_enabled'],
stopLossTimeoutInSeconds = json['stop_loss_timeout_in_seconds'],
activeManualSafetyOrders = json['active_manual_safety_orders'],
pair = json['pair'],
status = json['status'],
localizedStatus = json['localized_status'],
takeProfit = json['take_profit'],
baseOrderVolume = json['base_order_volume'],
safetyOrderVolume = json['safety_order_volume'],
safetyOrderStepPercentage = json['safety_order_step_percentage'],
leverageType = json['leverage_type'],
boughtAmount = json['bought_amount'],
boughtVolume = json['bought_volume'],
boughtAveragePrice = json['bought_average_price'],
baseOrderAveragePrice = json['base_order_average_price'],
soldAmount = json['sold_amount'],
soldVolume = json['sold_volume'],
soldAveragePrice = json['sold_average_price'],
takeProfitType = json['take_profit_type'],
finalProfit = json['final_profit'],
martingaleCoefficient = json['martingale_coefficient'],
martingaleVolumeCoefficient = json['martingale_volume_coefficient'],
martingaleStepCoefficient = json['martingale_step_coefficient'],
stopLossPercentage = json['stop_loss_percentage'],
profitCurrency = json['profit_currency'],
stopLossType = json['stop_loss_type'],
safetyOrderVolumeType = json['safety_order_volume_type'],
baseOrderVolumeType = json['base_order_volume_type'],
fromCurrency = json['from_currency'],
toCurrency = json['to_currency'],
currentPrice = json['current_price'],
takeProfitPrice = json['take_profit_price'],
finalProfitPercentage = json['final_profit_percentage'],
actualProfitPercentage = json['actual_profit_percentage'],
botName = json['bot_name'],
accountName = json['account_name'],
usdFinalProfit = json['usd_final_profit'],
actualProfit = json['actual_profit'],
actualUsdProfit = json['actual_usd_profit'],
reservedBaseCoin = json['reserved_base_coin'],
reservedSecondCoin = json['reserved_second_coin'],
trailingDeviation = json['trailing_deviation'],
strategy = json['strategy'],
reservedQuoteFunds = json['reserved_quote_funds'],
reservedBaseFunds = json['reserved_base_funds'];