CryptoLab 1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package CryptoLab --version 1.0.0
NuGet\Install-Package CryptoLab -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CryptoLab" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CryptoLab --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CryptoLab, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CryptoLab as a Cake Addin #addin nuget:?package=CryptoLab&version=1.0.0 // Install CryptoLab as a Cake Tool #tool nuget:?package=CryptoLab&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Libraries Python for CryptoLab
Website: https://www.crypto-lab.io
Documentation: https://www.crypto-lab.io/documentation
Swagger: https://www.crypto-lab.io/swagger
.NET
Install library from nuget
Sample to use it to replay data
using CryptoLab;
// Show the version lib
Console.WriteLine("Verison: " + CryptoLab.CryptoLabAPI.version().ToString());
// Init the client
CryptoLabAPI client = new CryptoLabAPI("YOUR_APPI_KEY", true);
// Get list of exchanges available and displayt it
List<Exchange> exchanges = client.get_exchanges();
foreach(Exchange exchange in exchanges)
Console.WriteLine(exchange.exchange);
// Get list of markets available for binance
List<Market> markets = client.get_markets(new Exchange { exchange = "binance" });
Console.WriteLine(markets.Count + " markets available for Binance");
foreach (Market market in markets)
Console.WriteLine("Market " + market.market + ": data available from " + market.first_record + " to " + market.last_record + ". Total size " + ConvertBytes(market.bytes));
// Init the replay data for
client.init_replay(callback, new Exchange { exchange = "binance" }, new Market { market = "btc_usdt" }, "2022-05-07", "2022-06-07", false);
client.start_replay();
Console.WriteLine("Strating replay for Binance btc_usdt (downloading data in " + client.get_cache_directory() + ". Could be long)");
// Callback on event (trade and orderbook)
void callback(Trade trade)
{
/* Add your trading algorithm here */
if(trade != null) // If you stop (not definitivly) the replay, the callback function is called but the trade is null
Console.WriteLine("Trade id: " + trade.trade_id);
// Show error (nothing if no error)
foreach (string error in client.get_errors())
Console.WriteLine("Error: " + error);
}
Output:
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. net9.0 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- CsvHelper (>= 33.0.1)
- RestSharp (>= 112.0.0)
- SharpZipLib (>= 1.4.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.