toJson method

Map<String, dynamic> toJson()

Implementation

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