get_exchange_rate
Pack: crypto · Endpoint: https://gateway.pipeworx.io/crypto/mcp
Convert between fiat currencies (e.g., USD to EUR). Returns conversion rate and timestamp.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
from | string | yes | Source currency code (e.g., USD, EUR, GBP) |
to | string | yes | Target currency code (e.g., EUR, JPY, GBP) |
amount | number | no | Amount to convert (default: 1) |
Example call
Arguments
{
"from": "USD",
"to": "EUR"
}
curl
curl -X POST https://gateway.pipeworx.io/crypto/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_exchange_rate","arguments":{"from":"USD","to":"EUR"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('get_exchange_rate', {
"from": "USD",
"to": "EUR"
});
More examples
{
"from": "USD",
"to": "JPY",
"amount": 100
}
Response shape
Always returns: from, to, rate, amount, converted, last_updated
| Field | Type | Description |
|---|---|---|
from | string | Source currency code (uppercase) |
to | string | Target currency code (uppercase) |
rate | number | Exchange rate from source to target |
amount | number | Amount to convert |
converted | number | Converted amount (rounded to 2 decimals) |
last_updated | string | Last update timestamp (UTC) |
Full JSON Schema
{
"type": "object",
"properties": {
"from": {
"type": "string",
"description": "Source currency code (uppercase)"
},
"to": {
"type": "string",
"description": "Target currency code (uppercase)"
},
"rate": {
"type": "number",
"description": "Exchange rate from source to target"
},
"amount": {
"type": "number",
"description": "Amount to convert"
},
"converted": {
"type": "number",
"description": "Converted amount (rounded to 2 decimals)"
},
"last_updated": {
"type": "string",
"description": "Last update timestamp (UTC)"
}
},
"required": [
"from",
"to",
"rate",
"amount",
"converted",
"last_updated"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"crypto": {
"url": "https://gateway.pipeworx.io/crypto/mcp"
}
}
}
See Getting Started for client-specific install steps.