Hosted tool
Convert currency
Live
Convert an amount using reference exchange rates.
finance.convertversion 1
Price
0.01
credits per call
Compute only: upstream charges are not included in this price.
Availability
Live
Configured and callable with a valid key.
Access
Live
Category Finance
Input
{
"additionalProperties": false,
"properties": {
"amount": {
"maximum": 1000000000,
"minimum": 0,
"type": "number"
},
"from": {
"pattern": "^[A-Z]{3}$",
"type": "string"
},
"to": {
"pattern": "^[A-Z]{3}$",
"type": "string"
}
},
"required": [
"from",
"to",
"amount"
],
"type": "object"
}Result
object<{from:string,to:string,amount:number,converted:number,date:string}>Default fields: from to amount converted date
Limits
| Synchronous deadline | 15 s |
|---|---|
| Maximum result | 65,536 bytes |
| Result pages | 1 |
| Maximum upstream read | 1,048,576 bytes |
Example call
Provisional: the invoke contract ships with the execution lane
curl https://haidercode.ai/v1/tools/finance.convert/invoke \
-H "Authorization: Bearer <HK_KEY>" \
-H "Content-Type: application/json" \
-H 'Idempotency-Key: convert-1' \
-d '{"arguments":{"from":"…","to":"…","amount":0},"max_credits":"0.05"}'Bound every paid call with max_credits, and repeat the same Idempotency-Key to recover a result rather than pay twice.