Reference Data

Get currency exchange rates

get
https://api.snaptrade.com/api/v1/currencies/rates

Returns a list of all Exchange Rate Pairs for all supported Currencies.

Execute an API Request

No request parameters.
Authorization
Request
Installation
$
npm install snaptrade-typescript-sdk
1
import { Snaptrade } from "snaptrade-typescript-sdk";
2
3
const snaptrade = new Snaptrade({
4
clientId: "PARTNER_CLIENT_ID",
5
consumerKey: "CONSUMER_KEY",
6
});
7
8
const response =
9
await snaptrade.referenceData.listAllCurrenciesRates();
10
console.log(response.data);

Response fields

array of objects
object

The exchange rate of a pair of currencies

1
[
2
{
3
"src": {
4
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
5
"code": "USD",
6
"name": "US Dollar"
7
},
8
"dst": {
9
"id": "87b24961-b51e-4db8-9226-f198f6518a89",
10
"code": "USD",
11
"name": "US Dollar"
12
},
13
"exchange_rate": 1.32
14
}
15
]