This is a C# implementation of the TradingView UDF data provider (via HTTP API). It's a backend server application that provides data for standalone charting library.
Docs: https://github.com/tradingview/charting_library/wiki/UDF
MIT
- installation via NuGet (TradingView.Udf.Provider)
- automatically integrates into ASP.NET Core
- targeting .NET Standard 2.0 (.NET Core, Linux/MacOS compatible)
- Create a new ASP.NET Core solution
- Reference nuget TradingView.Udf.Provider
- In Startup.cs call:
public void ConfigureServices(IServiceCollection services)
{
// setup default JSON serializer to ignore null values
// important!
services.AddControllers()
.AddJsonOptions(opts =>
{
opts.JsonSerializerOptions.IgnoreNullValues = true;
});
...
// register TradingView provider with your custom data class
services.AddTradingViewProvider<MyTvProvider>();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
...
// optional TradingView provider settings
app.UseTradingViewProvider(new TradingViewSettings());
}
- Create a new class
MyTvProvider
that implements interfaceITradingViewProvider
link - Everything ready, you can now connect TradingView chart library with this backend server, example: index.html
Full usage example link
UDF | Implemented |
---|---|
GET /config | ✔ |
GET /symbol_info?group | |
GET /symbols?symbol | ✔ |
GET /search | ✔ |
GET /history | ✔ |
GET /marks | ✔ |
GET /timescale_marks | |
GET /time | |
GET /quotes |
Pull Requests are welcome!
I do consulting, please don't hesitate to contact me if you have a custom solution you would like me to implement (web, m@mkotas.cz)
Donations gratefully accepted.