-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
I was thinking that it would be nice to have a method that returns the fees given an order amount. Something like:
const price = 150
const pair = 'ETHUSD'
const orderAmount = 10
const fees =getBuyFees(orderAmount, pair, price)
It would return the fees to buy 10 ETH at the ETH/USD
ticker price of 150 USD per 1 ETH so that an user could then calculate the total cost of his order in USD as price * orderAmount + fees
.
Similarly, there should be another method like:
const price = 150
const pair = 'ETHUSD'
const orderAmount = 10
const fees =getSellFees(orderAmount, pair, price)
It returns the fees to sell 10 ETH, so that the revenue in USD would be orderAmount * price - fees
What do you think?
Metadata
Metadata
Assignees
Labels
No labels