CONNECT APP
Build with UniRateAPI
Developer Tools
- API key
MCP
Give your agent UniRateAPI tools
Every UniRateAPI action is exposed as an MCP tool on Pipedream's remote server. Point a client at it with your end user's ID and Connect resolves that user's UniRateAPI account for each tool call — you store no tokens.
// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "unirateapi",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// e.g. run Convert Currency:
const result = await mcp.callTool({
name: "unirateapi-convert-currency",
arguments: {
from: "From",
to: "To",
},
})# access_token: mint a short-lived token with the Connect SDK — see the MCP guide
headers = {
"Authorization": f"Bearer {access_token}",
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", # any stable ID for this user in your system
"x-pd-app-slug": "unirateapi",
}
async with streamablehttp_client("https://remote.mcp.pipedream.net/v3", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
# e.g. run Convert Currency:
result = await session.call_tool("unirateapi-convert-currency", {
"from": "From",
"to": "To",
})API PROXY
Call the UniRateAPI API directly
For an endpoint with no pre-built tool, the Connect proxy forwards your request to the UniRateAPI API with the connected user's credentials attached. You store no tokens and write no refresh logic.
const resp = await pd.proxy.get({
externalUserId: "{external_user_id}", // any stable ID for this user in your system
accountId: "apn_xxxxxxx",
url: "https://api.unirateapi.com/api/currencies",
})
// Any allowed UniRateAPI endpoint works here. Pipedream attaches the
// connected account's credentials to the outgoing request.# The path segment is the target URL, URL-safe base64 encoded:
# https://api.unirateapi.com/api/currencies
curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkudW5pcmF0ZWFwaS5jb20vYXBpL2N1cnJlbmNpZXM?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
-H "Authorization: Bearer {access_token}" \
-H "x-pd-environment: production"SDK
Run UniRateAPI actions from your backend
Connect a user's UniRateAPI account once, then run Convert Currency on their behalf from your own code — TypeScript, Python, or plain HTTP.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "unirateapi-convert-currency",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
unirateapi: { authProvisionId: "apn_xxxxxxx" },
from: "From",
to: "To",
},
})from pipedream import Pipedream
pd = Pipedream(
client_id="{oauth_client_id}",
client_secret="{oauth_client_secret}",
project_id="{project_id}",
project_environment="production",
)
result = pd.actions.run(
id="unirateapi-convert-currency",
external_user_id="{external_user_id}", # any stable ID for this user in your system
configured_props={
"unirateapi": {"authProvisionId": "apn_xxxxxxx"},
"from": "From",
"to": "To",
},
)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "unirateapi-convert-currency",
"configured_props": {
"unirateapi": { "authProvisionId": "apn_xxxxxxx" },
"from": "From",
"to": "To"
}
}'TOOLS
UniRateAPI actions
On-demand operations your product or agent can configure and run on behalf of a connected user.
-
Convert Currency
actionConvert an amount from one currency to another at the latest rate. See the documentation.Read-onlyv0.0.2 -
Get Exchange Rates
actionGet the latest exchange rate(s) for a base currency. Returns a single rate when a target is provided, or all rates keyed by currency code when omitted. See the documentation.Read-onlyv0.0.3 -
Get VAT Rates
actionGet VAT rates for a single country, or for all supported countries when no country is provided. Country codes follow the EU VAT convention rather than ISO 3166-1 alpha-2 — Greece isEL(notGR) and the United Kingdom isUK(notGB). Coverage is limited to EU member states plusUKandXI(Northern Ireland), so non-EU codes such asUSare not supported. Use List Country Code Options to discover valid codes. See the documentation.Read-onlyv0.0.2 -
List Country Code Options
actionRetrieves the valid options for the Country Code field used by Get VAT Rates. Returns one entry per supported country as{ label, value }, wherevalueis the code to pass as Country Code. These follow the EU VAT convention rather than ISO 3166-1 alpha-2 — Greece isEL(notGR) and the United Kingdom isUK(notGB) — so call this first rather than assuming an ISO code. See the documentation.Read-onlyv0.0.2 -
List Currencies
actionList every currency code supported by UniRate for exchange rate and conversion operations. Use this to discover valid values before calling Convert Currency or Get Exchange Rates, or to check whether a currency code you already have is supported. Takes no parameters and returns the full set in a single response as{ currencies, count }— codes only, without currency names or rates. These are currency codes (e.g.USD,EUR,GBP) and are unrelated to the EU VAT country codes used by Get VAT Rates. See the documentation.Read-onlyv0.0.2 -
List Currency Code Options
actionRetrieves available options for the Currency Code field.Read-onlyv0.0.2
EVENTS
UniRateAPI triggers
Event sources your backend can deploy for users and receive through a webhook.
- App slug
- unirateapi
- Authentication
- API key
- Categories
- Developer Tools
- Actions
- 6
- Triggers
- 1
- API proxy
- Available