Class ScriptApi
- Namespace
- WhalesSecret.ScriptApiLib
- Assembly
- WhalesSecret.ScriptApiLib.dll
Trade script API with script environment.
public class ScriptApi : IAsyncDisposable
- Inheritance
-
ScriptApi
- Implements
- Inherited Members
- Extension Methods
Methods
- ConnectAsync(ExchangeMarket, ConnectionOptions?)
Connects to
exchangeMarket
and does appropriate API initialization to allow fully-fledged trading.If the logged in WhalesSecret account is already connected to the exchange, the operation succeeds immediately.
If the connection is lost, an automatic reconnect is attempted.
- CreateAsync(CancellationToken)
Creates a new instance of the script API with initialized script environment with default create options.
- CreateAsync(CreateOptions, CancellationToken)
Creates a new instance of the script API with initialized script environment.
- DisposeAsync()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
- DisposeCoreAsync()
Frees managed resources used by the object.
- InitializeMarketAsync(ExchangeMarket, CancellationToken)
Initializes the given exchange market.
- SetCredentials(IApiIdentity)
Sets credentials for the API. It's only possible to set credentials for each exchange market once.
- ToString()
Returns a string that represents the current object.