【问题标题】:How can I set a deposit tag for XRP transactions using the Coinbase API?如何使用 Coinbase API 为 XRP 交易设置存款标签?
【发布时间】:2019-03-07 23:52:35
【问题描述】:

我正在使用 Coinbase API 并尝试将 XRP 从我的 Coinbase 钱包发送到另一个帐户(Coinbase 之外)。 Coinbase 发送 API (https://developers.coinbase.com/api/v2#send-money) 允许我设置目标地址,但无法设置目标标签,这是 XRP 传输所必需的。

如何设置目标标签?

【问题讨论】:

    标签: coinbase-api


    【解决方案1】:

    Coinbase Pro API 有针对其平台的文​​档,提示可能的解决方案 (https://docs.pro.coinbase.com/?r=1#crypto)。感兴趣的两个参数是destination_tag 和no_destination_tag。所以如果你想用 Python 发送 XRP,你可以这样说:

    client.send_money(account_id = <account-id>,
                      to = <destination-address>,
                      amount = <amount>,
                      currency = 'XRP',
                      destination_tag = <destination-tag>,
                      no_destination_tag = False)
    

    如果您不想使用目标标签,您可以省略destination_tag 参数并将no_destination_tag 设置为True。

    【讨论】:

      【解决方案2】:

      这非常晚,但认为它对其他偶然发现此线程的人很有用。

      我刚刚测试了将 deposit_tag 放入到 Coinbase 的 API(不是 Coinbase Pro)的 POST 请求中,它成功地放置了 deposit 标签。

      如果你不指定存款标签,Coinbase 也不允许你发送 XRP,这很方便。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2023-03-14
        • 1970-01-01
        • 1970-01-01
        • 2018-06-09
        • 2016-10-13
        • 2018-09-04
        • 2021-08-12
        • 2023-02-17
        相关资源
        最近更新 更多