如何使用C#从CoinPayments获取转换数据?

时间:2019-06-15 10:39:27

标签: c#

我正在使用coinpayments.net进行转帐,我想在我的控制台C#应用程序中访问它们。我有一个名为CoinPayment的框架,但它只有3个功能,我听不懂。我要检查的是给定的钱包地址是否向我的钱包地址发送了DOGE硬币。如何使用此框架或经典的发布方法来做到这一点?我还阅读了coinpayment网站上的文档,但仍未获取。

private static readonly CoinApi api = new CoinApi("myPUBLICAPIKEY", "myPRIVATEAPIKEY");

private async static void WithDraw()
{
    SendTransaction transaction = new SendTransaction();
    transaction.Amount = 24;
    transaction.Currency = "DOGE";
    transaction.Currency2 = "DOGE";
    var result = await api.TransferAsync(transaction);
}

private async static void Receive()
{
    ReceiveTransaction transaction = new ReceiveTransaction();
    transaction.Amount = 200;
    transaction.BuyerEmail = "*****@gmail.com";
    transaction.BuyerName = "*****";
    transaction.Currency1 = "DOGE";
    transaction.Currency2 = "DOGE";
    var result = await api.ReceiveAsync(transaction);
}

这两个动作正在起作用,WithDraw()向我发送错误消息,提示我没有那么多的DOGE,这是正确的。 Receive()方法将接收请求发送到该站点,我可以在仪表板中看到该站点,但是我想访问我的钱包地址和特定用户地址之间的特定转换。

0 个答案:

没有答案