【问题标题】:With the Gemini Python API, how do I figure out fees for a completed transaction?使用 Gemini Python API,我如何计算已完成交易的费用?
【发布时间】:2022-06-22 00:37:33
【问题描述】:

我正在为 Gemini 使用 Python 私人客户端——https://github.com/mtusman/gemini-python。我这样下限价单...

order=private_client.new_order(symbol=formatted_name,
                          side=order_type,
                          price=str(fiat_price),
                          amount=str(amount)
                        )

这会返回一个带有“Id”键的哈希,我以后可以用它来查询订单的状态...

status = private_client.status_of_order(order_id=check)

返回如下所示的哈希

{'order_id': '1277897568', 'id': '1277897568', 'symbol': 'ethusd', 'exchange': 'gemini', 'avg_execution_price': '4347.51', 'side': 'buy', 'type': 'exchange limit', 'timestamp': '1638845825', 'timestampms': 1638845825850, 'is_live': False, 'is_cancelled': False, 'is_hidden': False, 'was_forced': False, 'executed_amount': '0.23', 'options': ['immediate-or-cancel'], 'price': '4347.51', 'original_amount': '0.23', 'remaining_amount': '0'}

我怎样才能知道我为完成的交易收取了哪些费用?似乎我无法从上面的状态中弄清楚,但我也没有看到可以提供此信息的 API 调用。

【问题讨论】:

    标签: python-3.x cryptocurrency gemini


    【解决方案1】:

    https://docs.gemini.com/rest-api/#get-trade-volume; 这可能会有所帮助。

    否则,您也许可以实现一个函数,根据交易量 * 与您的交易量对应的费用计算您的费用,费用在此处列出:https://www.gemini.com/fees/api-fee-schedule#section-api-fee-schedule

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-06-09
      • 1970-01-01
      • 1970-01-01
      • 2017-10-05
      • 1970-01-01
      • 2015-07-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多