get_trade_feedeprecatedget_trade_fee

get_trade_fee coin (deprecated)

The get_trade_fee method returns the approximate amount of the miner fee that is paid per swap transaction.

This amount should be multiplied by 2 and deducted from the volume on buy/sell calls when the user is about to trade the entire balance of the selected coin. This aspect is currently under development.

Arguments

StructureTypeDescription
coinstringthe name of the coin for the requested trade fee

Response

StructureTypeDescription
coinstringthe fee is paid from the user’s balance of this coin. This coin name may differ from the requested coin. For example, ERC20 fees are paid by ETH (gas)
amountstring (numeric)the approximate fee amount to be paid per swap transaction in decimal representation
amount_ratrationalthe approximate fee amount to be paid per swap transaction, represented as a standard RationalValue object
amount_fractionfractionthe approximate fee amount to be paid per swap transaction, represented as a standard FractionalValue object

📌 Examples

Command (BTC)

POST get_trade_fee
{
  "userpass": "RPC_UserP@SSW0RD",
  "method": "get_trade_fee",
  "coin": "BTC"
}
Show Response

Response

{
  "result": {
    "amount": "0.00042049",
    "amount_fraction": {
      "denom": "100000000",
      "numer": "42049"
    },
    "amount_rat": [
      [1, [42049]],
      [1, [100000000]]
    ],
    "coin": "BTC"
  }
}

Command (ETH)

POST get_trade_fee
{
  "userpass": "RPC_UserP@SSW0RD",
  "method": "get_trade_fee",
  "coin": "ETH"
}
Show Response

Response

{
  "result": {
    "amount": "0.00594",
    "amount_fraction": {
      "denom": "50000",
      "numer": "297"
    },
    "amount_rat": [
      [1, [297]],
      [1, [50000]]
    ],
    "coin": "ETH"
  }
}

Command (ERC20)

POST get_trade_fee
{
  "userpass": "RPC_UserP@SSW0RD",
  "method": "get_trade_fee",
  "coin": "BAT"
}
Show Response

Response

{
  "result": {
    "amount": "0.00594",
    "amount_fraction": {
      "denom": "50000",
      "numer": "297"
    },
    "amount_rat": [
      [1, [297]],
      [1, [50000]]
    ],
    "coin": "ETH"
  }
}