A AuthMS API Wiki API Reference iam.tianv.com →

POST /exchange-rates/convert

使用报价ID执行币种兑换。参考:GAAP/IFRS (Double-Entry Accounting Principles)。quote_id在60秒内有效,兑换后即失效防止重放。

钱包服务 `bearerAuth` application/json

Request Body

Schema: dto.ExchangeConvertRequest

FieldTypeRequiredExampleConstraintsDescription
amount string Yes 100.00
quote_id string Yes qt_abc123def
remark string No USD to CNY conversion

Responses

StatusDescriptionSchema
200兑换结果dto.DataResponse-dto_ExchangeConvertResponse
400请求参数错误gitee_com_linmes_authms_base_dto.SimpleResponse
401未认证或令牌无效gitee_com_linmes_authms_base_dto.SimpleResponse
409报价已过期或重复使用gitee_com_linmes_authms_base_dto.SimpleResponse
422兑换金额无效gitee_com_linmes_authms_base_dto.SimpleResponse
500服务内部错误gitee_com_linmes_authms_base_dto.SimpleResponse

Referenced Schemas

dto.DataResponse-dto_ExchangeConvertResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
data dto.ExchangeConvertResponse No
message string No
timestamp string No

dto.ExchangeConvertResponse

FieldTypeRequiredExampleConstraintsDescription
from_amount string No 100.00
from_currency string No USD
message string No 兑换成功
quote_id string No qt_abc123def
rate number No 7.24
to_amount string No 724.00
to_currency string No CNY
transaction_id string No txn_001

gitee_com_linmes_authms_base_dto.SimpleResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No