简体   繁体   中英

With the Gemini Python API, how do I figure out fees for a completed transaction?

I'm using the Python private client for Gemini -- https://github.com/mtusman/gemini-python . I place my limit orders like so...

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

This returns a hash with an "Id" key, which I can later use to query the status of an order...

status = private_client.status_of_order(order_id=check)

which returns a hash that looks like the below

{'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'}

How can I figure out what fees I was charged for the completed transaction? It doesn't appear I can figure it out from the status above, but I also don't see an API call that would provide this information.

https://docs.gemini.com/rest-api/#get-trade-volume; this might be helpful.

Otherwise, you might be able to implement a function that calculates your fee based on amount traded * the fee that corresponds to your volume, with the fees being laid out here: https://www.gemini.com/fees/api-fee-schedule#section-api-fee-schedule

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM