Skip to content

Authority and Validation

Gabrielle Zhou edited this page Oct 31, 2018 · 2 revisions

get_required_fees

For each operation calculate the required fee in the specified asset type.

vector<fc::variant> graphene::app::database_api::get_required_fees(const vector<operation> &ops, asset_id_type id) const
  • Parameters:
ops: operation whose fee should be get
id: asset id which the fee should be calculated in

The following sample is to get the fee of limit_order_create operation.

  • Request:
{
    "jsonrpc": "2.0",
    "method": "get_required_fees",
    "params": [
        [
            [
                1,
                {
                    "fee": {
                        "amount": 0,
                        "asset_id": "1.3.0"
                    },
                    "seller": "1.2.37471",
                    "amount_to_sell": {
                        "amount": 100,
                        "asset_id": "1.3.0"
                    },
                    "min_to_receive": {
                        "amount": 1,
                        "asset_id": "1.3.2"
                    },
                    "expiration": "2018-10-25T08:58:48",
                    "fill_or_kill": false,
                    "extensions": []
                }
            ]
        ],
        "1.3.0"
    ],
    "id": 1
}
  • Response:
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": [{
        "amount": 55,
        "asset_id": "1.3.0"
    }]
}

开发者社区

了解CYBEX

文档中心

DEVELOPERS

GETTING STARTED

DOCUMENTATION

Clone this wiki locally