Are a Ripple Gateway’s charges accessible through the rippled API?

Seems to be like the one payment accessible through rippled
is the Switch Price which is accessible through the account_info
rippled API methodology.
It returns a price in elements per billion so it is advisable to run a small formulation to get the share.
Utilizing Bitstamp for example, their webpage says they’ve a 0.2% payment:
https://www.bitstamp.web/fee-schedule/
XRP IOU
0.20% payment for IOUs transferred between accounts.
The account_info
API will return the Account Root object with the TransferRate
property set to 1002000000
.
To transform this to 0.2%, use the next in Go which returns 0.002
:
func TransferRatePercent(ratePPB int64) float64 {
return (float64(ratePPB) / 1000000000.0) - 1.0
}
This is the total account_info
response for Bitstamp:
{
"end result": {
"account_data": {
"Account": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"Steadiness": "6545061077106",
"Area": "6269747374616D702E6E6574",
"EmailHash": "5B33B93C7FFE384D53450FC666BB11FB",
"Flags": 9043968,
"LedgerEntryType": "AccountRoot",
"OwnerCount": 397,
"PreviousTxnID": "E0A37673D0290324554955361FB6F0081375F9339FEBE6C0A8C15031F9F86A1B",
"PreviousTxnLgrSeq": 63533472,
"Sequence": 4477,
"TransferRate": 1002000000,
"index": "B7D526FDDF9E3B3F95C3DC97C353065B0482302500BBB8051A5C090B596C6133",
"urlgravatar": "http://www.gravatar.com/avatar/5b33b93c7ffe384d53450fc666bb11fb"
},
"ledger_current_index": 63533609,
"queue_data": {
"txn_count": 0
},
"standing": "success",
"validated": false
}
}
Be aware, when there aren’t any switch charges, like for Coinex, the TransferRate
property will not be current within the Account Root object.