{"id":28455699,"url":"https://github.com/questdb/net-questdb-client","last_synced_at":"2026-03-03T16:40:58.334Z","repository":{"id":37925410,"uuid":"431665427","full_name":"questdb/net-questdb-client","owner":"questdb","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-17T18:36:13.000Z","size":482,"stargazers_count":43,"open_issues_count":5,"forks_count":11,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-12-20T03:24:59.865Z","etag":null,"topics":["client-library","csharp","questdb","questdb-ilp-client"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/questdb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-11-25T00:24:26.000Z","updated_at":"2025-12-17T18:35:25.000Z","dependencies_parsed_at":"2022-08-31T17:02:06.248Z","dependency_job_id":"6001993a-40ad-413f-bf0a-14b2981bfa27","html_url":"https://github.com/questdb/net-questdb-client","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/questdb/net-questdb-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/questdb%2Fnet-questdb-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/questdb%2Fnet-questdb-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/questdb%2Fnet-questdb-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/questdb%2Fnet-questdb-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/questdb","download_url":"https://codeload.github.com/questdb/net-questdb-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/questdb%2Fnet-questdb-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30052113,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T15:26:47.567Z","status":"ssl_error","status_checked_at":"2026-03-03T15:26:17.132Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client-library","csharp","questdb","questdb-ilp-client"],"created_at":"2025-06-06T22:10:26.165Z","updated_at":"2026-03-03T16:40:58.323Z","avatar_url":"https://github.com/questdb.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"  \u003ca href=\"https://slack.questdb.io\"\u003e\n    \u003cimg src=\"https://slack.questdb.io/badge.svg\" alt=\"QuestDB community Slack channel\"/\u003e\n  \u003c/a\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://questdb.io/\" target=\"blank\"\u003e\u003cimg alt=\"QuestDB Logo\" src=\"https://questdb.io/img/questdb-logo-themed.svg\" width=\"305px\"/\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\n\u003e A .NET client for high performance time-series writes into [QuestDB](https://questdb.io).\n\n## Contents\n\n- [Getting started](#getting-started)\n- [Usage](#usage)\n- [Configuration parameters](#configuration-parameters)\n- [Properties and methods](#properties-and-methods)\n- [Examples](#examples)\n- [FAQ](#faq-)\n- [Contribute](#contribute-)\n- [License](#license-)\n\n---\n\n## Getting started\n\nUse NuGet to add a dependency on this library.\n\nSee: [https://www.nuget.org/packages/net-questdb-client/](https://www.nuget.org/packages/net-questdb-client/)\n(Optional) to use the client with TCP protocol authentication add NuGet refrence to [https://www.nuget.org/packages/net-questdb-client-tcp-auth/](https://www.nuget.org/packages/net-questdb-client-tcp-auth/)\n\n## Usage\n\n`Sender` is single-threaded, and uses a single connection to the database.\n\nIf you want to send in parallel, you can use multiple senders and standard async tasking.\n\nSee more in-depth documentation [here](https://questdb.io/docs/clients/ingest-dotnet/).\n\n### Basic usage\n\n```csharp\nusing var sender =  Sender.New(\"http::addr=localhost:9000;\");\nawait sender.Table(\"trades\")\n    .Symbol(\"symbol\", \"ETH-USD\")\n    .Symbol(\"side\", \"sell\")\n    .Column(\"price\", 2615.54m)\n    .Column(\"amount\", 0.00044)\n    .AtAsync(new DateTime(2021, 11, 25, 0, 46, 26));\nawait sender.SendAsync();\n```\n\n### Multi-line send (sync)\n\n```csharp\nusing var sender = Sender.New(\"http::addr=localhost:9000;\");\nfor(int i = 0; i \u003c 100; i++)\n{\n    sender.Table(\"trades\")\n      .Symbol(\"symbol\", \"ETH-USD\")\n      .Symbol(\"side\", \"sell\")\n      .Column(\"price\", 2615.54m)\n      .Column(\"amount\", 0.00044)\n      .At(DateTime.UtcNow);\n}\nsender.Send();\n```\n\n### Auto-Flush\n\nBy default, the client will flush every 75,000 rows (HTTP) or 600 rows (TCP).\n\nAlternatively, it will flush every 1000ms.\n\nThis is equivalent to a config string of:\n\n```csharp\nusing var sender = Sender.New(\"http:addr=localhost:9000;auto_flush=on;auto_flush_rows=75000;auto_flush_interval=1000;\");\n```\n\nA final flush or send should always be used, as auto flush is not guaranteed to send all pending data before\nthe sender is disposed.\n\n#### Flush every 1000 rows or every 1 second\n\n```csharp\nusing var sender = Sender.New(\"http::addr=localhost:9000;auto_flush=on;auto_flush_rows=1000;\");\n```\n\n#### Flush every 5000 rows\n\n```csharp\nusing var sender = Sender.New(\"http::addr=localhost:9000;auto_flush=on;auto_flush_rows=1000;auto_flush_interval=off;\");\n```\n\n#### Flush after 5 seconds\n\n```csharp\nusing var sender = Sender.New(\"http::addr=localhost:9000;auto_flush=on;auto_flush_rows=off;auto_flush_interval=5000;\");\n```\n\n#### Flush only when buffer is 4kb\n\n```csharp\nusing var sender = Sender.New(\"http::addr=localhost:9000;auto_flush=on;auto_flush_bytes=4096;auto_flush_rows=off;auto_flush_interval=off;\");\n```\n\n### Authenticated\n\n#### HTTP Authentication (Basic)\n\n```csharp\nusing var sender = Sender.New(\"https::addr=localhost:9009;tls_verify=unsafe_off;username=admin;password=quest;\");\n```\n\n#### HTTP Authentication (Token)\n\n```csharp\nusing var sender = Sender.New(\"https::addr=localhost:9009;tls_verify=unsafe_off;username=admin;token=\u003cbearer token\u003e\");\n```\n\n#### TCP Authentication\n\n```csharp\nusing var sender = Sender.New(\"tcps::addr=localhost:9009;tls_verify=unsafe_off;username=admin;token=NgdiOWDoQNUP18WOnb1xkkEG5TzPYMda5SiUOvT1K0U=;\");\n```\n\n### Multiple database endpoints\n\nThe client can be configured with multiple `addr` entries pointing to different instances of QuestDB.\n\nThis is **not** for publishing data concurrently to multiple databases.\n\nRather, this allows you to configure a backup database where data will be sent to in the event the primary database is unavailable.\n\nThe swap happens transparently within a given `retry_timeout`, and is performed in a round-robin fashion (try the next endpoint and write if it is available). Once a new endpoint is selected, it continues to be used for the lifetime of that `Sender`.\n\n## Configuration Parameters\n\nThese options are set either using a config string, or by initialising QuestDBOptions.\n\nThe config string format is:\n\n```\n{http/https/tcp/tcps}::addr={host}:{port};key1=val1;key2=val2;keyN=valN;\n```\n\n| Name                     | Default                    | Description                                                                                                                                                                                                                   |\n| ------------------------ | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `protocol` (schema)      | `http`                     | The transport protocol to use. Options are http(s)/tcp(s).                                                                                                                                                                    |\n| `addr`                   | `localhost:9000`           | The {host}:{port} pair denoting the QuestDB server. By default, port 9000 for HTTP, port 9009 for TCP.                                                                                                                        |\n| `auto_flush`             | `on`                       | Enables or disables auto-flushing functionality. By default, the buffer will be flushed every 75,000 rows, or every 1000ms, whichever comes first.                                                                            |\n| `auto_flush_rows`        | `75000 (HTTP)` `600 (TCP)` | The row count after which the buffer will be flushed. Effectively a batch size.                                                                                                                                               |\n| `auto_flush_bytes`       | `Int.MaxValue`             | The byte buffer length which when exceeded, will trigger a flush.                                                                                                                                                             |\n| `auto_flush_interval`    | `1000`                     | The millisecond interval, which once has elapsed, the next row triggers a flush.                                                                                                                                              |\n| `init_buf_size`          | `65536`                    | The starting byte buffer length. Overflowing this buffer will cause the allocation `init_buf_size` bytes (an additional buffer).                                                                                              |\n| `max_buf_size`           | `104857600`                | Maximum size of the byte buffer in bytes. If exceeded, an exception will be thrown.                                                                                                                                           |\n| `username`               |                            | The username for authentication. Used for Basic Authentication and TCP JWK Authentication.                                                                                                                                    |\n| `password`               |                            | The password for authentication. Used for Basic Authentication.                                                                                                                                                               |\n| `token`                  |                            | The token for authentication. Used for Token Authentication and TCP JWK Authentication.                                                                                                                                       |\n| `token_x`                |                            | Un-used.                                                                                                                                                                                                                      |\n| `token_y`                |                            | Un-used.                                                                                                                                                                                                                      |\n| `tls_verify`             | `on`                       | Denotes whether TLS certificates should or should not be verified. Options are on/unsafe_off.                                                                                                                                  |\n| `tls_ca`                 |                            | Un-used.                                                                                                                                                                                                                      |\n| `tls_roots`              |                            | Used to specify the filepath for a custom .pem certificate.                                                                                                                                                                   |\n| `tls_roots_password`     |                            | Used to specify the filepath for the private key/password corresponding to the `tls_roots` certificate.                                                                                                                       |\n| `auth_timeout`           | `15000`                    | The time period to wait for authenticating requests, in milliseconds.                                                                                                                                                         |\n| `request_timeout`        | `10000`                    | Base timeout for HTTP requests before any additional time is added.                                                                                                                                                           |\n| `request_min_throughput` | `102400`                   | Expected minimum throughput of requests in bytes per second. Used to add additional time to `request_timeout` to prevent large requests timing out prematurely.                                                               |\n| `retry_timeout`          | `10000`                    | The time period during which retries will be attempted, in milliseconds.                                                                                                                                                      |\n| `max_name_len`           | `127`                      | The maximum allowed bytes, in UTF-8 format, for column and table names.                                                                                                                                                       |\n| `protocol_version`       |                            | Explicitly specifies the version of InfluxDB Line Protocol to use for sender. Valid options are:\u003cbr\u003e• protocol_version=1\u003cbr\u003e• protocol_version=2\u003cbr\u003e• protocol_version=3\u003cbr\u003e• protocol_version=auto (default, if unspecified) |\n\n### Protocol Version\n\nBehavior details:\n\n| Value  | Behavior                                                                                                                                                    |\n| ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| 1      | - Plain text serialization\u003cbr\u003e- Compatible with InfluxDB servers\u003cbr\u003e- No array type support                                                                 |\n| 2      | - Binary encoding for double arrays\u003cbr\u003e- Full support for array                                                                                             |\n| 3      | - Support for decimal                                                                                                                                       |\n| `auto` | - **HTTP/HTTPS**: Auto-detects server capability during handshake (supports version negotiation)\u003cbr\u003e- **TCP/TCPS**: Defaults to version 1 for compatibility |\n\n### net-questdb-client specific parameters\n\n| Name           | Default  | Description                                                                           |\n| -------------- | -------- | ------------------------------------------------------------------------------------- |\n| `own_socket`   | `true`   | Specifies whether the internal TCP data stream will own the underlying socket or not. |\n| `pool_timeout` | `120000` | Sets the idle timeout for HTTP connections in SocketsHttpHandler.                     |\n\n## Properties and methods\n\n| Name                                                                                                  | Returns         | Description                                                                |\n| ----------------------------------------------------------------------------------------------------- | --------------- | -------------------------------------------------------------------------- |\n| `Length`                                                                                              | `int`           | Current length in bytes of the buffer (not capacity!)                      |\n| `RowCount`                                                                                            | `int`           | Current row count of the buffer                                            |\n| `LastFlush`                                                                                           | `DateTime`      | Returns the UTC DateTime of the last flush sending data to the server.     |\n| `WithinTransaction`                                                                                   | `bool`          | Whether or not the Sender is currently in a transactional state.           |\n| `Transaction(ReadOnlySpan\u003cchar\u003e)`                                                                     | `ISender`       | Starts a new transaction for the table.                                    |\n| `Commit() / CommitAsync()`                                                                            | `void` / `Task` | Commits the current transaction.                                           |\n| `Rollback()`                                                                                          | `void`          | Rolls back the current unsent transaction.                                 |\n| `Table(ReadOnlySpan\u003cchar\u003e)`                                                                           | `ISender`       | Sets the table name for the next row.                                      |\n| `Column(ReadOnlySpan\u003cchar\u003e, ReadOnlySpan\u003cchar\u003e / string / long / double / DateTime / DateTimeOffset)` | `ISender`       | Specify column name and value                                              |\n| `Column(ReadOnlySpan\u003cchar\u003e, string? / long? / double? / DateTime? / DateTimeOffset?)`                 | `ISender`       | Specify column name and value                                              |\n| `Symbol(ReadOnlySpan\u003cchar\u003e, ReadOnlySpan\u003cchar\u003e / string)`                                             | `ISender`       | Specify a symbol column name and value                                     |\n| `At(DateTime / DateTimeOffset / long, CancellationToken)`                                             | `void`          | Designated timestamp for the line. May flush data according to auto-flush. |\n| `AtAsync(DateTime / DateTimeOffset / long, CancellationToken)`                                        | `ValueTask`     | Designated timestamp for the line. May flush data according to auto-flush. |\n| `AtNow(CancellationToken)`                                                                            | `void`          | Finishes line, leaving the QuestDB server to set the timestamp             |\n| `AtNowAsync(CancellationToken)`                                                                       | `ValueTask`     | Finishes line, leaving the QuestDB server to set the timestamp             |\n| `Send() / SendAsync()`                                                                                | `void` / `Task` | Send IO Buffers to QuestDB                                                 |\n| `CancelRow()`                                                                                         | `void`          | Cancels current row.                                                       |\n| `Truncate()`                                                                                          | `void`          | Trims empty buffers.                                                       |\n| `Clear()`                                                                                             | `void`          | Clears the sender's buffer.                                                |\n\n## Examples\n\n* [Basic](src/example-basic/Program.cs)\n* [Auth + TLS](src/example-auth-tls/Program.cs)\n\n## FAQ 🔮\n\n### Does this client perform both read and write operations?\n\nNo. This client is for writing data only. For querying, see\nthe [Query \u0026 SQL overview](https://questdb.io/docs/reference/sql/overview/)\n\n### I updated from version \u003c 2.0.0 and now have error `Could not load QuestDB.Secp256r1SignatureGenerator, please add a reference to assembly \"net-client-questdb-tcp-auth\\\"`\n\nSince Version 2.1.0, in order to use TCP authentication, an additional NuGet package is required [https://www.nuget.org/packages/net-questdb-client-tcp-auth/](https://www.nuget.org/packages/net-questdb-client-tcp-auth/).\nThis was changed to remove the dependency on `BouncyCastle.Cryptography` from the main library, since it was only required for TCP authentication.\n\n### Where do I report issues with the client?\n\nIf something is not working as expected, please open\nan [issue](https://github.com/questdb/net-questdb-client/issues/new).\n\n### Where can I learn more about QuestDB?\n\nYour best bet is to read the [documentation](https://questdb.io/docs/).\n\n### Where else can I go to get help?\n\nCome visit the [QuestDB community Slack](https://slack.questdb.io).\n\n## Contribute 🚀\n\nWe welcome contributors to the project. Before you begin, a couple notes...\n\n- Prior to opening a pull request, please create an issue\n  to [discuss the scope of your proposal](https://github.com/questdb/c-questdb-client/issues).\n\n- Please write simple code and concise documentation, when appropriate.\n\n## License 📗\n\n[Apache 2.0](https://github.com/questdb/net-questdb-client/tree/main?tab=Apache-2.0-1-ov-file)\n\nThank you to all the [contributors](https://github.com/questdb/net-questdb-client/graphs/contributors)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquestdb%2Fnet-questdb-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquestdb%2Fnet-questdb-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquestdb%2Fnet-questdb-client/lists"}