Giter Club home page Giter Club logo

Comments (8)

unclezoro avatar unclezoro commented on August 27, 2024

hi, for now, there is no fee message in the transaction. If the transaction type is trade(like createOrder), you can find fee in trade api, for other kind of transaction you need get fee parameters from /api/v1/fees, and calculate the fee.

from go-sdk.

chainwhisper avatar chainwhisper commented on August 27, 2024

I use RPC query transaction /tx?hash=_, how to get the transaction fee? i need to know the fee of this transaction

trade fee可以从http api 查到: https://dex.binance.org/api/v1/trades?symbol=UGAS-B0C_BNB&start=1562544000000&end=1562630400000&total=1&offset=0&limit=1000

photo_2019-07-16 10 31 08

from go-sdk.

crossle avatar crossle commented on August 27, 2024

If the fee changed, how to know the history transfer transaction fee via RPC?

from go-sdk.

chainwhisper avatar chainwhisper commented on August 27, 2024

If the fee changed, how to know the history transfer transaction fee via RPC?

You can only get the current fee by querying abci interface.

The fee history is recorded in the fee change proposals.

from go-sdk.

unclezoro avatar unclezoro commented on August 27, 2024

You still have an option:
use api

https://explorer.binance.org/api/v1/tx?txHash=0E50ABF5DAA042CBB23A118EF73DD1DD7F1BCED5457EB9E2281D89A25F30CA55

In that API, you will get a fee message.
But this is not an official API, may not stable.

from go-sdk.

crossle avatar crossle commented on August 27, 2024

It's not a good choice use the explorer.binance.org, it's should query from RPC, i think it's should record on blockchain.
I know the query abci can get the current fee, or fee change proposals, it's hard to sure how much fee for this transaction.

from go-sdk.

unclezoro avatar unclezoro commented on August 27, 2024

@crossle you request are reasonable, I also discuss with other members, we may wrap the rest api rather than RPC in future. It would be a breaking change for RPC to support fee info which beyond what an sdk could do, would you clarify your scene and make an issue in https://github.com/binance-chain/BEPs, we could have a serious discussion there.

from go-sdk.

crossle avatar crossle commented on August 27, 2024

Thanks your reply.
Plz don't breaking RPC, RPC should have all feature, it's low level API, it's just run full node, no any other REST server. REST API is a high level API, it should just a wrapper for RPC, it's just convenience for some developers, but it's dependence REST server, we have to run REST server, it's hard to maintenance.
If no REST API, it's ok, the developers can use RPC, If no RPC api, it's very bad, many developers don't like the REST API, it's hard to satisfy almost developers.

from go-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.