Closed apobekiaris closed 11 months ago
We will try to answer all questions that do not require research within 24hr. To prioritize cases that require research we use the following labels in order. For all other issues the posting time is respected.
This case is prioritized.
In the screencast you can see the Xpand.XAF.Modules.Reactive.Rest package in action mapping code less the 3Commas crypto bot Rest api
Is the source code of this sample project available?
source code exists of course however I do not plan to distribute a 3Commas package. The module contains mostly BO like the Account for example, note the RestOperation, RestProperty attributes, and the ReactiveCollections
[DomainComponent]
[DefaultClassOptions]
[XafDefaultProperty(nameof(Name))]
[RestOperation(Operation.Update, BaseEndPoint+"/update","POST")]
[RestOperation(Operation.Get, BaseEndPoint,PollInterval = DailyPoll)]
[Appearance("TodayLosingColor", AppearanceItemType.ViewItem, nameof(DayProfitUsd) + " Is not null and "+ nameof(DayProfitUsd) + " <0",
TargetItems = nameof(DayProfitUsd) , FontColor = "Orange")]
[Appearance("OverallLosingColor", AppearanceItemType.ViewItem, nameof(TotalUsdProfit) + " Is not null and "+ nameof(TotalUsdProfit) + " <0",
TargetItems = nameof(TotalUsdProfit) , FontColor = "Orange")]
[ReadOnlyObjectView(allowEdit:true,allowDelete:true)]
public class Account:NonPersistentBaseObject {
public const string BaseEndPoint = "/ver1/accounts";
private const string InstanceEndPoint = BaseEndPoint+"/{" + nameof(Id) + "}/";
[JsonProperty("id")] [Key][InvisibleInAllViews]
public long Id { get; set; }
[JsonProperty("account_id")] [Browsable(false)]
public long AccountId => Id;
[JsonProperty("supported_market_types")]
[RestProperty(nameof(SupportedMarketTypes))]
public IList<string> SupportedMarketTypesList { get; set; }
[ReadOnlyCollection()][JsonIgnore]
public BindingList<ObjectString> SupportedMarketTypes { get; private set; }
[RestProperty(nameof(HttpMethod.Get), InstanceEndPoint +"active_trading_entities",HandleErrors=true)]
[JsonIgnore]
public ReactiveCollection<ActiveTradingEntity> ActiveTradingEntities { get; protected set; }
[RestProperty(nameof(HttpMethod.Post), InstanceEndPoint +"account_table_data")]
[JsonIgnore]
public ReactiveCollection<AccountTableData> AccountTableData { get; protected set; }
[JsonProperty("market_code")]
[RestProperty(nameof(MarketName))]
[VisibleInListView(false)]
public string MarketCode { get; set; }
[DisplayName(nameof(Market))]
public Market MarketName { get; set; }
[JsonProperty("auto_balance_period")] [VisibleInListView(false)]
[EditorAlias(EditorAliases.DisplayText)]
public int AutoBalancePeriod { get; set; }
[JsonProperty("auto_balance_portfolio_id")][VisibleInListView(false)]
[EditorAlias(EditorAliases.DisplayText)]
public int? AutoBalancePortfolioId { get; set; }
[JsonProperty("auto_balance_currency_change_limit")][VisibleInListView(false)]
[EditorAlias(EditorAliases.DisplayText)]
public decimal? AutoBalanceCurrencyChangeLimit { get; set; }
The pre-release 4.202.53.0 in the Reactive.XAF lab
branch includes commits that relate to this task:
To minimize version conflicts we recommend that you use the Xpand.XAF.Core.All, Xpand.XAF.Win.All, Xpand.XAF.Web.All packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video).
Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.
If you do not use these packages directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.
Thanks a lot for your contribution.
Issue is deprioritized
as no Assignee found
and scheduled for auto-close
if no activity in the next 60 days
. Thanks a lot for your contribution.
Closing issue for age. Feel free to reopen it at any time.
.Thank you for your contribution.
Provide a module that we can define bindings (e.g. CRUD ) for a non-presistent DomainComponent. Operations such List, Create, Delete, Updated, possibly can be supported easy, the rest as we go