Tradeview
A .NET 10 WPF client and ASP.NET Core Web API platform for trading and running crypto currency pair strategies.
Install / Use
/learn @grantcolley/TradeviewREADME
TradeView
[!WARNING]
Upgraded to .NET 10 - untested with possible breaking changes resulting from discontinued third-party libraries.
Technologies
-
.NET 10, WPF, ASP.NET Core WebHost, WebSockets, Prism, Unity
A platform for trading crypto currencies and running crypto currency strategies. Built with TradeView, which is a WPF UI using the Origin framework, and TradeServer, a ASP.NET Core web host.
TradeView and TradeServer enables you to:
- Connect to your exchage accounts, trade currencies, manage open orders and your asset balances
- Subscribe to live trade feed and order book for assets
- Create and run your own custom trading strategies
- Monitor running trading strategies
- Send real-time updates to strategy parameters for running strategies
- Easily extend the number of supported exchanges by creating wrappers for exchange api's that implement a common interface (currently supports Binance and Kucoin exchanges)
Table of Contents
- Getting Started
- TradeView WPF UI
- TradeServer AspNetCore WebHost
- Strategies
- Extending TradeView
Getting Started
TIP:
See thread #88 for some additional advice about getting the demo strategy to run.
Setting up your dev environment
Download the source code. Open the solution file TradeView.sln, go to multiple start-up projects and select the following projects to start:
- DevelopmentInProgress.TradeView.Wpf.Host
- DevelopmentInProgress.TradeServer.Console
Compile and run the solution. This will start both the TradeView UI and the TradeServer WebHost, which runs as a console app.
Start Trading
Select the Trading module in the navigational panel then click Demo Account. This will open the trading tab for the Demo Account and connect to its exchange, Binance, and subscribe to order book and trade feed for the default asset.
To trade you must create a new account. You can do this in the Configuration module by selecting Manage Accounts. Specify the exchange and provide an api key and api secret (and optionally a api pass phrase e.g. for Kucoin accounts). Also sepcify the default asset. Once the account has been created you can access it in the Trading module. You will see the account balances and real-time trade feed and order book for the default asset. You can start trading and receive real-time updates for your open orders.
Run a Strategy
Select the Strategies module in the navigation panel and click the Binance Moving Average - ETHBTC demo strategy. This will open the strategy tab. From the drop down list in the top left corned select the server you want to run the strategy on. The default is Trade Server, which runs as a console app. Click on the Run Strategy button. This will upload the strategy to the Trade Server instance and start running it. In the Trade Server console window you will see logged in the console the request has been received to run the strategy. A webSocket connection is established between the TradeView and TradeServer and the TradeServer publishes notifications to the TradeView so the strategy can be monitored in real time.
Note: the demo strategy only shows the real time trades with moving average and buy / sell indicators above and below the moving average.
TIP:
See thread #88 for some additional advice about getting the demo strategy to run.
See Strategies for more details of how running a strategy works.
Update a Running Strategy
Strategy parameters contain information the startegy uses to determine when to buy and sell assets. You can update the parameters of a running strategy in real-time. For example, in the UI the strategy parameters is displayed in JSON format and can be edited. Bump the sell indicator of the demo strategy from 0.00015 to 0.00115 and then click the push button. The updated strategy parameters is pushed to the strategy running on the server. You will notice in the trade chart the sell indicator line is adjusted accordingly.
See Updating Strategy Parameters for more details of how updating strategy parameters works.
Create a Strategy
Creating a strategy involves creating a class library with a class that inherits TradeStrategyBase which implements ITradeStrategy.
You will also need to create a config entry for the strategy in the Configuration module by selecting Manage Strategies.
The best way to understand how to create a strategy is to look at the demo strategy MovingAverageStrategy and how it has been configured.
Create a WPF Strategy Component
Creating a WPF strategy component involves creating a class library with a view model that inherits StrategyDisplayViewModelBase and a corresponding view.
The best way to understand how to create a WPF strategy component is to look at the project DevelopmentInProgress.Strategy.MovingAverage.Wpf for an example of how the demo WPF strategy component has been created.
You will also need to update the config entry for the strategy in the Configuration module by selecting Manage Strategies.
TradeView WPF UI
Overview
TradeView consists of modules, accessible from the navigation panel on the left, including Configuration, Trading, Strategies and the Dashboard-module.
Configuration Module
The Configuration module is where configuration for trading accounts, running strategies and strategy servers is managed.
Manage Accounts
Allows you to create and persist trading accounts including account name, exchange, api key and secret key. It also persists display preferences for the trading screen, such as favourite symbols, and default selected symbol.
Manage Strategies
Manage configuration for running a trading strategy and displaying a running strategy in re
Related Skills
node-connect
334.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
82.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
334.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
82.3kCommit, push, and open a PR
