Skip to content

Commit

Permalink
updated CryptoExchange ref
Browse files Browse the repository at this point in the history
  • Loading branch information
JKorf committed Nov 19, 2024
1 parent 4b32e7e commit b10eb9d
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 7 deletions.
6 changes: 2 additions & 4 deletions Coinbase.Net/Coinbase.Net.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<LangVersion>12.0</LangVersion>
Expand Down Expand Up @@ -48,13 +48,11 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="CryptoExchange.Net" Version="8.3.0" />
<PackageReference Include="jose-jwt" Version="5.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\CryptoExchange.Net\CryptoExchange.Net\CryptoExchange.Net.csproj" />
</ItemGroup>
</Project>
10 changes: 10 additions & 0 deletions Coinbase.Net/Coinbase.Net.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions Coinbase.Net/CoinbaseExchange.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ public static class CoinbaseExchange
/// </summary>
public static string ExchangeName => "Coinbase";

/// <summary>
/// Exchange name
/// </summary>
public static string DisplayName => "Coinbase";

/// <summary>
/// Url to exchange image
/// </summary>
public static string ImageUrl { get; } = "https://raw.githubusercontent.com/JKorf/Coinbase.Net/master/Coinbase.Net/Icon/icon.png";

/// <summary>
/// Url to the main website
/// </summary>
Expand Down
12 changes: 9 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,15 @@ <h2>API Access</h2>

<p>Coinbase.Net can be configured using Dotnet dependency injection, after which the clients can be injected into your services. It also correctly configures logging and HttpClient usage.</p>

<pre><code>builder.Services.AddCoinbase(options => {
// Options can be configured here, for example:
options.ApiCredentials = new ApiCredentials("KEYNAME", "PRIVATEKEY");
<pre><code>// Configure options from config file
// see https://github.com/JKorf/CryptoExchange.Net/tree/master/Examples/example-config.json for an example
builder.Services.AddCoinbase(builder.Configuration.GetSection("Coinbase"));

// OR

builder.Services.AddCoinbase(options => {
// Configure options in code
options.ApiCredentials = new ApiCredentials("APIKEY", "APISECRET");
});</code></pre>

<p>The <code>ICoinbaseRestClient</code> and <code>ICoinbaseSocketClient</code> can then be injected.</p>
Expand Down

0 comments on commit b10eb9d

Please sign in to comment.