Dexie.Space.Net
2.1.4
dotnet add package Dexie.Space.Net --version 2.1.4
NuGet\Install-Package Dexie.Space.Net -Version 2.1.4
<PackageReference Include="Dexie.Space.Net" Version="2.1.4" />
paket add Dexie.Space.Net --version 2.1.4
#r "nuget: Dexie.Space.Net, 2.1.4"
// Install Dexie.Space.Net as a Cake Addin #addin nuget:?package=Dexie.Space.Net&version=2.1.4 // Install Dexie.Space.Net as a Cake Tool #tool nuget:?package=Dexie.Space.Net&version=2.1.4
Dexie.Space.Net
This is a C# library for accessing the dexie.space API.
NOTE: Currently only the offers interface is implemented.
Quickstart Guide
Install the package from NuGet by running Install-Package Dexie.Space.Net in the Package Manager Console in Visual Studio.
-
- Call the Offers_Client.SendCustomMessage_Async method to send a custom message to the API:
string endpoint = ...;
string jsonPayload = ...;
string response = await Offers_Client.SendCustomMessage_Async(endpoint, jsonPayload);
-
- Call any method in Offer_Client to use predefined metods:
string offer = "offer1qqz83wcsltt6wcmqvpsxygqqwc7hynr6hum6e0mnf72sn7uvvkpt68eyumkhqa9qmxpk8znenf...";
PostOffer_Response result = PostOffer_Sync(offer);
Icons
You can find the official kit here: https://github.com/dexie-space/dexie-kit
Configuration
The following properties of the Offers_Client class can be configured to customize the behavior of the library:
Offers_Client.UseTestnet
: Specifies whether the testnet or mainnet endpoint should be used. The default value is false (mainnet).
Offers_Client.ProdURI
: The default API endpoint. The default value is "https://api.dexie.space/v1/".
Offers_Client.TestURI
: The API endpoint for the testnet. The default value is "https://api-testnet.dexie.space/v1/".
Offers_Client.RateLimitTimeSpan
: The timespan in which the maximum number of requests is counted. The default value is TimeSpan.FromSeconds(10), allowing for 50 requests per 10 seconds.
Offers_Client.RateLimitMaxRequestCount
: The maximum number of requests allowed within the RateLimitTimeSpan. The default value is 49 requests.
Error Handling
Errors may occur during the communication with the API. In such cases, the Offers_Client.SendCustomMessage_Async method will throw an exception. You can catch and handle these exceptions in your code.
If the server is reachable but there is another error, the success variable in the response will be "false".
Rate Limiting
The library implements rate limiting to prevent exceeding the API rate limit. The rate limit is set to 49 requests per 10 seconds by default, but can be configured using the Offers_Client.RateLimitTimeSpan and Offers_Client.RateLimitMaxRequestCount properties. Please note that 50 requests per 10 seconds is the configured rate limit by decie.space, so it is not recommended to change the default setting. If the configured rate limit is reached, the Offers_Client.RatelimitReached property will be set to true and further requests will wait until the rate limit has been reset.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.1.4 | 136 | 1/30/2024 |
1.8.2 | 167 | 7/12/2023 |
1.1.0 | 254 | 2/10/2023 |
1.0.6 | 245 | 2/10/2023 |
1.0.4.5 | 258 | 2/10/2023 |
1.0.4.4 | 256 | 2/10/2023 |
1.0.4.3 | 250 | 2/10/2023 |
1.0.4.2 | 252 | 2/10/2023 |
1.0.4.1 | 252 | 2/10/2023 |
1.0.4 | 251 | 2/10/2023 |
1.0.3 | 237 | 2/10/2023 |
1.0.2 | 263 | 2/10/2023 |
1.0.1 | 242 | 2/10/2023 |
1.0.0 | 260 | 2/9/2023 |
2.1.4
- improved resiliency for dexie.Space inavailabilities. Please ensure response success boolean
- Added native Support for .Net 8.0
1.8.2
- improved Get_Offer & Get_Offers
- improved unit tests
- Sync code should now throw the proper exception instead of an aggregate exception