Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

152
Views
Javascript Crypto to Fiat Fee Calculator by Rate

So I'm trying to make a platform that takes for example 2% fee for converting Fiat to Crypto or vice versa, and want to calculate the fees for both options, when user wants to convert from crypto to fiat, to show him the value in fiat, also when it wants to convert fiat to crypto to show the value in fiat.

Example: 1BTC = x amount and the fee will be $29

// The pairs are all against USD , e.g. 1 BTC = 40,000$
export const cryptocurrencies = [
  {
    Name: 'Bitcoin',
    Symbol: 'BTC',
    Rate: 40000,
  },
  {
    Name: 'Tether',
    Symbol: 'USDT',
    Rate: 1,
  },
];

export const fiat = [
  {
    Name: 'US Dollar',
    Symbol: 'USD',
    Rate: 1,
  },
  {
    Name: 'Euro',
    Symbol: 'EUR',
    Rate: 0.9258, // USD to EUR
  },
];

I have no idea on how this can be done.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!