-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathProgram.cs
More file actions
28 lines (21 loc) · 801 Bytes
/
Program.cs
File metadata and controls
28 lines (21 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using QuestDB;
// Demonstrates TCPS connection against QuestDB Enterprise
// Disabling tls verification. Note this is not a best practice in production
using var sender =
Sender.New(
"tcps::addr=localhost:9009;tls_verify=unsafe_off;username=admin;token=NgdiOWDoQNUP18WOnb1xkkEG5TzPYMda5SiUOvT1K0U=;");
// See: https://questdb.io/docs/operations/rbac/#authentication
await sender.Table("trades")
.Symbol("symbol", "ETH-USD")
.Symbol("side", "sell")
.Column("price", 2615.54)
.Column("amount", 0.00044)
.AtAsync(DateTime.UtcNow);
await sender.Table("trades")
.Symbol("symbol", "BTC-USD")
.Symbol("side", "sell")
.Column("price", 39269.98)
.Column("amount", 0.001)
.AtAsync(DateTime.UtcNow);
await sender.SendAsync();