Menu
Docs
Feedback
Login
You are viewing a section of Superface that will be
deprecated in Q4 2023
. Until then, you can continue to use it as you have before but we recommend that you migrate to our latest version soon. For more details visit
superface.ai/docs/migrate
.
Exchange Rate
crypto/exchange-rate@1.0.1
1 provider
Get Exchange Rate
GetExchangeRate
Get exchange rate between two currencies
Input
From
To
Result
Rate
Integrate
1.
Choose a provider
Mock implementation
binance
Request a missing provider
2.
Use
GetExchangeRate
with
mock
in your code
Below instructions are for our Node.js SDK.
Use OneService for other languages.
npm
i
@superfaceai/one-sdk
Copy
Copied!
Copy
Copied!
Structure details
Input (object)
from
required
Code of the source currency, e.g.: "ETH"
string
to
required
Code of the target currency, e.g.: "BTC"
string
Example
Copy
Copied!
Result (object)
rate
required
Exchange rate, e.g.: "0.06249100"
string
Example
Copy
Copied!
Implementation details
Provider
mock
Use case
GetExchangeRate
Author
@superface
Source
View source
Verified