Node.js
const url = 'https://api.openfx.com/v3/fx/exposures';
const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'X-Request-Signature': '<api-key>'}
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
# sign_request mints a fresh 60s JWT AND the matching X-Request-Signature. See Authentication
url = 'https://api.openfx.com/v3/fx/exposures'
headers, _ = sign_request('GET', url)
exposure = requests.get(url, headers={**headers}).json()['data']HttpResponse<String> response = Unirest.get("https://api.openfx.com/v3/fx/exposures")
.header("Authorization", "Bearer <token>")
.header("X-Request-Signature", "<api-key>")
.asString();CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.openfx.com/v3/fx/exposures");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
headers = curl_slist_append(headers, "X-Request-Signature: <api-key>");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.openfx.com/v3/fx/exposures"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Request-Signature", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}# X-Request-Signature is an ES256 signature; compute it with one of the
# language helpers in /v3/authentication (shell signing is impractical).
curl https://api.openfx.com/v3/fx/exposures \
-H "Authorization: Bearer $OPENFX_JWT" \
-H "X-Request-Signature: $OPENFX_SIGNATURE"{
"data": {
"aggregate": {
"currency": "USD",
"limitAmount": "50000",
"usedAmount": "1200",
"availableAmount": "48800",
"usageBreakdown": {
"settlableNow": "800",
"settlableLater": "400"
}
},
"currencyExposures": [
{
"currency": "USD",
"exposureAmount": "1200",
"usageBreakdown": {
"settlableNow": {
"amount": "800"
},
"settlableLater": {
"amount": "400"
}
}
},
{
"currency": "MXN",
"exposureAmount": "1200",
"usageBreakdown": {
"settlableNow": {
"amount": "800"
},
"settlableLater": {
"amount": "400"
}
}
}
]
}
}
Get exposure summary
Returns the organization’s credit-line usage, aggregated and broken down by currency.
GET
/
v3
/
fx
/
exposures
Node.js
const url = 'https://api.openfx.com/v3/fx/exposures';
const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'X-Request-Signature': '<api-key>'}
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
# sign_request mints a fresh 60s JWT AND the matching X-Request-Signature. See Authentication
url = 'https://api.openfx.com/v3/fx/exposures'
headers, _ = sign_request('GET', url)
exposure = requests.get(url, headers={**headers}).json()['data']HttpResponse<String> response = Unirest.get("https://api.openfx.com/v3/fx/exposures")
.header("Authorization", "Bearer <token>")
.header("X-Request-Signature", "<api-key>")
.asString();CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.openfx.com/v3/fx/exposures");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
headers = curl_slist_append(headers, "X-Request-Signature: <api-key>");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.openfx.com/v3/fx/exposures"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Request-Signature", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}# X-Request-Signature is an ES256 signature; compute it with one of the
# language helpers in /v3/authentication (shell signing is impractical).
curl https://api.openfx.com/v3/fx/exposures \
-H "Authorization: Bearer $OPENFX_JWT" \
-H "X-Request-Signature: $OPENFX_SIGNATURE"{
"data": {
"aggregate": {
"currency": "USD",
"limitAmount": "50000",
"usedAmount": "1200",
"availableAmount": "48800",
"usageBreakdown": {
"settlableNow": "800",
"settlableLater": "400"
}
},
"currencyExposures": [
{
"currency": "USD",
"exposureAmount": "1200",
"usageBreakdown": {
"settlableNow": {
"amount": "800"
},
"settlableLater": {
"amount": "400"
}
}
},
{
"currency": "MXN",
"exposureAmount": "1200",
"usageBreakdown": {
"settlableNow": {
"amount": "800"
},
"settlableLater": {
"amount": "400"
}
}
}
]
}
}
Authorizations
ES256-signed JWT bearer token, single-use, 60-second TTL. See Authentication for how to mint one.
ES256 signature over the request, bound to the bearer JWT. Required on every v3 request. See Authentication → Request signing.
Headers
Optional, client-supplied correlation ID for this request. Echoed verbatim on the response when supplied; the response omits it when the request did not supply one. Distinct from X-Trace-Id (server-generated, always present). See Metadata & tracing.
Example:
"my-req-abc-123"
Response
Exposure summary.
The organization's credit exposure: the aggregate credit-line usage and the breakdown by currency and settlement stage.
Show child attributes
Show child attributes
⌘I