GrznarAi.Trading.ReadOnly
1.0.0-alpha.5
dotnet add package GrznarAi.Trading.ReadOnly --version 1.0.0-alpha.5
NuGet\Install-Package GrznarAi.Trading.ReadOnly -Version 1.0.0-alpha.5
<PackageReference Include="GrznarAi.Trading.ReadOnly" Version="1.0.0-alpha.5" />
<PackageVersion Include="GrznarAi.Trading.ReadOnly" Version="1.0.0-alpha.5" />
<PackageReference Include="GrznarAi.Trading.ReadOnly" />
paket add GrznarAi.Trading.ReadOnly --version 1.0.0-alpha.5
#r "nuget: GrznarAi.Trading.ReadOnly, 1.0.0-alpha.5"
#:package GrznarAi.Trading.ReadOnly@1.0.0-alpha.5
#addin nuget:?package=GrznarAi.Trading.ReadOnly&version=1.0.0-alpha.5&prerelease
#tool nuget:?package=GrznarAi.Trading.ReadOnly&version=1.0.0-alpha.5&prerelease
GrznarAi Trading ReadOnly
Typed .NET clients for trading platform APIs.
This package family is split into:
| Package | Purpose |
|---|---|
GrznarAi.Trading.ReadOnly |
Shared Core infrastructure. |
GrznarAi.Trading.ReadOnly.Etoro |
eToro public API client. |
GrznarAi.Trading.ReadOnly.Coinbase |
Coinbase Advanced Trade API client. Covers all documented GET endpoints; strictly read-only. |
Starting with 1.0.0-alpha.3, GrznarAi.Trading.ReadOnly no longer contains the eToro client. Install GrznarAi.Trading.ReadOnly.Etoro for eToro usage.
Install
dotnet add package GrznarAi.Trading.ReadOnly.Etoro
dotnet add package GrznarAi.Trading.ReadOnly.Coinbase
Install GrznarAi.Trading.ReadOnly directly only when you need the shared Core types without a platform client.
eToro
using GrznarAi.Trading.ReadOnly.Etoro.Client;
builder.Services.AddEToro(builder.Configuration);
Configuration section: EToroOptions.
Coinbase
using GrznarAi.Trading.ReadOnly.Coinbase;
builder.Services.AddCoinbaseClient(builder.Configuration);
Configuration section: Coinbase.
The Coinbase client implements every documented GET endpoint across Accounts, Portfolios, Orders, Products, Public market data, Fees, Futures, Perpetuals, Payment Methods, Convert, and Data API. No write/trade operations are exposed — the client is read-only by design.
Usage samples per endpoint live in the test suite (tests/GrznarAi.Trading.ReadOnly.Coinbase.Tests/Client/* and .../Integration/*). The full method catalogue is in the Coinbase API reference doc linked below.
Diagnostics
Enable diagnostics in platform options to capture request/response snapshots through Core:
{
"EToroOptions": {
"Diagnostics": {
"Enabled": true,
"CaptureResponseBody": true
}
}
}
Inject GrznarAi.Trading.ReadOnly.Diagnostics.IApiDiagnostics to inspect the latest API call or recent history.
Documentation
Full documentation and source: https://github.com/Michal1609/grznarai-trading-readonly
- Core: https://github.com/Michal1609/grznarai-trading-readonly/blob/main/docs/en/core/index.md
- eToro: https://github.com/Michal1609/grznarai-trading-readonly/blob/main/docs/en/etoro/index.md
- Coinbase: https://github.com/Michal1609/grznarai-trading-readonly/blob/main/docs/en/coinbase/index.md
Disclaimer
This project is not affiliated with, endorsed by, or connected to eToro or Coinbase. It does not provide financial advice. Use at your own risk.
License
MIT - Copyright (c) 2026 Michal Grznar.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- Microsoft.Extensions.Configuration (>= 10.0.8)
- Microsoft.Extensions.Http (>= 10.0.7)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.7)
- System.Threading.RateLimiting (>= 10.0.7)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on GrznarAi.Trading.ReadOnly:
| Package | Downloads |
|---|---|
|
GrznarAi.Trading.ReadOnly.Coinbase
Read-only typed .NET client for Coinbase Advanced Trade APIs. Depends on GrznarAi.Trading.ReadOnly Core infrastructure. |
|
|
GrznarAi.Trading.ReadOnly.Etoro
Read-only typed .NET client for trading platform public APIs, currently targeting the eToro public API. Not affiliated with eToro. Provided AS IS, without warranty or liability. No financial advice. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-alpha.5 | 168 | 5/17/2026 |
| 1.0.0-alpha.4 | 98 | 5/14/2026 |
| 1.0.0-alpha.3 | 88 | 5/9/2026 |
| 1.0.0-alpha.2 | 68 | 5/7/2026 |
| 1.0.0-alpha.1 | 70 | 5/3/2026 |
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
## [Unreleased]
## [1.0.0-alpha.5] - 2026-05-17
### Added
- Completed Coinbase Advanced Trade API read-only surface — all documented GET endpoints are now implemented as typed methods.
- New client interfaces split by domain: `ICoinbaseConvertClient`, `ICoinbaseDataApiClient`, `ICoinbaseFeesClient`, `ICoinbaseFuturesClient`, `ICoinbaseOrdersClient`, `ICoinbasePaymentMethodsClient`, `ICoinbasePerpetualClient`, `ICoinbaseProductsClient`, `ICoinbasePublicClient`. The facade `ICoinbaseClient` aggregates them all.
- Accounts: `ListAccountsAsync` overload accepting `ListAccountsRequest`.
- Portfolios: `ListPortfoliosAsync` overload accepting `ListPortfoliosRequest`.
- Orders endpoints: `GetOrderAsync`, `ListOrdersAsync`, `ListFillsAsync`.
- Products endpoints: `ListProductsAsync`, `GetProductAsync`, `GetProductBookAsync`, `GetBestBidAskAsync`, `GetMarketTradesAsync`, `GetProductCandlesAsync`.
- Public (unauthenticated) endpoints: `GetServerTimeAsync`, `ListPublicProductsAsync`, `GetPublicProductAsync`, `GetPublicProductBookAsync`, `GetPublicProductCandlesAsync`, `GetPublicMarketTradesAsync`.
- Fees: `GetTransactionSummaryAsync`.
- Futures: `GetFuturesBalanceSummaryAsync`, `ListFuturesPositionsAsync`, `GetFuturesPositionAsync`, `GetCurrentMarginWindowAsync`, `ListFuturesSweepsAsync`, `GetIntradayMarginSettingAsync`.
- Perpetuals: `GetPerpetualPortfolioSummaryAsync`, `ListPerpetualPositionsAsync`, `GetPerpetualPositionAsync`, `GetPortfolioBalancesAsync`.
- Payment Methods: `ListPaymentMethodsAsync`, `GetPaymentMethodAsync`.
- Convert: `GetConvertTradeAsync`.
- Data API: `GetApiKeyPermissionsAsync`.
- Integration test scaffolding for all new clients (skipped without credentials).
### Changed
- `QueryStringBuilder` improvements to support repeated keys and richer parameter binding for the new endpoints.
- `CoinbaseJsonContext` extended with all new request/response DTOs for AOT-safe serialization.
- `ServiceCollectionExtensions` registers all new domain interfaces.
### Fixed
- `GetServerTimeAsync` no longer fails when Coinbase returns `epochSeconds` / `epochMillis` as JSON strings. Added `Int64StringConverter` / `NullableInt64StringConverter` in Core and applied them to `GetServerTimeResponse`.
### Documentation
- Documented the full GET method catalogue for the Coinbase client (see API reference). The client is intentionally read-only — no write/trade endpoints are exposed.
- Noted that usage samples beyond the README are best discovered in the unit and integration tests under `tests/GrznarAi.Trading.ReadOnly.Coinbase.Tests/`.
## [1.0.0-alpha.4] - 2026-05-14
### Breaking Changes
- `GrznarAi.Trading.ReadOnly` is now the shared Core package and no longer contains the eToro client.
- eToro consumers must install `GrznarAi.Trading.ReadOnly.Etoro` and use the `GrznarAi.Trading.ReadOnly.Etoro.*` namespaces.
### Added
- Added `GrznarAi.Trading.ReadOnly.Etoro` package for the eToro client.
- Added `GrznarAi.Trading.ReadOnly.Coinbase` package for Coinbase Advanced Trade read endpoints.
- Added shared Core package with HTTP handlers, rate limiting, resilience options, query helpers, JSON helpers, and base exception type.
- Added opt-in diagnostics: `DiagnosticOptions`, `IApiDiagnostics`, `ApiDiagnostics`, `ApiResponseSnapshot`, and `DiagnosticCapturingHandler`.
- Added Core, eToro, and Coinbase AOT smoke tests.
### Changed
- Split repository structure into `src/Core`, `src/Etoro`, and `src/Coinbase`.
- CI now builds, tests, AOT-publishes smoke tests, packs all three packages, and validates package contents.
### Documentation
- Added Core documentation in English and Czech.
- Updated README and NuGet README for the Core plus per-platform package structure.
- Added Coinbase documentation in English and Czech.
## [1.0.0-alpha.3] - 2026-05-09
### Added
- Added `Demo04.PortfolioAllocation`, a console example that prints invested allocation by symbol, asset class, and industry, including positions from copied people/portfolio mirrors.
- Extended `IEToroCalculationService` with portfolio allocation analytics:
- `GetPortfolioInstrumentAllocationAsync`
- `CalculatePortfolioAssetClassAllocation`
- `CalculatePortfolioIndustryAllocation`
- Added `PortfolioInstrumentAllocation` and `PortfolioGroupAllocation` calculation models.
### Documentation
- Documented portfolio allocation calculations in English and Czech account-calculation docs.
## [1.0.0-alpha.2] - 2026-05-07
### Fixed
- Raised the `SearchInstrumentsAsync` `pageSize` limit to `20000`, allowing all roughly 12000 instruments to be downloaded in a single request.
## [1.0.0-alpha.1] - 2026-05-02
### Added
- Initial public release.
- Typed .NET client for the eToro public API (`IEToroClient`).
- `HttpClientFactory` integration with DI extension `AddEToro`.
- Rate-limit handling with sliding window and per-user-key keyed limiter.
- Authentication handler for `x-api-key` / `x-user-key` headers.
- Automatic retry on HTTP 429 with `Retry-After` support.
- API exception type (`EToroApiException`) with response body redaction.
- Account calculation service (`IEToroCalculationService`): available cash, invested principal, unrealized PnL, realized PnL, equity, total return.
- Read-only API areas: Trading, Market Data, User Info, Social, Feed, Watchlists.
- Source-generated JSON serialization (AOT-path ready).
- Symbols package (snupkg) with SourceLink.