Twelve Data Get Currency Conversion

0.5 credits/call
ae_twelvedata_get_currency_conversion

Convert an amount between forex or cryptocurrency currencies using Twelve Data exchange rates, with an optional historical date or time.

Crypto
0.5 credits/call

Pricing

0.5 credits/call
ConditionCharge
Each call0.5 credits/call

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
dpintegerNoThe number of decimal places for the data5
datestringNoIf not null, will use exchange rate from a specific date or time. Format `2006-01-02` or `2006-01-02T15:04:05`. Is set in the local exchange time zone, use timezone parameter to specify a specific time zone—
amountnumberYesAmount of base currency to be converted into quote currency. Supports values in the range from `0` and above—
formatenum (JSON | CSV)NoValue can be `JSON` or `CSV`. Default `JSON`JSON
symbolstringYesThe currency pair you want to request can be either forex or cryptocurrency. Slash(`/`) delimiter is used. E.g. `EUR/USD` or `BTC/ETH` will be correct—
timezonestringNoTimezone at which output datetime will be displayed. Supports: <ul> <li>1. <code>Exchange</code> for local exchange time</li> <li>2. <code>UTC</code> for datetime at universal UTC standard</li> <li>3. Timezone name according to the IANA Time Zone Database. E.g. <code>America/New_York</code>, <code>Asia/Singapore</code>. Full list of timezones can be found <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones" target="blank">here</a>.</li> </ul> <i>Take note that the IANA Timezone name is case-sensitive</i>—
delimiterstringNoSpecify the delimiter used when downloading the `CSV` file. Default semicolon `;`;

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key
Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_twelvedata_get_currency_conversion' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "amount": 100,
    "symbol": "USD/CNY"
  }
}'
Response exampleresponse.json
JSON
{
  "amount": 666.711,
  "rate": 6.66711,
  "symbol": "USD/CNY",
  "timestamp": 1793187060
}