https://api.snaptrade.com/api/v1/currencies/rates/{currencyPair}
Returns an Exchange Rate Pair object for the specified Currency Pair.
currencyPair
string
required
A currency pair based on currency code for example, {CAD-USD}
1import { Snaptrade } from "snaptrade-typescript-sdk";2 3const snaptrade = new Snaptrade({4 clientId: "PARTNER_CLIENT_ID",5 consumerKey: "CONSUMER_KEY",6});7 8const response =9 await snaptrade.referenceData.getCurrencyExchangeRatePair(10 { currencyPair: "CURRENCY_PAIR" },11 );12console.log(response.data);
object
The exchange rate of a pair of currencies
src
Describes a currency object.
id
string (format: uuid)
Unique identifier for the currency. This is the UUID used to reference the currency in SnapTrade.
code
The ISO-4217 currency code for the currency.
name
A human-friendly name of the currency.
dst
exchange_rate
number
1{2 "src": {3 "id": "87b24961-b51e-4db8-9226-f198f6518a89",4 "code": "USD",5 "name": "US Dollar"6 },7 "dst": {8 "id": "87b24961-b51e-4db8-9226-f198f6518a89",9 "code": "USD",10 "name": "US Dollar"11 },12 "exchange_rate": 1.3213}