-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Airdrops API status field invalid conversion #20
Comments
Fix for that issue: https://github.com/OlegOLK/FTX.Net/tree/fix-airdrop-status-mapping
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: