You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
When using FTXClient.GetAirdropsAsync method according to the official FTX documentation you get in the return response object that contains status property (https://docs.ftx.com/#get-airdrops). Unfortunately on the left side of the documentation, there are two possible values:
one of "confirmed" or "pending"
But the thing is on the right side you can clearly see that the status value is "complete".
This invalid mapping results in the "pending" status for every single airdrop entity even if it has the status "complete".
To reproduce you need to have an account with some airdrops on it and then
var client = new FTXClient(new FTXClientOptions(){ HttpClient = _client, ApiCredentials = new ApiCredentials(wallet.ApiKey, wallet.ApiSecret), LogLevel = LogLevel.Debug, LogWriters = new List<ILogger> { _logger } }); var airdrops = await client.GetAirdropsAsync(startTime: chunk.from, endTime: chunk.to).ConfigureAwait(false); airdrops.Data.All(x=> x.Status == AirdropStatus.Pending).Should().BeTrue();
Expected to have
airdrops.Data.All(x=> x.Status == AirdropStatus.Pending).Should().BeFalse(); // and be "complete"
The text was updated successfully, but these errors were encountered:
Fix for that issue: https://github.com/OlegOLK/FTX.Net/tree/fix-airdrop-status-mapping
The only thing with that fix is ideally naming for AirdropStatus.Confirmed should be changed to AirdropStatus.complete but this will result in breaking change. So I can prepare two branches:
first with updating only string property value for correct mapping
second branch with the renaming of all dependent code. But it should be released I think with an increased major version of the package.
When using FTXClient.GetAirdropsAsync method according to the official FTX documentation you get in the return response object that contains status property (https://docs.ftx.com/#get-airdrops). Unfortunately on the left side of the documentation, there are two possible values:
one of "confirmed" or "pending"
But the thing is on the right side you can clearly see that the status value is "complete".
This invalid mapping results in the "pending" status for every single airdrop entity even if it has the status "complete".
To reproduce you need to have an account with some airdrops on it and then
var client = new FTXClient(new FTXClientOptions(){
HttpClient = _client,
ApiCredentials = new ApiCredentials(wallet.ApiKey, wallet.ApiSecret),
LogLevel = LogLevel.Debug,
LogWriters = new List<ILogger> { _logger } });
var airdrops = await client.GetAirdropsAsync(startTime: chunk.from, endTime: chunk.to).ConfigureAwait(false);
airdrops.Data.All(x=> x.Status == AirdropStatus.Pending).Should().BeTrue();
Expected to have
airdrops.Data.All(x=> x.Status == AirdropStatus.Pending).Should().BeFalse(); // and be "complete"
The text was updated successfully, but these errors were encountered: