# TransferzeroSdk.CurrencyInfoApi
All URIs are relative to *https://api-sandbox.transferzero.com/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**infoCurrencies**](CurrencyInfoApi.md#infoCurrencies) | **GET** /info/currencies | Getting a list of possible requested currencies
[**infoCurrenciesIn**](CurrencyInfoApi.md#infoCurrenciesIn) | **GET** /info/currencies/in | Getting a list of possible input currencies
[**infoCurrenciesOut**](CurrencyInfoApi.md#infoCurrenciesOut) | **GET** /info/currencies/out | Getting a list of possible output currencies
# **infoCurrencies**
> CurrencyListResponse infoCurrencies()
Getting a list of possible requested currencies
Fetches a list of currencies available to use in other API requests. Usually the 3-character alpha ISO 4217 currency code (eg. USD) is used as the identifier.
### Example
```javascript
import { CurrencyInfoApi } from 'transferzero-sdk';
// Configure API key authorization
const apiClient = new ApiClient();
apiClient.apiKey = '';
apiClient.apiSecret = '';
apiClient.basePath = 'https://api-sandbox.transferzero.com/v1';
let apiInstance = new CurrencyInfoApi(apiClient);
apiInstance.infoCurrencies().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
if (error.isValidationError) {
let result = error.getResponseObject();
console.log(result);
console.error("WARN: Validation error occurred when calling the endpoint");
} else {
console.error("Exception when calling CurrencyInfoApi#infoCurrencies");
throw error;
}
});
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**CurrencyListResponse**](CurrencyListResponse.md)
### Authorization
You can set the API Key and Secret by passing a config object when creating an ApiClient:
```js
const apiClient = new ApiClient({
apiKey: '',
apiSecret: '',
basePath: 'https://api-sandbox.transferzero.com/v1'
});
```
Or by setting the properties on an ApiClient instance:
```js
const apiClient = new ApiClient();
apiClient.apiKey = '';
apiClient.apiSecret = '';
apiClient.basePath = 'https://api-sandbox.transferzero.com/v1';
```
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
# **infoCurrenciesIn**
> CurrencyExchangeListResponse infoCurrenciesIn(opts)
Getting a list of possible input currencies
Fetches a list of currencies available to use as the input currency in other API requests. Usually the 3-character alpha ISO 4217 currency code (eg. USD) is used as the identifier. Use this endpoint to determine the current exchange rate from a specific input currency to any output currency that's available.
### Example
```javascript
import { CurrencyInfoApi } from 'transferzero-sdk';
// Configure API key authorization
const apiClient = new ApiClient();
apiClient.apiKey = '';
apiClient.apiSecret = '';
apiClient.basePath = 'https://api-sandbox.transferzero.com/v1';
let apiInstance = new CurrencyInfoApi(apiClient);
let opts = {
'senderId': null // String | Allows the scoping of the results by `sender_id` (optional). Example: `/v1/info/currencies/in?sender_id=26ec8517-2f0d-48c0-b74f-0bccb9ab3a87`
};
apiInstance.infoCurrenciesIn(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
if (error.isValidationError) {
let result = error.getResponseObject();
console.log(result);
console.error("WARN: Validation error occurred when calling the endpoint");
} else {
console.error("Exception when calling CurrencyInfoApi#infoCurrenciesIn");
throw error;
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**senderId** | [**String**](.md)| Allows the scoping of the results by `sender_id` (optional). Example: `/v1/info/currencies/in?sender_id=26ec8517-2f0d-48c0-b74f-0bccb9ab3a87` | [optional]
### Return type
[**CurrencyExchangeListResponse**](CurrencyExchangeListResponse.md)
### Authorization
You can set the API Key and Secret by passing a config object when creating an ApiClient:
```js
const apiClient = new ApiClient({
apiKey: '',
apiSecret: '',
basePath: 'https://api-sandbox.transferzero.com/v1'
});
```
Or by setting the properties on an ApiClient instance:
```js
const apiClient = new ApiClient();
apiClient.apiKey = '';
apiClient.apiSecret = '';
apiClient.basePath = 'https://api-sandbox.transferzero.com/v1';
```
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
# **infoCurrenciesOut**
> CurrencyExchangeListResponse infoCurrenciesOut(opts)
Getting a list of possible output currencies
Fetches a list of currencies available to use as the output currency and their exchange rates against the available input currencies. Usually the 3-character alpha ISO 4217 currency code (eg. USD) is used as the identifier.
### Example
```javascript
import { CurrencyInfoApi } from 'transferzero-sdk';
// Configure API key authorization
const apiClient = new ApiClient();
apiClient.apiKey = '';
apiClient.apiSecret = '';
apiClient.basePath = 'https://api-sandbox.transferzero.com/v1';
let apiInstance = new CurrencyInfoApi(apiClient);
let opts = {
'senderId': null // String | Allows the scoping of the results by `sender_id` (optional). Example: `/v1/info/currencies/out?sender_id=26ec8517-2f0d-48c0-b74f-0bccb9ab3a87`
};
apiInstance.infoCurrenciesOut(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
if (error.isValidationError) {
let result = error.getResponseObject();
console.log(result);
console.error("WARN: Validation error occurred when calling the endpoint");
} else {
console.error("Exception when calling CurrencyInfoApi#infoCurrenciesOut");
throw error;
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**senderId** | [**String**](.md)| Allows the scoping of the results by `sender_id` (optional). Example: `/v1/info/currencies/out?sender_id=26ec8517-2f0d-48c0-b74f-0bccb9ab3a87` | [optional]
### Return type
[**CurrencyExchangeListResponse**](CurrencyExchangeListResponse.md)
### Authorization
You can set the API Key and Secret by passing a config object when creating an ApiClient:
```js
const apiClient = new ApiClient({
apiKey: '',
apiSecret: '',
basePath: 'https://api-sandbox.transferzero.com/v1'
});
```
Or by setting the properties on an ApiClient instance:
```js
const apiClient = new ApiClient();
apiClient.apiKey = '';
apiClient.apiSecret = '';
apiClient.basePath = 'https://api-sandbox.transferzero.com/v1';
```
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json