Closed yellowwidget closed 3 years ago
This will fix it.
namespace CoinbasePro.Services.StablecoinConversions
{
public class StablecoinConversion
{
[JsonProperty("from", NullValueHandling = NullValueHandling.Ignore)]
public string FromCurrency { get; set; }
[JsonProperty("to", NullValueHandling = NullValueHandling.Ignore)]
public string ToCurrency { get; set; }
[JsonProperty("amount", NullValueHandling = NullValueHandling.Ignore)]
public decimal Amount { get; set; }
}
}
hey @yellowwidget thanks for reporting. This is fixed with the latest version, you can update through NuGet. let me know if you run into any other issues. https://github.com/dougdellolio/coinbasepro-csharp/commit/1f6e13b393af8994a2251af024121ba8222bc04b
StablecoinConversionsService.CreateConversion("USD", "USDC", 10000.00);
fails with an exception of "from currency is required".
From CoinBase API documentation it looks like this should work { "from": "USD", "to": "USDC", "amount": "10000.00" }
So not sure why this is saying it doesn't recognize "USD".