units.fx_triangulate
Convert an amount through an intermediate currency using two exchange rates, rounding only the final result to the target currency’s decimal places and returning the amount and currency.
Instructions
중간 통화를 거치는 삼각 환산 amount * rate1 * rate2 를 to_ccy 의 소수 자릿수로 한 번만 반올림해 amount(문자열)와 currency 를 반환한다. rate1 은 from_ccy 에서 via_ccy, rate2 는 via_ccy 에서 to_ccy 방향의 양수이며 중간 금액은 반올림하지 않는다. rounding 기본값은 HALF_EVEN 이다.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rate1 | Yes | ||
| rate2 | Yes | ||
| amount | Yes | ||
| to_ccy | Yes | ||
| via_ccy | Yes | ||
| from_ccy | Yes | ||
| rounding | No | HALF_EVEN |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _meta | No | 서버가 붙이는 영수증(integrity), 엔진, 힌트 | |
| trace | Yes | 계산 근거(tool, formula, inputs, steps, output) | |
| amount | Yes | ||
| currency | Yes |