Creating client
There are 2 clients available to interact with the FTX API, the FTXClient
and FTXSocketClient
.
Create a new rest client
var ftxClient = new FTXClient(new FTXClientOptions()
{
// Set options here for this client
});
Create a new socket client
var ftxSocketClient = new FTXSocketClient(new FTXSocketClientOptions()
{
// Set options here for this client
});
Different options are available to set on the clients, see this example
var ftxClient = new FTXClient(new FTXClientOptions()
{
ApiCredentials = new ApiCredentials("API-KEY", "API-SECRET"),
LogLevel = LogLevel.Trace,
RequestTimeout = TimeSpan.FromSeconds(60)
});
Alternatively, options can be provided before creating clients by using SetDefaultOptions
:
FTXClient.SetDefaultOptions(new FTXClientOptions{
// Set options here for all new clients
});
var ftxClient = new FTXClient();
More info on the specific options can be found in the CryptoExchange.Net documentation