通过IOS应用程序中的coinbase-ios-SDK转换货币和转账

问题描述 投票:0回答:1

我正在我的应用程序中安装coinbase-ios-SDK并成功运行示例coinbase IOS App但我无法理解我如何转换货币并通过coinbase-ios-SDK转账?如何访问转账金额和货币兑换“API”?

我认为这是我们可以在我们的应用程序中访问它的API:

POST https://api.coinbase.com/v2/accounts/:account_id/transactions

这是我获得此API的链接:

https://developers.coinbase.com/api/v2#send-money

public func setup(with transaction: Transaction) {

    titleLabel.text = transaction.details?.title
    subtitleLabel.text = transaction.details?.subtitle
    amountLabel.text = transaction.amountString
    statusLabel.text = transaction.status

    if let amount = transaction.amount?.amount,
        let amountFloat = Float(amount), amountFloat > 0 {
        amountLabel.textColor = Colors.green
    } else {
        amountLabel.textColor = Colors.darkBlue
    }
    setupStatusIndicator(with: transaction.status)

}
ios swift currency coinbase-api
1个回答
0
投票

您共享的代码用于使用现有事务填充表视图单元格。如果您想进行自己的交易,您需要致电Coinbase.default.transactionResource.send(...)

如果您有更多问题,可以找到Coinbase SDK here的源代码。

© www.soinside.com 2019 - 2024. All rights reserved.